diff options
author | Matthew Ranostay <mranostay@embeddedalley.com> | 2007-10-19 02:19:56 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-01-31 11:29:07 -0500 |
commit | 47744f638a6ee6a9e47cf47cdc6f215d096cb4fc (patch) | |
tree | 99f41d265daf319b710d2c72328bac14e1740a4e /sound/pci/hda | |
parent | 7f16859a8335449c8bf75ce4edd8040a57e2b678 (diff) |
[ALSA] hda: Add dmux to STAC 9228
Added a dmux to the STAC9228 cards with DMIC support. And added a
STAC_DIGITAL_INPUT_SOURCE macro for repeating mixer code.
Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 86cd3f67b9fb..820208da8244 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -393,6 +393,16 @@ static struct hda_verb stac9205_core_init[] = { | |||
393 | {} | 393 | {} |
394 | }; | 394 | }; |
395 | 395 | ||
396 | #define STAC_DIGITAL_INPUT_SOURCE(cnt) \ | ||
397 | { \ | ||
398 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ | ||
399 | .name = "Digital Input Source", \ | ||
400 | .count = cnt, \ | ||
401 | .info = stac92xx_dmux_enum_info, \ | ||
402 | .get = stac92xx_dmux_enum_get, \ | ||
403 | .put = stac92xx_dmux_enum_put,\ | ||
404 | } | ||
405 | |||
396 | #define STAC_INPUT_SOURCE(cnt) \ | 406 | #define STAC_INPUT_SOURCE(cnt) \ |
397 | { \ | 407 | { \ |
398 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ | 408 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ |
@@ -433,14 +443,7 @@ static struct snd_kcontrol_new stac925x_mixer[] = { | |||
433 | }; | 443 | }; |
434 | 444 | ||
435 | static struct snd_kcontrol_new stac9205_mixer[] = { | 445 | static struct snd_kcontrol_new stac9205_mixer[] = { |
436 | { | 446 | STAC_DIGITAL_INPUT_SOURCE(1), |
437 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
438 | .name = "Digital Input Source", | ||
439 | .count = 1, | ||
440 | .info = stac92xx_dmux_enum_info, | ||
441 | .get = stac92xx_dmux_enum_get, | ||
442 | .put = stac92xx_dmux_enum_put, | ||
443 | }, | ||
444 | STAC_INPUT_SOURCE(2), | 447 | STAC_INPUT_SOURCE(2), |
445 | STAC_ANALOG_LOOPBACK(0xFE0, 0x7E0), | 448 | STAC_ANALOG_LOOPBACK(0xFE0, 0x7E0), |
446 | 449 | ||
@@ -470,6 +473,7 @@ static struct snd_kcontrol_new stac922x_mixer[] = { | |||
470 | 473 | ||
471 | 474 | ||
472 | static struct snd_kcontrol_new stac927x_mixer[] = { | 475 | static struct snd_kcontrol_new stac927x_mixer[] = { |
476 | STAC_DIGITAL_INPUT_SOURCE(1), | ||
473 | STAC_INPUT_SOURCE(3), | 477 | STAC_INPUT_SOURCE(3), |
474 | STAC_ANALOG_LOOPBACK(0xFEB, 0x7EB), | 478 | STAC_ANALOG_LOOPBACK(0xFEB, 0x7EB), |
475 | 479 | ||
@@ -2718,6 +2722,7 @@ static int patch_stac927x(struct hda_codec *codec) | |||
2718 | case 0x10280209: /* STAC 9228 */ | 2722 | case 0x10280209: /* STAC 9228 */ |
2719 | spec->dmic_nids = stac927x_dmic_nids; | 2723 | spec->dmic_nids = stac927x_dmic_nids; |
2720 | spec->num_dmics = STAC927X_NUM_DMICS; | 2724 | spec->num_dmics = STAC927X_NUM_DMICS; |
2725 | spec->dmux_nid = 0x1c; | ||
2721 | break; | 2726 | break; |
2722 | default: | 2727 | default: |
2723 | spec->num_dmics = 0; | 2728 | spec->num_dmics = 0; |