aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-07-28 11:03:49 -0400
committerTakashi Iwai <tiwai@suse.de>2009-07-28 11:03:49 -0400
commit4417932315d185b59c0089091de7fa509c59fd5a (patch)
treedafe1a984206d313f9c4e1ee1f8d54b256e3c58b /sound
parent9a11f1aa8e14798037d0c9ac134696fa3af6eb2a (diff)
ALSA: hda - Don't create unneeded digital input source for IDT 92HD71x
The current driver creates always the digital input source mixer elements for IDT 92HD71x codecs no matter whether digital mics are present. This patch adds the proper check to avoid the creation of these controls if unnecessary. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_sigmatel.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index c6dc625c66b4..4e3531b42e10 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -5355,7 +5355,6 @@ again:
5355 /* no output amps */ 5355 /* no output amps */
5356 spec->num_pwrs = 0; 5356 spec->num_pwrs = 0;
5357 spec->mixer = stac92hd71bxx_analog_mixer; 5357 spec->mixer = stac92hd71bxx_analog_mixer;
5358 spec->dinput_mux = &spec->private_dimux;
5359 5358
5360 /* disable VSW */ 5359 /* disable VSW */
5361 spec->init = &stac92hd71bxx_analog_core_init[HD_DISABLE_PORTF]; 5360 spec->init = &stac92hd71bxx_analog_core_init[HD_DISABLE_PORTF];
@@ -5366,8 +5365,11 @@ again:
5366 spec->num_dmics = stac92hd71bxx_connected_ports(codec, 5365 spec->num_dmics = stac92hd71bxx_connected_ports(codec,
5367 stac92hd71bxx_dmic_nids, 5366 stac92hd71bxx_dmic_nids,
5368 STAC92HD71BXX_NUM_DMICS - 1); 5367 STAC92HD71BXX_NUM_DMICS - 1);
5369 spec->num_dmuxes = ARRAY_SIZE(stac92hd71bxx_dmux_nids); 5368 if (spec->num_dmics) {
5370 ndmic_nids = ARRAY_SIZE(stac92hd71bxx_dmic_nids) - 2; 5369 spec->num_dmuxes = ARRAY_SIZE(stac92hd71bxx_dmux_nids);
5370 spec->dinput_mux = &spec->private_dimux;
5371 ndmic_nids = ARRAY_SIZE(stac92hd71bxx_dmic_nids) - 2;
5372 }
5371 break; 5373 break;
5372 case 0x111d7603: /* 6 Port with Analog Mixer */ 5374 case 0x111d7603: /* 6 Port with Analog Mixer */
5373 if ((codec->revision_id & 0xf) == 1) 5375 if ((codec->revision_id & 0xf) == 1)
@@ -5379,15 +5381,17 @@ again:
5379 default: 5381 default:
5380 memcpy(&spec->private_dimux, &stac92hd71bxx_dmux_amixer, 5382 memcpy(&spec->private_dimux, &stac92hd71bxx_dmux_amixer,
5381 sizeof(stac92hd71bxx_dmux_amixer)); 5383 sizeof(stac92hd71bxx_dmux_amixer));
5382 spec->dinput_mux = &spec->private_dimux;
5383 spec->mixer = stac92hd71bxx_analog_mixer; 5384 spec->mixer = stac92hd71bxx_analog_mixer;
5384 spec->init = stac92hd71bxx_analog_core_init; 5385 spec->init = stac92hd71bxx_analog_core_init;
5385 codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs; 5386 codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs;
5386 spec->num_dmics = stac92hd71bxx_connected_ports(codec, 5387 spec->num_dmics = stac92hd71bxx_connected_ports(codec,
5387 stac92hd71bxx_dmic_nids, 5388 stac92hd71bxx_dmic_nids,
5388 STAC92HD71BXX_NUM_DMICS); 5389 STAC92HD71BXX_NUM_DMICS);
5389 spec->num_dmuxes = ARRAY_SIZE(stac92hd71bxx_dmux_nids); 5390 if (spec->num_dmics) {
5390 ndmic_nids = ARRAY_SIZE(stac92hd71bxx_dmic_nids) - 1; 5391 spec->num_dmuxes = ARRAY_SIZE(stac92hd71bxx_dmux_nids);
5392 spec->dinput_mux = &spec->private_dimux;
5393 ndmic_nids = ARRAY_SIZE(stac92hd71bxx_dmic_nids) - 1;
5394 }
5391 } 5395 }
5392 5396
5393 if (get_wcaps(codec, 0xa) & AC_WCAP_IN_AMP) 5397 if (get_wcaps(codec, 0xa) & AC_WCAP_IN_AMP)