aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-10-08 07:00:02 -0400
committerTakashi Iwai <tiwai@suse.de>2009-10-08 07:00:02 -0400
commit378e869fd0ef75fa85a5e3df56a58e74e77d04c9 (patch)
treeec91fed5d1562ee3747f6543b207d479f21ef167 /sound/pci
parentd2a764dd8e2c70254bf78d5e2d3e9cbe8b34e470 (diff)
parent1d4efa6650454177afe30ad97283ff78572d0442 (diff)
Merge branch 'fix/misc' into for-linus
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/ice1712/ice1712.c2
-rw-r--r--sound/pci/ice1712/ice1724.c6
-rw-r--r--sound/pci/via82xx.c27
3 files changed, 22 insertions, 13 deletions
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c
index cecf1ffeeaa..d74033a2cfb 100644
--- a/sound/pci/ice1712/ice1712.c
+++ b/sound/pci/ice1712/ice1712.c
@@ -2259,7 +2259,7 @@ static int snd_ice1712_pro_peak_get(struct snd_kcontrol *kcontrol,
2259} 2259}
2260 2260
2261static struct snd_kcontrol_new snd_ice1712_mixer_pro_peak __devinitdata = { 2261static struct snd_kcontrol_new snd_ice1712_mixer_pro_peak __devinitdata = {
2262 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2262 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
2263 .name = "Multi Track Peak", 2263 .name = "Multi Track Peak",
2264 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, 2264 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
2265 .info = snd_ice1712_pro_peak_info, 2265 .info = snd_ice1712_pro_peak_info,
diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c
index af6e0014862..76b717dae4b 100644
--- a/sound/pci/ice1712/ice1724.c
+++ b/sound/pci/ice1712/ice1724.c
@@ -1294,7 +1294,7 @@ static int __devinit snd_vt1724_pcm_spdif(struct snd_ice1712 *ice, int device)
1294 1294
1295 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, 1295 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
1296 snd_dma_pci_data(ice->pci), 1296 snd_dma_pci_data(ice->pci),
1297 64*1024, 64*1024); 1297 256*1024, 256*1024);
1298 1298
1299 ice->pcm = pcm; 1299 ice->pcm = pcm;
1300 1300
@@ -1408,7 +1408,7 @@ static int __devinit snd_vt1724_pcm_indep(struct snd_ice1712 *ice, int device)
1408 1408
1409 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, 1409 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
1410 snd_dma_pci_data(ice->pci), 1410 snd_dma_pci_data(ice->pci),
1411 64*1024, 64*1024); 1411 256*1024, 256*1024);
1412 1412
1413 ice->pcm_ds = pcm; 1413 ice->pcm_ds = pcm;
1414 1414
@@ -2110,7 +2110,7 @@ static int snd_vt1724_pro_peak_get(struct snd_kcontrol *kcontrol,
2110} 2110}
2111 2111
2112static struct snd_kcontrol_new snd_vt1724_mixer_pro_peak __devinitdata = { 2112static struct snd_kcontrol_new snd_vt1724_mixer_pro_peak __devinitdata = {
2113 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2113 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
2114 .name = "Multi Track Peak", 2114 .name = "Multi Track Peak",
2115 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, 2115 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
2116 .info = snd_vt1724_pro_peak_info, 2116 .info = snd_vt1724_pro_peak_info,
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c
index acfa4760da4..91683a34903 100644
--- a/sound/pci/via82xx.c
+++ b/sound/pci/via82xx.c
@@ -1626,7 +1626,7 @@ static int snd_via8233_dxs_volume_get(struct snd_kcontrol *kcontrol,
1626 struct snd_ctl_elem_value *ucontrol) 1626 struct snd_ctl_elem_value *ucontrol)
1627{ 1627{
1628 struct via82xx *chip = snd_kcontrol_chip(kcontrol); 1628 struct via82xx *chip = snd_kcontrol_chip(kcontrol);
1629 unsigned int idx = snd_ctl_get_ioff(kcontrol, &ucontrol->id); 1629 unsigned int idx = kcontrol->id.subdevice;
1630 1630
1631 ucontrol->value.integer.value[0] = VIA_DXS_MAX_VOLUME - chip->playback_volume[idx][0]; 1631 ucontrol->value.integer.value[0] = VIA_DXS_MAX_VOLUME - chip->playback_volume[idx][0];
1632 ucontrol->value.integer.value[1] = VIA_DXS_MAX_VOLUME - chip->playback_volume[idx][1]; 1632 ucontrol->value.integer.value[1] = VIA_DXS_MAX_VOLUME - chip->playback_volume[idx][1];
@@ -1646,7 +1646,7 @@ static int snd_via8233_dxs_volume_put(struct snd_kcontrol *kcontrol,
1646 struct snd_ctl_elem_value *ucontrol) 1646 struct snd_ctl_elem_value *ucontrol)
1647{ 1647{
1648 struct via82xx *chip = snd_kcontrol_chip(kcontrol); 1648 struct via82xx *chip = snd_kcontrol_chip(kcontrol);
1649 unsigned int idx = snd_ctl_get_ioff(kcontrol, &ucontrol->id); 1649 unsigned int idx = kcontrol->id.subdevice;
1650 unsigned long port = chip->port + 0x10 * idx; 1650 unsigned long port = chip->port + 0x10 * idx;
1651 unsigned char val; 1651 unsigned char val;
1652 int i, change = 0; 1652 int i, change = 0;
@@ -1705,11 +1705,12 @@ static struct snd_kcontrol_new snd_via8233_pcmdxs_volume_control __devinitdata =
1705}; 1705};
1706 1706
1707static struct snd_kcontrol_new snd_via8233_dxs_volume_control __devinitdata = { 1707static struct snd_kcontrol_new snd_via8233_dxs_volume_control __devinitdata = {
1708 .name = "VIA DXS Playback Volume", 1708 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
1709 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1709 .device = 0,
1710 /* .subdevice set later */
1711 .name = "PCM Playback Volume",
1710 .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | 1712 .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE |
1711 SNDRV_CTL_ELEM_ACCESS_TLV_READ), 1713 SNDRV_CTL_ELEM_ACCESS_TLV_READ),
1712 .count = 4,
1713 .info = snd_via8233_dxs_volume_info, 1714 .info = snd_via8233_dxs_volume_info,
1714 .get = snd_via8233_dxs_volume_get, 1715 .get = snd_via8233_dxs_volume_get,
1715 .put = snd_via8233_dxs_volume_put, 1716 .put = snd_via8233_dxs_volume_put,
@@ -1936,10 +1937,18 @@ static int __devinit snd_via8233_init_misc(struct via82xx *chip)
1936 } 1937 }
1937 else /* Using DXS when PCM emulation is enabled is really weird */ 1938 else /* Using DXS when PCM emulation is enabled is really weird */
1938 { 1939 {
1939 /* Standalone DXS controls */ 1940 for (i = 0; i < 4; ++i) {
1940 err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_via8233_dxs_volume_control, chip)); 1941 struct snd_kcontrol *kctl;
1941 if (err < 0) 1942
1942 return err; 1943 kctl = snd_ctl_new1(
1944 &snd_via8233_dxs_volume_control, chip);
1945 if (!kctl)
1946 return -ENOMEM;
1947 kctl->id.subdevice = i;
1948 err = snd_ctl_add(chip->card, kctl);
1949 if (err < 0)
1950 return err;
1951 }
1943 } 1952 }
1944 } 1953 }
1945 /* select spdif data slot 10/11 */ 1954 /* select spdif data slot 10/11 */