Loading sound/pci/azt3328.c +1 −2 Original line number Diff line number Diff line Loading @@ -2684,9 +2684,8 @@ snd_azf3328_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) err = snd_opl3_hwdep_new(opl3, 0, 1, NULL); if (err < 0) goto out_err; } opl3->private_data = chip; } sprintf(card->longname, "%s at 0x%lx, irq %i", card->shortname, chip->ctrl_io, chip->irq); Loading sound/pci/hda/hda_codec.c +8 −4 Original line number Diff line number Diff line Loading @@ -1759,6 +1759,10 @@ static void put_vol_mute(struct hda_codec *codec, struct hda_amp_info *info, parm = ch ? AC_AMP_SET_RIGHT : AC_AMP_SET_LEFT; parm |= direction == HDA_OUTPUT ? AC_AMP_SET_OUTPUT : AC_AMP_SET_INPUT; parm |= index << AC_AMP_SET_INDEX_SHIFT; if ((val & HDA_AMP_MUTE) && !(info->amp_caps & AC_AMPCAP_MUTE) && (info->amp_caps & AC_AMPCAP_MIN_MUTE)) ; /* set the zero value as a fake mute */ else parm |= val; snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, parm); info->vol[ch] = val; Loading Loading @@ -2026,7 +2030,7 @@ int snd_hda_mixer_amp_tlv(struct snd_kcontrol *kcontrol, int op_flag, val1 = -((caps & AC_AMPCAP_OFFSET) >> AC_AMPCAP_OFFSET_SHIFT); val1 += ofs; val1 = ((int)val1) * ((int)val2); if (min_mute) if (min_mute || (caps & AC_AMPCAP_MIN_MUTE)) val2 |= TLV_DB_SCALE_MUTE; if (put_user(SNDRV_CTL_TLVT_DB_SCALE, _tlv)) return -EFAULT; Loading Loading @@ -5123,7 +5127,7 @@ static int fill_audio_out_name(struct hda_codec *codec, hda_nid_t nid, const char *pfx = "", *sfx = ""; /* handle as a speaker if it's a fixed line-out */ if (!strcmp(name, "Line-Out") && attr == INPUT_PIN_ATTR_INT) if (!strcmp(name, "Line Out") && attr == INPUT_PIN_ATTR_INT) name = "Speaker"; /* check the location */ switch (attr) { Loading Loading @@ -5182,7 +5186,7 @@ int snd_hda_get_pin_label(struct hda_codec *codec, hda_nid_t nid, switch (get_defcfg_device(def_conf)) { case AC_JACK_LINE_OUT: return fill_audio_out_name(codec, nid, cfg, "Line-Out", return fill_audio_out_name(codec, nid, cfg, "Line Out", label, maxlen, indexp); case AC_JACK_SPEAKER: return fill_audio_out_name(codec, nid, cfg, "Speaker", Loading sound/pci/hda/hda_codec.h +3 −0 Original line number Diff line number Diff line Loading @@ -298,6 +298,9 @@ enum { #define AC_AMPCAP_MUTE (1<<31) /* mute capable */ #define AC_AMPCAP_MUTE_SHIFT 31 /* driver-specific amp-caps: using bits 24-30 */ #define AC_AMPCAP_MIN_MUTE (1 << 30) /* min-volume = mute */ /* Connection list */ #define AC_CLIST_LENGTH (0x7f<<0) #define AC_CLIST_LONG (1<<7) Loading sound/pci/hda/patch_cirrus.c +2 −2 Original line number Diff line number Diff line Loading @@ -609,7 +609,7 @@ static int add_output(struct hda_codec *codec, hda_nid_t dac, int idx, "Front Speaker", "Surround Speaker", "Bass Speaker" }; static const char * const line_outs[] = { "Front Line-Out", "Surround Line-Out", "Bass Line-Out" "Front Line Out", "Surround Line Out", "Bass Line Out" }; fix_volume_caps(codec, dac); Loading @@ -635,7 +635,7 @@ static int add_output(struct hda_codec *codec, hda_nid_t dac, int idx, if (num_ctls > 1) name = line_outs[idx]; else name = "Line-Out"; name = "Line Out"; break; } Loading sound/pci/hda/patch_conexant.c +22 −2 Original line number Diff line number Diff line Loading @@ -3470,7 +3470,7 @@ static int cx_automute_mode_info(struct snd_kcontrol *kcontrol, "Disabled", "Enabled" }; static const char * const texts3[] = { "Disabled", "Speaker Only", "Line-Out+Speaker" "Disabled", "Speaker Only", "Line Out+Speaker" }; const char * const *texts; Loading Loading @@ -4112,7 +4112,8 @@ static int cx_auto_add_volume_idx(struct hda_codec *codec, const char *basename, err = snd_hda_ctl_add(codec, nid, kctl); if (err < 0) return err; if (!(query_amp_caps(codec, nid, hda_dir) & AC_AMPCAP_MUTE)) if (!(query_amp_caps(codec, nid, hda_dir) & (AC_AMPCAP_MUTE | AC_AMPCAP_MIN_MUTE))) break; } return 0; Loading Loading @@ -4413,6 +4414,22 @@ static const struct snd_pci_quirk cxt_fixups[] = { {} }; /* add "fake" mute amp-caps to DACs on cx5051 so that mixer mute switches * can be created (bko#42825) */ static void add_cx5051_fake_mutes(struct hda_codec *codec) { static hda_nid_t out_nids[] = { 0x10, 0x11, 0 }; hda_nid_t *p; for (p = out_nids; *p; p++) snd_hda_override_amp_caps(codec, *p, HDA_OUTPUT, AC_AMPCAP_MIN_MUTE | query_amp_caps(codec, *p, HDA_OUTPUT)); } static int patch_conexant_auto(struct hda_codec *codec) { struct conexant_spec *spec; Loading @@ -4431,6 +4448,9 @@ static int patch_conexant_auto(struct hda_codec *codec) case 0x14f15045: spec->single_adc_amp = 1; break; case 0x14f15051: add_cx5051_fake_mutes(codec); break; } apply_pin_fixup(codec, cxt_fixups, cxt_pincfg_tbl); Loading Loading
sound/pci/azt3328.c +1 −2 Original line number Diff line number Diff line Loading @@ -2684,9 +2684,8 @@ snd_azf3328_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) err = snd_opl3_hwdep_new(opl3, 0, 1, NULL); if (err < 0) goto out_err; } opl3->private_data = chip; } sprintf(card->longname, "%s at 0x%lx, irq %i", card->shortname, chip->ctrl_io, chip->irq); Loading
sound/pci/hda/hda_codec.c +8 −4 Original line number Diff line number Diff line Loading @@ -1759,6 +1759,10 @@ static void put_vol_mute(struct hda_codec *codec, struct hda_amp_info *info, parm = ch ? AC_AMP_SET_RIGHT : AC_AMP_SET_LEFT; parm |= direction == HDA_OUTPUT ? AC_AMP_SET_OUTPUT : AC_AMP_SET_INPUT; parm |= index << AC_AMP_SET_INDEX_SHIFT; if ((val & HDA_AMP_MUTE) && !(info->amp_caps & AC_AMPCAP_MUTE) && (info->amp_caps & AC_AMPCAP_MIN_MUTE)) ; /* set the zero value as a fake mute */ else parm |= val; snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, parm); info->vol[ch] = val; Loading Loading @@ -2026,7 +2030,7 @@ int snd_hda_mixer_amp_tlv(struct snd_kcontrol *kcontrol, int op_flag, val1 = -((caps & AC_AMPCAP_OFFSET) >> AC_AMPCAP_OFFSET_SHIFT); val1 += ofs; val1 = ((int)val1) * ((int)val2); if (min_mute) if (min_mute || (caps & AC_AMPCAP_MIN_MUTE)) val2 |= TLV_DB_SCALE_MUTE; if (put_user(SNDRV_CTL_TLVT_DB_SCALE, _tlv)) return -EFAULT; Loading Loading @@ -5123,7 +5127,7 @@ static int fill_audio_out_name(struct hda_codec *codec, hda_nid_t nid, const char *pfx = "", *sfx = ""; /* handle as a speaker if it's a fixed line-out */ if (!strcmp(name, "Line-Out") && attr == INPUT_PIN_ATTR_INT) if (!strcmp(name, "Line Out") && attr == INPUT_PIN_ATTR_INT) name = "Speaker"; /* check the location */ switch (attr) { Loading Loading @@ -5182,7 +5186,7 @@ int snd_hda_get_pin_label(struct hda_codec *codec, hda_nid_t nid, switch (get_defcfg_device(def_conf)) { case AC_JACK_LINE_OUT: return fill_audio_out_name(codec, nid, cfg, "Line-Out", return fill_audio_out_name(codec, nid, cfg, "Line Out", label, maxlen, indexp); case AC_JACK_SPEAKER: return fill_audio_out_name(codec, nid, cfg, "Speaker", Loading
sound/pci/hda/hda_codec.h +3 −0 Original line number Diff line number Diff line Loading @@ -298,6 +298,9 @@ enum { #define AC_AMPCAP_MUTE (1<<31) /* mute capable */ #define AC_AMPCAP_MUTE_SHIFT 31 /* driver-specific amp-caps: using bits 24-30 */ #define AC_AMPCAP_MIN_MUTE (1 << 30) /* min-volume = mute */ /* Connection list */ #define AC_CLIST_LENGTH (0x7f<<0) #define AC_CLIST_LONG (1<<7) Loading
sound/pci/hda/patch_cirrus.c +2 −2 Original line number Diff line number Diff line Loading @@ -609,7 +609,7 @@ static int add_output(struct hda_codec *codec, hda_nid_t dac, int idx, "Front Speaker", "Surround Speaker", "Bass Speaker" }; static const char * const line_outs[] = { "Front Line-Out", "Surround Line-Out", "Bass Line-Out" "Front Line Out", "Surround Line Out", "Bass Line Out" }; fix_volume_caps(codec, dac); Loading @@ -635,7 +635,7 @@ static int add_output(struct hda_codec *codec, hda_nid_t dac, int idx, if (num_ctls > 1) name = line_outs[idx]; else name = "Line-Out"; name = "Line Out"; break; } Loading
sound/pci/hda/patch_conexant.c +22 −2 Original line number Diff line number Diff line Loading @@ -3470,7 +3470,7 @@ static int cx_automute_mode_info(struct snd_kcontrol *kcontrol, "Disabled", "Enabled" }; static const char * const texts3[] = { "Disabled", "Speaker Only", "Line-Out+Speaker" "Disabled", "Speaker Only", "Line Out+Speaker" }; const char * const *texts; Loading Loading @@ -4112,7 +4112,8 @@ static int cx_auto_add_volume_idx(struct hda_codec *codec, const char *basename, err = snd_hda_ctl_add(codec, nid, kctl); if (err < 0) return err; if (!(query_amp_caps(codec, nid, hda_dir) & AC_AMPCAP_MUTE)) if (!(query_amp_caps(codec, nid, hda_dir) & (AC_AMPCAP_MUTE | AC_AMPCAP_MIN_MUTE))) break; } return 0; Loading Loading @@ -4413,6 +4414,22 @@ static const struct snd_pci_quirk cxt_fixups[] = { {} }; /* add "fake" mute amp-caps to DACs on cx5051 so that mixer mute switches * can be created (bko#42825) */ static void add_cx5051_fake_mutes(struct hda_codec *codec) { static hda_nid_t out_nids[] = { 0x10, 0x11, 0 }; hda_nid_t *p; for (p = out_nids; *p; p++) snd_hda_override_amp_caps(codec, *p, HDA_OUTPUT, AC_AMPCAP_MIN_MUTE | query_amp_caps(codec, *p, HDA_OUTPUT)); } static int patch_conexant_auto(struct hda_codec *codec) { struct conexant_spec *spec; Loading @@ -4431,6 +4448,9 @@ static int patch_conexant_auto(struct hda_codec *codec) case 0x14f15045: spec->single_adc_amp = 1; break; case 0x14f15051: add_cx5051_fake_mutes(codec); break; } apply_pin_fixup(codec, cxt_fixups, cxt_pincfg_tbl); Loading