提交 791b3f59 编写于 作者: T Takashi Iwai

ALSA: intel8x0: Fix chmap application

The playback chmap for multi-channel stream hasn't been properly added
to intel8x0 devices due to the wrong condition.
Reported-by: NRaymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 8fe7b65a
...@@ -1541,17 +1541,16 @@ static int snd_intel8x0_pcm1(struct intel8x0 *chip, int device, ...@@ -1541,17 +1541,16 @@ static int snd_intel8x0_pcm1(struct intel8x0 *chip, int device,
snd_dma_pci_data(chip->pci), snd_dma_pci_data(chip->pci),
rec->prealloc_size, rec->prealloc_max_size); rec->prealloc_size, rec->prealloc_max_size);
if (rec->ac97_idx == ICHD_PCMOUT && rec->playback_ops) { if (rec->playback_ops &&
rec->playback_ops->open == snd_intel8x0_playback_open) {
struct snd_pcm_chmap *chmap; struct snd_pcm_chmap *chmap;
int chs = 2; int chs = 2;
if (rec->ac97_idx == ICHD_PCMOUT) { if (chip->multi8)
if (chip->multi8) chs = 8;
chs = 8; else if (chip->multi6)
else if (chip->multi6) chs = 6;
chs = 6; else if (chip->multi4)
else if (chip->multi4) chs = 4;
chs = 4;
}
err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK,
snd_pcm_alt_chmaps, chs, 0, snd_pcm_alt_chmaps, chs, 0,
&chmap); &chmap);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册