diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-11-06 02:09:35 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-11-06 02:14:21 -0500 |
commit | 791b3f596e2331f80244cc8532a25b48d45f126d (patch) | |
tree | 273e32f6eed8133517e98547ae36327a01ad7d6a | |
parent | 8fe7b65ab4656e5db466a7d98b1fd48ff83b2c64 (diff) |
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: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/intel8x0.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index 59c8aaebb91e..08d8733604a2 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c | |||
@@ -1541,17 +1541,16 @@ static int snd_intel8x0_pcm1(struct intel8x0 *chip, int device, | |||
1541 | snd_dma_pci_data(chip->pci), | 1541 | snd_dma_pci_data(chip->pci), |
1542 | rec->prealloc_size, rec->prealloc_max_size); | 1542 | rec->prealloc_size, rec->prealloc_max_size); |
1543 | 1543 | ||
1544 | if (rec->ac97_idx == ICHD_PCMOUT && rec->playback_ops) { | 1544 | if (rec->playback_ops && |
1545 | rec->playback_ops->open == snd_intel8x0_playback_open) { | ||
1545 | struct snd_pcm_chmap *chmap; | 1546 | struct snd_pcm_chmap *chmap; |
1546 | int chs = 2; | 1547 | int chs = 2; |
1547 | if (rec->ac97_idx == ICHD_PCMOUT) { | 1548 | if (chip->multi8) |
1548 | if (chip->multi8) | 1549 | chs = 8; |
1549 | chs = 8; | 1550 | else if (chip->multi6) |
1550 | else if (chip->multi6) | 1551 | chs = 6; |
1551 | chs = 6; | 1552 | else if (chip->multi4) |
1552 | else if (chip->multi4) | 1553 | chs = 4; |
1553 | chs = 4; | ||
1554 | } | ||
1555 | err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, | 1554 | err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, |
1556 | snd_pcm_alt_chmaps, chs, 0, | 1555 | snd_pcm_alt_chmaps, chs, 0, |
1557 | &chmap); | 1556 | &chmap); |