aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2012-08-20 05:17:00 -0400
committerTakashi Iwai <tiwai@suse.de>2012-08-20 05:33:23 -0400
commitc41999a23929f30808bae6009d8065052d4d73fd (patch)
treedd510fb8b2ed019bede84c098c104774e658cb9c /sound
parent8e13fc1c5f694a6ae4032c7f94103c137136733f (diff)
ALSA: hda - don't create dysfunctional mixer controls for ca0132
It's possible that these amps are settable somehow, e g through secret codec verbs, but for now, don't create the controls (as they won't be working anyway, and cause errors in amixer). Cc: stable@kernel.org BugLink: https://bugs.launchpad.net/bugs/1038651 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_ca0132.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c
index 9c0ec0a55bef..49750a96d649 100644
--- a/sound/pci/hda/patch_ca0132.c
+++ b/sound/pci/hda/patch_ca0132.c
@@ -275,6 +275,10 @@ static int _add_switch(struct hda_codec *codec, hda_nid_t nid, const char *pfx,
275 int type = dir ? HDA_INPUT : HDA_OUTPUT; 275 int type = dir ? HDA_INPUT : HDA_OUTPUT;
276 struct snd_kcontrol_new knew = 276 struct snd_kcontrol_new knew =
277 HDA_CODEC_MUTE_MONO(namestr, nid, chan, 0, type); 277 HDA_CODEC_MUTE_MONO(namestr, nid, chan, 0, type);
278 if ((query_amp_caps(codec, nid, type) & AC_AMPCAP_MUTE) == 0) {
279 snd_printdd("Skipping '%s %s Switch' (no mute on node 0x%x)\n", pfx, dirstr[dir], nid);
280 return 0;
281 }
278 sprintf(namestr, "%s %s Switch", pfx, dirstr[dir]); 282 sprintf(namestr, "%s %s Switch", pfx, dirstr[dir]);
279 return snd_hda_ctl_add(codec, nid, snd_ctl_new1(&knew, codec)); 283 return snd_hda_ctl_add(codec, nid, snd_ctl_new1(&knew, codec));
280} 284}
@@ -286,6 +290,10 @@ static int _add_volume(struct hda_codec *codec, hda_nid_t nid, const char *pfx,
286 int type = dir ? HDA_INPUT : HDA_OUTPUT; 290 int type = dir ? HDA_INPUT : HDA_OUTPUT;
287 struct snd_kcontrol_new knew = 291 struct snd_kcontrol_new knew =
288 HDA_CODEC_VOLUME_MONO(namestr, nid, chan, 0, type); 292 HDA_CODEC_VOLUME_MONO(namestr, nid, chan, 0, type);
293 if ((query_amp_caps(codec, nid, type) & AC_AMPCAP_NUM_STEPS) == 0) {
294 snd_printdd("Skipping '%s %s Volume' (no amp on node 0x%x)\n", pfx, dirstr[dir], nid);
295 return 0;
296 }
289 sprintf(namestr, "%s %s Volume", pfx, dirstr[dir]); 297 sprintf(namestr, "%s %s Volume", pfx, dirstr[dir]);
290 return snd_hda_ctl_add(codec, nid, snd_ctl_new1(&knew, codec)); 298 return snd_hda_ctl_add(codec, nid, snd_ctl_new1(&knew, codec));
291} 299}