diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-08-03 20:01:40 +0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-09-06 20:08:31 +0400 |
commit | e36e3b86c78cee9c7435eb33e0ef8a788193e812 (patch) | |
tree | a44ed8a8f0e7b832048d4fbd94a9041823cf1979 /sound/pci/intel8x0.c | |
parent | 833a493b7ed2eb8f9059338a0ebf06bebbb6ae93 (diff) | |
download | linux-e36e3b86c78cee9c7435eb33e0ef8a788193e812.tar.xz |
ALSA: Implement channel maps for standard onboard AC97 drivers
Just set the channel maps depending on the hardware availability.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/intel8x0.c')
-rw-r--r-- | sound/pci/intel8x0.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index 5c4115289a9a..848102e5d864 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c @@ -1541,6 +1541,26 @@ static int __devinit snd_intel8x0_pcm1(struct intel8x0 *chip, int device, snd_dma_pci_data(chip->pci), rec->prealloc_size, rec->prealloc_max_size); + if (rec->ac97_idx == ICHD_PCMOUT && rec->playback_ops) { + struct snd_pcm_chmap *chmap; + int chs = 2; + if (rec->ac97_idx == ICHD_PCMOUT) { + if (chip->multi8) + chs = 8; + else if (chip->multi6) + chs = 6; + else if (chip->multi4) + chs = 4; + } + err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, + snd_pcm_alt_chmaps, chs, 0, + &chmap); + if (err < 0) + return err; + chmap->channel_mask = SND_PCM_CHMAP_MASK_2468; + chip->ac97[0]->chmaps[SNDRV_PCM_STREAM_PLAYBACK] = chmap; + } + return 0; } |