Commit f3c90242a3b9e32f510229c4c1313df6ca7f1667
Committed by
Takashi Iwai
1 parent
9727b490e5
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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>
Showing 1 changed file with 23 additions and 0 deletions Side-by-side Diff
sound/pci/au88x0/au88x0_pcm.c
... | ... | @@ -650,6 +650,29 @@ |
650 | 650 | snd_dma_pci_data(chip->pci_dev), |
651 | 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 | 676 | if (VORTEX_PCM_TYPE(pcm) == VORTEX_PCM_SPDIF) { |
654 | 677 | for (i = 0; i < ARRAY_SIZE(snd_vortex_mixer_spdif); i++) { |
655 | 678 | kctl = snd_ctl_new1(&snd_vortex_mixer_spdif[i], chip); |