aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/pci/ymfpci/ymfpci_main.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c
index ee8b6366e48d..50b0804df904 100644
--- a/sound/pci/ymfpci/ymfpci_main.c
+++ b/sound/pci/ymfpci/ymfpci_main.c
@@ -1166,6 +1166,11 @@ int __devinit snd_ymfpci_pcm(struct snd_ymfpci *chip, int device, struct snd_pcm
1166 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, 1166 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
1167 snd_dma_pci_data(chip->pci), 64*1024, 256*1024); 1167 snd_dma_pci_data(chip->pci), 64*1024, 256*1024);
1168 1168
1169 err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK,
1170 snd_pcm_std_chmaps, 2, 0, NULL);
1171 if (err < 0)
1172 return err;
1173
1169 if (rpcm) 1174 if (rpcm)
1170 *rpcm = pcm; 1175 *rpcm = pcm;
1171 return 0; 1176 return 0;
@@ -1257,6 +1262,14 @@ static struct snd_pcm_ops snd_ymfpci_playback_4ch_ops = {
1257 .pointer = snd_ymfpci_playback_pointer, 1262 .pointer = snd_ymfpci_playback_pointer,
1258}; 1263};
1259 1264
1265static const struct snd_pcm_chmap_elem surround_map[] = {
1266 { .channels = 1,
1267 .map = { SNDRV_CHMAP_UNKNOWN } },
1268 { .channels = 2,
1269 .map = { SNDRV_CHMAP_RL, SNDRV_CHMAP_RR } },
1270 { }
1271};
1272
1260int __devinit snd_ymfpci_pcm_4ch(struct snd_ymfpci *chip, int device, struct snd_pcm ** rpcm) 1273int __devinit snd_ymfpci_pcm_4ch(struct snd_ymfpci *chip, int device, struct snd_pcm ** rpcm)
1261{ 1274{
1262 struct snd_pcm *pcm; 1275 struct snd_pcm *pcm;
@@ -1278,6 +1291,11 @@ int __devinit snd_ymfpci_pcm_4ch(struct snd_ymfpci *chip, int device, struct snd
1278 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, 1291 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
1279 snd_dma_pci_data(chip->pci), 64*1024, 256*1024); 1292 snd_dma_pci_data(chip->pci), 64*1024, 256*1024);
1280 1293
1294 err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK,
1295 surround_map, 2, 0, NULL);
1296 if (err < 0)
1297 return err;
1298
1281 if (rpcm) 1299 if (rpcm)
1282 *rpcm = pcm; 1300 *rpcm = pcm;
1283 return 0; 1301 return 0;