diff options
author | Raymond Yau <superquad.vortex2@gmail.com> | 2013-02-14 07:37:22 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-02-14 09:01:52 -0500 |
commit | f3c90242a3b9e32f510229c4c1313df6ca7f1667 (patch) | |
tree | 3b125d2303e35d6e43edd543d808241d7b1e86b3 | |
parent | 9727b490e543de956b8ba356e2d5499097d0b7a2 (diff) |
ALSA: au88x0 - Define channel map for au88x0
Define channel map for playback, capture devices of au88x0
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/au88x0/au88x0_pcm.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sound/pci/au88x0/au88x0_pcm.c b/sound/pci/au88x0/au88x0_pcm.c index a4184bb27761..b46dc9b24dbd 100644 --- a/sound/pci/au88x0/au88x0_pcm.c +++ b/sound/pci/au88x0/au88x0_pcm.c | |||
@@ -650,6 +650,29 @@ static int snd_vortex_new_pcm(vortex_t *chip, int idx, int nr) | |||
650 | snd_dma_pci_data(chip->pci_dev), | 650 | snd_dma_pci_data(chip->pci_dev), |
651 | 0x10000, 0x10000); | 651 | 0x10000, 0x10000); |
652 | 652 | ||
653 | switch (VORTEX_PCM_TYPE(pcm)) { | ||
654 | case VORTEX_PCM_ADB: | ||
655 | err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, | ||
656 | snd_pcm_std_chmaps, | ||
657 | VORTEX_IS_QUAD(chip) ? 4 : 2, | ||
658 | 0, NULL); | ||
659 | if (err < 0) | ||
660 | return err; | ||
661 | err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_CAPTURE, | ||
662 | snd_pcm_std_chmaps, 2, 0, NULL); | ||
663 | if (err < 0) | ||
664 | return err; | ||
665 | break; | ||
666 | #ifdef CHIP_AU8830 | ||
667 | case VORTEX_PCM_A3D: | ||
668 | err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, | ||
669 | snd_pcm_std_chmaps, 1, 0, NULL); | ||
670 | if (err < 0) | ||
671 | return err; | ||
672 | break; | ||
673 | #endif | ||
674 | }; | ||
675 | |||
653 | if (VORTEX_PCM_TYPE(pcm) == VORTEX_PCM_SPDIF) { | 676 | if (VORTEX_PCM_TYPE(pcm) == VORTEX_PCM_SPDIF) { |
654 | for (i = 0; i < ARRAY_SIZE(snd_vortex_mixer_spdif); i++) { | 677 | for (i = 0; i < ARRAY_SIZE(snd_vortex_mixer_spdif); i++) { |
655 | kctl = snd_ctl_new1(&snd_vortex_mixer_spdif[i], chip); | 678 | kctl = snd_ctl_new1(&snd_vortex_mixer_spdif[i], chip); |