diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-11-16 05:33:41 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-11-16 05:33:41 -0500 |
commit | fe705ab1526bc2c8b7756f3a855f040ab2060af2 (patch) | |
tree | c4444d19983c5578f9ef2bddc1fa01b6e42f91a3 /sound/pci | |
parent | 7d1794e81b5f202c73d7e3e65f0ee7aae4928038 (diff) | |
parent | ad1cd745060ae2f24026b3b3d09da3426df6ab36 (diff) |
Merge branch 'topic/beep-rename' into topic/hda
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/Kconfig | 1 | ||||
-rw-r--r-- | sound/pci/ac97/ac97_codec.c | 6 | ||||
-rw-r--r-- | sound/pci/ac97/ac97_patch.c | 12 | ||||
-rw-r--r-- | sound/pci/ali5451/ali5451.c | 2 | ||||
-rw-r--r-- | sound/pci/azt3328.c | 4 | ||||
-rw-r--r-- | sound/pci/bt87x.c | 2 | ||||
-rw-r--r-- | sound/pci/ca0106/ca0106_mixer.c | 4 | ||||
-rw-r--r-- | sound/pci/ca0106/ca0106_proc.c | 4 | ||||
-rw-r--r-- | sound/pci/cmipci.c | 4 | ||||
-rw-r--r-- | sound/pci/ctxfi/ctatc.c | 6 | ||||
-rw-r--r-- | sound/pci/echoaudio/echoaudio.c | 30 | ||||
-rw-r--r-- | sound/pci/echoaudio/mia.c | 1 | ||||
-rw-r--r-- | sound/pci/emu10k1/emu10k1x.c | 3 | ||||
-rw-r--r-- | sound/pci/emu10k1/emumixer.c | 4 | ||||
-rw-r--r-- | sound/pci/emu10k1/emuproc.c | 4 | ||||
-rw-r--r-- | sound/pci/emu10k1/io.c | 2 | ||||
-rw-r--r-- | sound/pci/es1938.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_cmedia.c | 4 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 4 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 6 | ||||
-rw-r--r-- | sound/pci/ice1712/amp.c | 8 | ||||
-rw-r--r-- | sound/pci/ice1712/ice1712.c | 2 | ||||
-rw-r--r-- | sound/pci/ice1712/ice1724.c | 8 | ||||
-rw-r--r-- | sound/pci/intel8x0.c | 12 | ||||
-rw-r--r-- | sound/pci/via82xx.c | 86 |
25 files changed, 156 insertions, 65 deletions
diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig index fb5ee3cc3968..75c602b5b132 100644 --- a/sound/pci/Kconfig +++ b/sound/pci/Kconfig | |||
@@ -259,7 +259,6 @@ config SND_CS5530 | |||
259 | 259 | ||
260 | config SND_CS5535AUDIO | 260 | config SND_CS5535AUDIO |
261 | tristate "CS5535/CS5536 Audio" | 261 | tristate "CS5535/CS5536 Audio" |
262 | depends on X86 && !X86_64 | ||
263 | select SND_PCM | 262 | select SND_PCM |
264 | select SND_AC97_CODEC | 263 | select SND_AC97_CODEC |
265 | help | 264 | help |
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index 78288dbfc17a..20cb60afb200 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c | |||
@@ -603,8 +603,8 @@ AC97_SINGLE("Tone Control - Treble", AC97_MASTER_TONE, 0, 15, 1) | |||
603 | }; | 603 | }; |
604 | 604 | ||
605 | static const struct snd_kcontrol_new snd_ac97_controls_pc_beep[2] = { | 605 | static const struct snd_kcontrol_new snd_ac97_controls_pc_beep[2] = { |
606 | AC97_SINGLE("PC Speaker Playback Switch", AC97_PC_BEEP, 15, 1, 1), | 606 | AC97_SINGLE("Beep Playback Switch", AC97_PC_BEEP, 15, 1, 1), |
607 | AC97_SINGLE("PC Speaker Playback Volume", AC97_PC_BEEP, 1, 15, 1) | 607 | AC97_SINGLE("Beep Playback Volume", AC97_PC_BEEP, 1, 15, 1) |
608 | }; | 608 | }; |
609 | 609 | ||
610 | static const struct snd_kcontrol_new snd_ac97_controls_mic_boost = | 610 | static const struct snd_kcontrol_new snd_ac97_controls_mic_boost = |
@@ -1393,7 +1393,7 @@ static int snd_ac97_mixer_build(struct snd_ac97 * ac97) | |||
1393 | } | 1393 | } |
1394 | } | 1394 | } |
1395 | 1395 | ||
1396 | /* build PC Speaker controls */ | 1396 | /* build Beep controls */ |
1397 | if (!(ac97->flags & AC97_HAS_NO_PC_BEEP) && | 1397 | if (!(ac97->flags & AC97_HAS_NO_PC_BEEP) && |
1398 | ((ac97->flags & AC97_HAS_PC_BEEP) || | 1398 | ((ac97->flags & AC97_HAS_PC_BEEP) || |
1399 | snd_ac97_try_volume_mix(ac97, AC97_PC_BEEP))) { | 1399 | snd_ac97_try_volume_mix(ac97, AC97_PC_BEEP))) { |
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index 7337abdbe4e3..139cf3b2b9d7 100644 --- a/sound/pci/ac97/ac97_patch.c +++ b/sound/pci/ac97/ac97_patch.c | |||
@@ -800,12 +800,12 @@ AC97_SINGLE("Mono Switch", AC97_MASTER_TONE, 7, 1, 1), | |||
800 | AC97_SINGLE("Mono ZC Switch", AC97_MASTER_TONE, 6, 1, 0), | 800 | AC97_SINGLE("Mono ZC Switch", AC97_MASTER_TONE, 6, 1, 0), |
801 | AC97_SINGLE("Mono Volume", AC97_MASTER_TONE, 0, 31, 1), | 801 | AC97_SINGLE("Mono Volume", AC97_MASTER_TONE, 0, 31, 1), |
802 | 802 | ||
803 | AC97_SINGLE("PC Beep to Headphone Switch", AC97_AUX, 15, 1, 1), | 803 | AC97_SINGLE("Beep to Headphone Switch", AC97_AUX, 15, 1, 1), |
804 | AC97_SINGLE("PC Beep to Headphone Volume", AC97_AUX, 12, 7, 1), | 804 | AC97_SINGLE("Beep to Headphone Volume", AC97_AUX, 12, 7, 1), |
805 | AC97_SINGLE("PC Beep to Master Switch", AC97_AUX, 11, 1, 1), | 805 | AC97_SINGLE("Beep to Master Switch", AC97_AUX, 11, 1, 1), |
806 | AC97_SINGLE("PC Beep to Master Volume", AC97_AUX, 8, 7, 1), | 806 | AC97_SINGLE("Beep to Master Volume", AC97_AUX, 8, 7, 1), |
807 | AC97_SINGLE("PC Beep to Mono Switch", AC97_AUX, 7, 1, 1), | 807 | AC97_SINGLE("Beep to Mono Switch", AC97_AUX, 7, 1, 1), |
808 | AC97_SINGLE("PC Beep to Mono Volume", AC97_AUX, 4, 7, 1), | 808 | AC97_SINGLE("Beep to Mono Volume", AC97_AUX, 4, 7, 1), |
809 | 809 | ||
810 | AC97_SINGLE("Voice to Headphone Switch", AC97_PCM, 15, 1, 1), | 810 | AC97_SINGLE("Voice to Headphone Switch", AC97_PCM, 15, 1, 1), |
811 | AC97_SINGLE("Voice to Headphone Volume", AC97_PCM, 12, 7, 1), | 811 | AC97_SINGLE("Voice to Headphone Volume", AC97_PCM, 12, 7, 1), |
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c index b458d208720b..aaf4da68969c 100644 --- a/sound/pci/ali5451/ali5451.c +++ b/sound/pci/ali5451/ali5451.c | |||
@@ -973,7 +973,7 @@ static void snd_ali_free_voice(struct snd_ali * codec, | |||
973 | void *private_data; | 973 | void *private_data; |
974 | 974 | ||
975 | snd_ali_printk("free_voice: channel=%d\n",pvoice->number); | 975 | snd_ali_printk("free_voice: channel=%d\n",pvoice->number); |
976 | if (pvoice == NULL || !pvoice->use) | 976 | if (!pvoice->use) |
977 | return; | 977 | return; |
978 | snd_ali_clear_voices(codec, pvoice->number, pvoice->number); | 978 | snd_ali_clear_voices(codec, pvoice->number, pvoice->number); |
979 | spin_lock_irq(&codec->voice_alloc); | 979 | spin_lock_irq(&codec->voice_alloc); |
diff --git a/sound/pci/azt3328.c b/sound/pci/azt3328.c index 8451a0169f32..69867ace7860 100644 --- a/sound/pci/azt3328.c +++ b/sound/pci/azt3328.c | |||
@@ -830,8 +830,8 @@ static struct snd_kcontrol_new snd_azf3328_mixer_controls[] __devinitdata = { | |||
830 | AZF3328_MIXER_SWITCH("Mic Boost (+20dB)", IDX_MIXER_MIC, 6, 0), | 830 | AZF3328_MIXER_SWITCH("Mic Boost (+20dB)", IDX_MIXER_MIC, 6, 0), |
831 | AZF3328_MIXER_SWITCH("Line Playback Switch", IDX_MIXER_LINEIN, 15, 1), | 831 | AZF3328_MIXER_SWITCH("Line Playback Switch", IDX_MIXER_LINEIN, 15, 1), |
832 | AZF3328_MIXER_VOL_STEREO("Line Playback Volume", IDX_MIXER_LINEIN, 0x1f, 1), | 832 | AZF3328_MIXER_VOL_STEREO("Line Playback Volume", IDX_MIXER_LINEIN, 0x1f, 1), |
833 | AZF3328_MIXER_SWITCH("PC Speaker Playback Switch", IDX_MIXER_PCBEEP, 15, 1), | 833 | AZF3328_MIXER_SWITCH("Beep Playback Switch", IDX_MIXER_PCBEEP, 15, 1), |
834 | AZF3328_MIXER_VOL_SPECIAL("PC Speaker Playback Volume", IDX_MIXER_PCBEEP, 0x0f, 1, 1), | 834 | AZF3328_MIXER_VOL_SPECIAL("Beep Playback Volume", IDX_MIXER_PCBEEP, 0x0f, 1, 1), |
835 | AZF3328_MIXER_SWITCH("Video Playback Switch", IDX_MIXER_VIDEO, 15, 1), | 835 | AZF3328_MIXER_SWITCH("Video Playback Switch", IDX_MIXER_VIDEO, 15, 1), |
836 | AZF3328_MIXER_VOL_STEREO("Video Playback Volume", IDX_MIXER_VIDEO, 0x1f, 1), | 836 | AZF3328_MIXER_VOL_STEREO("Video Playback Volume", IDX_MIXER_VIDEO, 0x1f, 1), |
837 | AZF3328_MIXER_SWITCH("Aux Playback Switch", IDX_MIXER_AUX, 15, 1), | 837 | AZF3328_MIXER_SWITCH("Aux Playback Switch", IDX_MIXER_AUX, 15, 1), |
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c index 24585c6c6d01..4e2b925a94cc 100644 --- a/sound/pci/bt87x.c +++ b/sound/pci/bt87x.c | |||
@@ -808,6 +808,8 @@ static struct pci_device_id snd_bt87x_ids[] = { | |||
808 | BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x1002, 0x0001, GENERIC), | 808 | BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x1002, 0x0001, GENERIC), |
809 | /* Leadtek Winfast tv 2000xp delux */ | 809 | /* Leadtek Winfast tv 2000xp delux */ |
810 | BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x107d, 0x6606, GENERIC), | 810 | BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x107d, 0x6606, GENERIC), |
811 | /* Pinnacle PCTV */ | ||
812 | BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x11bd, 0x0012, GENERIC), | ||
811 | /* Voodoo TV 200 */ | 813 | /* Voodoo TV 200 */ |
812 | BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x121a, 0x3000, GENERIC), | 814 | BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x121a, 0x3000, GENERIC), |
813 | /* Askey Computer Corp. MagicTView'99 */ | 815 | /* Askey Computer Corp. MagicTView'99 */ |
diff --git a/sound/pci/ca0106/ca0106_mixer.c b/sound/pci/ca0106/ca0106_mixer.c index c8c6f437f5b3..8f443a9d61ec 100644 --- a/sound/pci/ca0106/ca0106_mixer.c +++ b/sound/pci/ca0106/ca0106_mixer.c | |||
@@ -792,8 +792,8 @@ int __devinit snd_ca0106_mixer(struct snd_ca0106 *emu) | |||
792 | "Phone Playback Volume", | 792 | "Phone Playback Volume", |
793 | "Video Playback Switch", | 793 | "Video Playback Switch", |
794 | "Video Playback Volume", | 794 | "Video Playback Volume", |
795 | "PC Speaker Playback Switch", | 795 | "Beep Playback Switch", |
796 | "PC Speaker Playback Volume", | 796 | "Beep Playback Volume", |
797 | "Mono Output Select", | 797 | "Mono Output Select", |
798 | "Capture Source", | 798 | "Capture Source", |
799 | "Capture Switch", | 799 | "Capture Switch", |
diff --git a/sound/pci/ca0106/ca0106_proc.c b/sound/pci/ca0106/ca0106_proc.c index c62b7d10ec61..15523e60351c 100644 --- a/sound/pci/ca0106/ca0106_proc.c +++ b/sound/pci/ca0106/ca0106_proc.c | |||
@@ -304,7 +304,7 @@ static void snd_ca0106_proc_reg_write32(struct snd_info_entry *entry, | |||
304 | while (!snd_info_get_line(buffer, line, sizeof(line))) { | 304 | while (!snd_info_get_line(buffer, line, sizeof(line))) { |
305 | if (sscanf(line, "%x %x", ®, &val) != 2) | 305 | if (sscanf(line, "%x %x", ®, &val) != 2) |
306 | continue; | 306 | continue; |
307 | if ((reg < 0x40) && (reg >=0) && (val <= 0xffffffff) ) { | 307 | if (reg < 0x40 && val <= 0xffffffff) { |
308 | spin_lock_irqsave(&emu->emu_lock, flags); | 308 | spin_lock_irqsave(&emu->emu_lock, flags); |
309 | outl(val, emu->port + (reg & 0xfffffffc)); | 309 | outl(val, emu->port + (reg & 0xfffffffc)); |
310 | spin_unlock_irqrestore(&emu->emu_lock, flags); | 310 | spin_unlock_irqrestore(&emu->emu_lock, flags); |
@@ -405,7 +405,7 @@ static void snd_ca0106_proc_reg_write(struct snd_info_entry *entry, | |||
405 | while (!snd_info_get_line(buffer, line, sizeof(line))) { | 405 | while (!snd_info_get_line(buffer, line, sizeof(line))) { |
406 | if (sscanf(line, "%x %x %x", ®, &channel_id, &val) != 3) | 406 | if (sscanf(line, "%x %x %x", ®, &channel_id, &val) != 3) |
407 | continue; | 407 | continue; |
408 | if ((reg < 0x80) && (reg >=0) && (val <= 0xffffffff) && (channel_id >=0) && (channel_id <= 3) ) | 408 | if (reg < 0x80 && val <= 0xffffffff && channel_id <= 3) |
409 | snd_ca0106_ptr_write(emu, reg, channel_id, val); | 409 | snd_ca0106_ptr_write(emu, reg, channel_id, val); |
410 | } | 410 | } |
411 | } | 411 | } |
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index ddcd4a9fd7e6..a312bae08f52 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c | |||
@@ -2302,7 +2302,7 @@ static struct snd_kcontrol_new snd_cmipci_mixers[] __devinitdata = { | |||
2302 | CMIPCI_SB_VOL_MONO("Mic Playback Volume", SB_DSP4_MIC_DEV, 3, 31), | 2302 | CMIPCI_SB_VOL_MONO("Mic Playback Volume", SB_DSP4_MIC_DEV, 3, 31), |
2303 | CMIPCI_SB_SW_MONO("Mic Playback Switch", 0), | 2303 | CMIPCI_SB_SW_MONO("Mic Playback Switch", 0), |
2304 | CMIPCI_DOUBLE("Mic Capture Switch", SB_DSP4_INPUT_LEFT, SB_DSP4_INPUT_RIGHT, 0, 0, 1, 0, 0), | 2304 | CMIPCI_DOUBLE("Mic Capture Switch", SB_DSP4_INPUT_LEFT, SB_DSP4_INPUT_RIGHT, 0, 0, 1, 0, 0), |
2305 | CMIPCI_SB_VOL_MONO("PC Speaker Playback Volume", SB_DSP4_SPEAKER_DEV, 6, 3), | 2305 | CMIPCI_SB_VOL_MONO("Beep Playback Volume", SB_DSP4_SPEAKER_DEV, 6, 3), |
2306 | CMIPCI_MIXER_VOL_STEREO("Aux Playback Volume", CM_REG_AUX_VOL, 4, 0, 15), | 2306 | CMIPCI_MIXER_VOL_STEREO("Aux Playback Volume", CM_REG_AUX_VOL, 4, 0, 15), |
2307 | CMIPCI_MIXER_SW_STEREO("Aux Playback Switch", CM_REG_MIXER2, CM_VAUXLM_SHIFT, CM_VAUXRM_SHIFT, 0), | 2307 | CMIPCI_MIXER_SW_STEREO("Aux Playback Switch", CM_REG_MIXER2, CM_VAUXLM_SHIFT, CM_VAUXRM_SHIFT, 0), |
2308 | CMIPCI_MIXER_SW_STEREO("Aux Capture Switch", CM_REG_MIXER2, CM_RAUXLEN_SHIFT, CM_RAUXREN_SHIFT, 0), | 2308 | CMIPCI_MIXER_SW_STEREO("Aux Capture Switch", CM_REG_MIXER2, CM_RAUXLEN_SHIFT, CM_RAUXREN_SHIFT, 0), |
@@ -2310,7 +2310,7 @@ static struct snd_kcontrol_new snd_cmipci_mixers[] __devinitdata = { | |||
2310 | CMIPCI_MIXER_VOL_MONO("Mic Capture Volume", CM_REG_MIXER2, CM_VADMIC_SHIFT, 7), | 2310 | CMIPCI_MIXER_VOL_MONO("Mic Capture Volume", CM_REG_MIXER2, CM_VADMIC_SHIFT, 7), |
2311 | CMIPCI_SB_VOL_MONO("Phone Playback Volume", CM_REG_EXTENT_IND, 5, 7), | 2311 | CMIPCI_SB_VOL_MONO("Phone Playback Volume", CM_REG_EXTENT_IND, 5, 7), |
2312 | CMIPCI_DOUBLE("Phone Playback Switch", CM_REG_EXTENT_IND, CM_REG_EXTENT_IND, 4, 4, 1, 0, 0), | 2312 | CMIPCI_DOUBLE("Phone Playback Switch", CM_REG_EXTENT_IND, CM_REG_EXTENT_IND, 4, 4, 1, 0, 0), |
2313 | CMIPCI_DOUBLE("PC Speaker Playback Switch", CM_REG_EXTENT_IND, CM_REG_EXTENT_IND, 3, 3, 1, 0, 0), | 2313 | CMIPCI_DOUBLE("Beep Playback Switch", CM_REG_EXTENT_IND, CM_REG_EXTENT_IND, 3, 3, 1, 0, 0), |
2314 | CMIPCI_DOUBLE("Mic Boost Capture Switch", CM_REG_EXTENT_IND, CM_REG_EXTENT_IND, 0, 0, 1, 0, 0), | 2314 | CMIPCI_DOUBLE("Mic Boost Capture Switch", CM_REG_EXTENT_IND, CM_REG_EXTENT_IND, 0, 0, 1, 0, 0), |
2315 | }; | 2315 | }; |
2316 | 2316 | ||
diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c index b1b3a644f738..cb65bd0dd35b 100644 --- a/sound/pci/ctxfi/ctatc.c +++ b/sound/pci/ctxfi/ctatc.c | |||
@@ -240,7 +240,7 @@ static int select_rom(unsigned int pitch) | |||
240 | } else if (pitch == 0x02000000) { | 240 | } else if (pitch == 0x02000000) { |
241 | /* pitch == 2 */ | 241 | /* pitch == 2 */ |
242 | return 3; | 242 | return 3; |
243 | } else if (pitch >= 0x0 && pitch <= 0x08000000) { | 243 | } else if (pitch <= 0x08000000) { |
244 | /* 0 <= pitch <= 8 */ | 244 | /* 0 <= pitch <= 8 */ |
245 | return 0; | 245 | return 0; |
246 | } else { | 246 | } else { |
@@ -1037,7 +1037,7 @@ static int atc_line_front_unmute(struct ct_atc *atc, unsigned char state) | |||
1037 | 1037 | ||
1038 | static int atc_line_surround_unmute(struct ct_atc *atc, unsigned char state) | 1038 | static int atc_line_surround_unmute(struct ct_atc *atc, unsigned char state) |
1039 | { | 1039 | { |
1040 | return atc_daio_unmute(atc, state, LINEO4); | 1040 | return atc_daio_unmute(atc, state, LINEO2); |
1041 | } | 1041 | } |
1042 | 1042 | ||
1043 | static int atc_line_clfe_unmute(struct ct_atc *atc, unsigned char state) | 1043 | static int atc_line_clfe_unmute(struct ct_atc *atc, unsigned char state) |
@@ -1047,7 +1047,7 @@ static int atc_line_clfe_unmute(struct ct_atc *atc, unsigned char state) | |||
1047 | 1047 | ||
1048 | static int atc_line_rear_unmute(struct ct_atc *atc, unsigned char state) | 1048 | static int atc_line_rear_unmute(struct ct_atc *atc, unsigned char state) |
1049 | { | 1049 | { |
1050 | return atc_daio_unmute(atc, state, LINEO2); | 1050 | return atc_daio_unmute(atc, state, LINEO4); |
1051 | } | 1051 | } |
1052 | 1052 | ||
1053 | static int atc_line_in_unmute(struct ct_atc *atc, unsigned char state) | 1053 | static int atc_line_in_unmute(struct ct_atc *atc, unsigned char state) |
diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c index da2065cd2c0d..1305f7ca02c3 100644 --- a/sound/pci/echoaudio/echoaudio.c +++ b/sound/pci/echoaudio/echoaudio.c | |||
@@ -950,7 +950,7 @@ static int __devinit snd_echo_new_pcm(struct echoaudio *chip) | |||
950 | Control interface | 950 | Control interface |
951 | ******************************************************************************/ | 951 | ******************************************************************************/ |
952 | 952 | ||
953 | #ifndef ECHOCARD_HAS_VMIXER | 953 | #if !defined(ECHOCARD_HAS_VMIXER) || defined(ECHOCARD_HAS_LINE_OUT_GAIN) |
954 | 954 | ||
955 | /******************* PCM output volume *******************/ | 955 | /******************* PCM output volume *******************/ |
956 | static int snd_echo_output_gain_info(struct snd_kcontrol *kcontrol, | 956 | static int snd_echo_output_gain_info(struct snd_kcontrol *kcontrol, |
@@ -1003,6 +1003,19 @@ static int snd_echo_output_gain_put(struct snd_kcontrol *kcontrol, | |||
1003 | return changed; | 1003 | return changed; |
1004 | } | 1004 | } |
1005 | 1005 | ||
1006 | #ifdef ECHOCARD_HAS_LINE_OUT_GAIN | ||
1007 | /* On the Mia this one controls the line-out volume */ | ||
1008 | static struct snd_kcontrol_new snd_echo_line_output_gain __devinitdata = { | ||
1009 | .name = "Line Playback Volume", | ||
1010 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
1011 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | | ||
1012 | SNDRV_CTL_ELEM_ACCESS_TLV_READ, | ||
1013 | .info = snd_echo_output_gain_info, | ||
1014 | .get = snd_echo_output_gain_get, | ||
1015 | .put = snd_echo_output_gain_put, | ||
1016 | .tlv = {.p = db_scale_output_gain}, | ||
1017 | }; | ||
1018 | #else | ||
1006 | static struct snd_kcontrol_new snd_echo_pcm_output_gain __devinitdata = { | 1019 | static struct snd_kcontrol_new snd_echo_pcm_output_gain __devinitdata = { |
1007 | .name = "PCM Playback Volume", | 1020 | .name = "PCM Playback Volume", |
1008 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 1021 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
@@ -1012,9 +1025,10 @@ static struct snd_kcontrol_new snd_echo_pcm_output_gain __devinitdata = { | |||
1012 | .put = snd_echo_output_gain_put, | 1025 | .put = snd_echo_output_gain_put, |
1013 | .tlv = {.p = db_scale_output_gain}, | 1026 | .tlv = {.p = db_scale_output_gain}, |
1014 | }; | 1027 | }; |
1015 | |||
1016 | #endif | 1028 | #endif |
1017 | 1029 | ||
1030 | #endif /* !ECHOCARD_HAS_VMIXER || ECHOCARD_HAS_LINE_OUT_GAIN */ | ||
1031 | |||
1018 | 1032 | ||
1019 | 1033 | ||
1020 | #ifdef ECHOCARD_HAS_INPUT_GAIN | 1034 | #ifdef ECHOCARD_HAS_INPUT_GAIN |
@@ -2030,10 +2044,18 @@ static int __devinit snd_echo_probe(struct pci_dev *pci, | |||
2030 | snd_echo_vmixer.count = num_pipes_out(chip) * num_busses_out(chip); | 2044 | snd_echo_vmixer.count = num_pipes_out(chip) * num_busses_out(chip); |
2031 | if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_vmixer, chip))) < 0) | 2045 | if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_vmixer, chip))) < 0) |
2032 | goto ctl_error; | 2046 | goto ctl_error; |
2033 | #else | 2047 | #ifdef ECHOCARD_HAS_LINE_OUT_GAIN |
2034 | if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_pcm_output_gain, chip))) < 0) | 2048 | err = snd_ctl_add(chip->card, |
2049 | snd_ctl_new1(&snd_echo_line_output_gain, chip)); | ||
2050 | if (err < 0) | ||
2035 | goto ctl_error; | 2051 | goto ctl_error; |
2036 | #endif | 2052 | #endif |
2053 | #else /* ECHOCARD_HAS_VMIXER */ | ||
2054 | err = snd_ctl_add(chip->card, | ||
2055 | snd_ctl_new1(&snd_echo_pcm_output_gain, chip)); | ||
2056 | if (err < 0) | ||
2057 | goto ctl_error; | ||
2058 | #endif /* ECHOCARD_HAS_VMIXER */ | ||
2037 | 2059 | ||
2038 | #ifdef ECHOCARD_HAS_INPUT_GAIN | 2060 | #ifdef ECHOCARD_HAS_INPUT_GAIN |
2039 | if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_line_input_gain, chip))) < 0) | 2061 | if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_line_input_gain, chip))) < 0) |
diff --git a/sound/pci/echoaudio/mia.c b/sound/pci/echoaudio/mia.c index f3b9b45c9c1b..f05c8c097aa8 100644 --- a/sound/pci/echoaudio/mia.c +++ b/sound/pci/echoaudio/mia.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #define ECHOCARD_HAS_ADAT FALSE | 29 | #define ECHOCARD_HAS_ADAT FALSE |
30 | #define ECHOCARD_HAS_STEREO_BIG_ENDIAN32 | 30 | #define ECHOCARD_HAS_STEREO_BIG_ENDIAN32 |
31 | #define ECHOCARD_HAS_MIDI | 31 | #define ECHOCARD_HAS_MIDI |
32 | #define ECHOCARD_HAS_LINE_OUT_GAIN | ||
32 | 33 | ||
33 | /* Pipe indexes */ | 34 | /* Pipe indexes */ |
34 | #define PX_ANALOG_OUT 0 /* 8 */ | 35 | #define PX_ANALOG_OUT 0 /* 8 */ |
diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c index 36e08bd2b3cc..6b8ae7b5cd54 100644 --- a/sound/pci/emu10k1/emu10k1x.c +++ b/sound/pci/emu10k1/emu10k1x.c | |||
@@ -1040,8 +1040,7 @@ static void snd_emu10k1x_proc_reg_write(struct snd_info_entry *entry, | |||
1040 | if (sscanf(line, "%x %x %x", ®, &channel_id, &val) != 3) | 1040 | if (sscanf(line, "%x %x %x", ®, &channel_id, &val) != 3) |
1041 | continue; | 1041 | continue; |
1042 | 1042 | ||
1043 | if ((reg < 0x49) && (reg >= 0) && (val <= 0xffffffff) | 1043 | if (reg < 0x49 && val <= 0xffffffff && channel_id <= 2) |
1044 | && (channel_id >= 0) && (channel_id <= 2) ) | ||
1045 | snd_emu10k1x_ptr_write(emu, reg, channel_id, val); | 1044 | snd_emu10k1x_ptr_write(emu, reg, channel_id, val); |
1046 | } | 1045 | } |
1047 | } | 1046 | } |
diff --git a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c index b0fb6c917c38..05afe06e353a 100644 --- a/sound/pci/emu10k1/emumixer.c +++ b/sound/pci/emu10k1/emumixer.c | |||
@@ -1818,8 +1818,8 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu, | |||
1818 | "Master Playback Switch", "Master Capture Switch", | 1818 | "Master Playback Switch", "Master Capture Switch", |
1819 | "Master Playback Volume", "Master Capture Volume", | 1819 | "Master Playback Volume", "Master Capture Volume", |
1820 | "Wave Master Playback Volume", "Master Playback Volume", | 1820 | "Wave Master Playback Volume", "Master Playback Volume", |
1821 | "PC Speaker Playback Switch", "PC Speaker Capture Switch", | 1821 | "Beep Playback Switch", "Beep Capture Switch", |
1822 | "PC Speaker Playback Volume", "PC Speaker Capture Volume", | 1822 | "Beep Playback Volume", "Beep Capture Volume", |
1823 | "Phone Playback Switch", "Phone Capture Switch", | 1823 | "Phone Playback Switch", "Phone Capture Switch", |
1824 | "Phone Playback Volume", "Phone Capture Volume", | 1824 | "Phone Playback Volume", "Phone Capture Volume", |
1825 | "Mic Playback Switch", "Mic Capture Switch", | 1825 | "Mic Playback Switch", "Mic Capture Switch", |
diff --git a/sound/pci/emu10k1/emuproc.c b/sound/pci/emu10k1/emuproc.c index 216f9748aff5..baa7cd508cd8 100644 --- a/sound/pci/emu10k1/emuproc.c +++ b/sound/pci/emu10k1/emuproc.c | |||
@@ -451,7 +451,7 @@ static void snd_emu_proc_io_reg_write(struct snd_info_entry *entry, | |||
451 | while (!snd_info_get_line(buffer, line, sizeof(line))) { | 451 | while (!snd_info_get_line(buffer, line, sizeof(line))) { |
452 | if (sscanf(line, "%x %x", ®, &val) != 2) | 452 | if (sscanf(line, "%x %x", ®, &val) != 2) |
453 | continue; | 453 | continue; |
454 | if ((reg < 0x40) && (reg >= 0) && (val <= 0xffffffff) ) { | 454 | if (reg < 0x40 && val <= 0xffffffff) { |
455 | spin_lock_irqsave(&emu->emu_lock, flags); | 455 | spin_lock_irqsave(&emu->emu_lock, flags); |
456 | outl(val, emu->port + (reg & 0xfffffffc)); | 456 | outl(val, emu->port + (reg & 0xfffffffc)); |
457 | spin_unlock_irqrestore(&emu->emu_lock, flags); | 457 | spin_unlock_irqrestore(&emu->emu_lock, flags); |
@@ -527,7 +527,7 @@ static void snd_emu_proc_ptr_reg_write(struct snd_info_entry *entry, | |||
527 | while (!snd_info_get_line(buffer, line, sizeof(line))) { | 527 | while (!snd_info_get_line(buffer, line, sizeof(line))) { |
528 | if (sscanf(line, "%x %x %x", ®, &channel_id, &val) != 3) | 528 | if (sscanf(line, "%x %x %x", ®, &channel_id, &val) != 3) |
529 | continue; | 529 | continue; |
530 | if ((reg < 0xa0) && (reg >= 0) && (val <= 0xffffffff) && (channel_id >= 0) && (channel_id <= 3) ) | 530 | if (reg < 0xa0 && val <= 0xffffffff && channel_id <= 3) |
531 | snd_ptr_write(emu, iobase, reg, channel_id, val); | 531 | snd_ptr_write(emu, iobase, reg, channel_id, val); |
532 | } | 532 | } |
533 | } | 533 | } |
diff --git a/sound/pci/emu10k1/io.c b/sound/pci/emu10k1/io.c index c1a5aa15af8f..5ef7080e14d0 100644 --- a/sound/pci/emu10k1/io.c +++ b/sound/pci/emu10k1/io.c | |||
@@ -256,7 +256,7 @@ int snd_emu1010_fpga_write(struct snd_emu10k1 * emu, u32 reg, u32 value) | |||
256 | if (reg > 0x3f) | 256 | if (reg > 0x3f) |
257 | return 1; | 257 | return 1; |
258 | reg += 0x40; /* 0x40 upwards are registers. */ | 258 | reg += 0x40; /* 0x40 upwards are registers. */ |
259 | if (value < 0 || value > 0x3f) /* 0 to 0x3f are values */ | 259 | if (value > 0x3f) /* 0 to 0x3f are values */ |
260 | return 1; | 260 | return 1; |
261 | spin_lock_irqsave(&emu->emu_lock, flags); | 261 | spin_lock_irqsave(&emu->emu_lock, flags); |
262 | outl(reg, emu->port + A_IOCFG); | 262 | outl(reg, emu->port + A_IOCFG); |
diff --git a/sound/pci/es1938.c b/sound/pci/es1938.c index 820318ee62c1..fb83e1ffa5cb 100644 --- a/sound/pci/es1938.c +++ b/sound/pci/es1938.c | |||
@@ -1387,7 +1387,7 @@ ES1938_DOUBLE_TLV("Aux Playback Volume", 0, 0x3a, 0x3a, 4, 0, 15, 0, | |||
1387 | db_scale_line), | 1387 | db_scale_line), |
1388 | ES1938_DOUBLE_TLV("Capture Volume", 0, 0xb4, 0xb4, 4, 0, 15, 0, | 1388 | ES1938_DOUBLE_TLV("Capture Volume", 0, 0xb4, 0xb4, 4, 0, 15, 0, |
1389 | db_scale_capture), | 1389 | db_scale_capture), |
1390 | ES1938_SINGLE("PC Speaker Volume", 0, 0x3c, 0, 7, 0), | 1390 | ES1938_SINGLE("Beep Volume", 0, 0x3c, 0, 7, 0), |
1391 | ES1938_SINGLE("Record Monitor", 0, 0xa8, 3, 1, 0), | 1391 | ES1938_SINGLE("Record Monitor", 0, 0xa8, 3, 1, 0), |
1392 | ES1938_SINGLE("Capture Switch", 0, 0x1c, 4, 1, 1), | 1392 | ES1938_SINGLE("Capture Switch", 0, 0x1c, 4, 1, 1), |
1393 | { | 1393 | { |
diff --git a/sound/pci/hda/patch_cmedia.c b/sound/pci/hda/patch_cmedia.c index 780e1a72114a..85c81feb10cf 100644 --- a/sound/pci/hda/patch_cmedia.c +++ b/sound/pci/hda/patch_cmedia.c | |||
@@ -197,8 +197,8 @@ static struct snd_kcontrol_new cmi9880_basic_mixer[] = { | |||
197 | HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0, HDA_INPUT), | 197 | HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0, HDA_INPUT), |
198 | HDA_CODEC_MUTE("Capture Switch", 0x08, 0, HDA_INPUT), | 198 | HDA_CODEC_MUTE("Capture Switch", 0x08, 0, HDA_INPUT), |
199 | HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0, HDA_INPUT), | 199 | HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0, HDA_INPUT), |
200 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x23, 0, HDA_OUTPUT), | 200 | HDA_CODEC_VOLUME("Beep Playback Volume", 0x23, 0, HDA_OUTPUT), |
201 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x23, 0, HDA_OUTPUT), | 201 | HDA_CODEC_MUTE("Beep Playback Switch", 0x23, 0, HDA_OUTPUT), |
202 | { } /* end */ | 202 | { } /* end */ |
203 | }; | 203 | }; |
204 | 204 | ||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 5d7b882bd68c..49de107db16b 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -7337,8 +7337,8 @@ static struct snd_kcontrol_new alc882_macpro_mixer[] = { | |||
7337 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x01, HDA_INPUT), | 7337 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x01, HDA_INPUT), |
7338 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x01, HDA_INPUT), | 7338 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x01, HDA_INPUT), |
7339 | /* FIXME: this looks suspicious... | 7339 | /* FIXME: this looks suspicious... |
7340 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x02, HDA_INPUT), | 7340 | HDA_CODEC_VOLUME("Beep Playback Volume", 0x0b, 0x02, HDA_INPUT), |
7341 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x02, HDA_INPUT), | 7341 | HDA_CODEC_MUTE("Beep Playback Switch", 0x0b, 0x02, HDA_INPUT), |
7342 | */ | 7342 | */ |
7343 | { } /* end */ | 7343 | { } /* end */ |
7344 | }; | 7344 | }; |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 2d3e2e415eb0..8d65d2b25234 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -3226,7 +3226,7 @@ static int stac92xx_auto_create_beep_ctls(struct hda_codec *codec, | |||
3226 | /* check for mute support for the the amp */ | 3226 | /* check for mute support for the the amp */ |
3227 | if ((caps & AC_AMPCAP_MUTE) >> AC_AMPCAP_MUTE_SHIFT) { | 3227 | if ((caps & AC_AMPCAP_MUTE) >> AC_AMPCAP_MUTE_SHIFT) { |
3228 | err = stac92xx_add_control(spec, STAC_CTL_WIDGET_MUTE, | 3228 | err = stac92xx_add_control(spec, STAC_CTL_WIDGET_MUTE, |
3229 | "PC Beep Playback Switch", | 3229 | "Beep Playback Switch", |
3230 | HDA_COMPOSE_AMP_VAL(nid, 1, 0, HDA_OUTPUT)); | 3230 | HDA_COMPOSE_AMP_VAL(nid, 1, 0, HDA_OUTPUT)); |
3231 | if (err < 0) | 3231 | if (err < 0) |
3232 | return err; | 3232 | return err; |
@@ -3235,7 +3235,7 @@ static int stac92xx_auto_create_beep_ctls(struct hda_codec *codec, | |||
3235 | /* check to see if there is volume support for the amp */ | 3235 | /* check to see if there is volume support for the amp */ |
3236 | if ((caps & AC_AMPCAP_NUM_STEPS) >> AC_AMPCAP_NUM_STEPS_SHIFT) { | 3236 | if ((caps & AC_AMPCAP_NUM_STEPS) >> AC_AMPCAP_NUM_STEPS_SHIFT) { |
3237 | err = stac92xx_add_control(spec, STAC_CTL_WIDGET_VOL, | 3237 | err = stac92xx_add_control(spec, STAC_CTL_WIDGET_VOL, |
3238 | "PC Beep Playback Volume", | 3238 | "Beep Playback Volume", |
3239 | HDA_COMPOSE_AMP_VAL(nid, 1, 0, HDA_OUTPUT)); | 3239 | HDA_COMPOSE_AMP_VAL(nid, 1, 0, HDA_OUTPUT)); |
3240 | if (err < 0) | 3240 | if (err < 0) |
3241 | return err; | 3241 | return err; |
@@ -3276,7 +3276,7 @@ static struct snd_kcontrol_new stac92xx_dig_beep_ctrl = { | |||
3276 | static int stac92xx_beep_switch_ctl(struct hda_codec *codec) | 3276 | static int stac92xx_beep_switch_ctl(struct hda_codec *codec) |
3277 | { | 3277 | { |
3278 | return stac92xx_add_control_temp(codec->spec, &stac92xx_dig_beep_ctrl, | 3278 | return stac92xx_add_control_temp(codec->spec, &stac92xx_dig_beep_ctrl, |
3279 | 0, "PC Beep Playback Switch", 0); | 3279 | 0, "Beep Playback Switch", 0); |
3280 | } | 3280 | } |
3281 | #endif | 3281 | #endif |
3282 | 3282 | ||
diff --git a/sound/pci/ice1712/amp.c b/sound/pci/ice1712/amp.c index 37564300b50d..6da21a2bcade 100644 --- a/sound/pci/ice1712/amp.c +++ b/sound/pci/ice1712/amp.c | |||
@@ -52,11 +52,13 @@ static int __devinit snd_vt1724_amp_init(struct snd_ice1712 *ice) | |||
52 | 52 | ||
53 | /* only use basic functionality for now */ | 53 | /* only use basic functionality for now */ |
54 | 54 | ||
55 | ice->num_total_dacs = 2; /* only PSDOUT0 is connected */ | 55 | /* VT1616 6ch codec connected to PSDOUT0 using packed mode */ |
56 | ice->num_total_dacs = 6; | ||
56 | ice->num_total_adcs = 2; | 57 | ice->num_total_adcs = 2; |
57 | 58 | ||
58 | /* Chaintech AV-710 has another codecs, which need initialization */ | 59 | /* Chaintech AV-710 has another WM8728 codec connected to PSDOUT4 |
59 | /* initialize WM8728 codec */ | 60 | (shared with the SPDIF output). Mixer control for this codec |
61 | is not yet supported. */ | ||
60 | if (ice->eeprom.subvendor == VT1724_SUBDEVICE_AV710) { | 62 | if (ice->eeprom.subvendor == VT1724_SUBDEVICE_AV710) { |
61 | for (i = 0; i < ARRAY_SIZE(wm_inits); i += 2) | 63 | for (i = 0; i < ARRAY_SIZE(wm_inits); i += 2) |
62 | wm_put(ice, wm_inits[i], wm_inits[i+1]); | 64 | wm_put(ice, wm_inits[i], wm_inits[i+1]); |
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c index cecf1ffeeaaa..d74033a2cfbe 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 | ||
2261 | static struct snd_kcontrol_new snd_ice1712_mixer_pro_peak __devinitdata = { | 2261 | static 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 af6e00148621..10fc92c05574 100644 --- a/sound/pci/ice1712/ice1724.c +++ b/sound/pci/ice1712/ice1724.c | |||
@@ -648,7 +648,7 @@ static int snd_vt1724_set_pro_rate(struct snd_ice1712 *ice, unsigned int rate, | |||
648 | (inb(ICEMT1724(ice, DMA_PAUSE)) & DMA_PAUSES)) { | 648 | (inb(ICEMT1724(ice, DMA_PAUSE)) & DMA_PAUSES)) { |
649 | /* running? we cannot change the rate now... */ | 649 | /* running? we cannot change the rate now... */ |
650 | spin_unlock_irqrestore(&ice->reg_lock, flags); | 650 | spin_unlock_irqrestore(&ice->reg_lock, flags); |
651 | return -EBUSY; | 651 | return ((rate == ice->cur_rate) && !force) ? 0 : -EBUSY; |
652 | } | 652 | } |
653 | if (!force && is_pro_rate_locked(ice)) { | 653 | if (!force && is_pro_rate_locked(ice)) { |
654 | spin_unlock_irqrestore(&ice->reg_lock, flags); | 654 | spin_unlock_irqrestore(&ice->reg_lock, flags); |
@@ -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 | ||
2112 | static struct snd_kcontrol_new snd_vt1724_mixer_pro_peak __devinitdata = { | 2112 | static 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/intel8x0.c b/sound/pci/intel8x0.c index 171ada535209..754867ed4785 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c | |||
@@ -1954,6 +1954,18 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = { | |||
1954 | .name = "Sony S1XP", | 1954 | .name = "Sony S1XP", |
1955 | .type = AC97_TUNE_INV_EAPD | 1955 | .type = AC97_TUNE_INV_EAPD |
1956 | }, | 1956 | }, |
1957 | { | ||
1958 | .subvendor = 0x104d, | ||
1959 | .subdevice = 0x81c0, | ||
1960 | .name = "Sony VAIO VGN-T350P", /*AD1981B*/ | ||
1961 | .type = AC97_TUNE_INV_EAPD | ||
1962 | }, | ||
1963 | { | ||
1964 | .subvendor = 0x104d, | ||
1965 | .subdevice = 0x81c5, | ||
1966 | .name = "Sony VAIO VGN-B1VP", /*AD1981B*/ | ||
1967 | .type = AC97_TUNE_INV_EAPD | ||
1968 | }, | ||
1957 | { | 1969 | { |
1958 | .subvendor = 0x1043, | 1970 | .subvendor = 0x1043, |
1959 | .subdevice = 0x80f3, | 1971 | .subdevice = 0x80f3, |
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index acfa4760da49..8a332d2f615c 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c | |||
@@ -386,6 +386,7 @@ struct via82xx { | |||
386 | 386 | ||
387 | struct snd_pcm *pcms[2]; | 387 | struct snd_pcm *pcms[2]; |
388 | struct snd_rawmidi *rmidi; | 388 | struct snd_rawmidi *rmidi; |
389 | struct snd_kcontrol *dxs_controls[4]; | ||
389 | 390 | ||
390 | struct snd_ac97_bus *ac97_bus; | 391 | struct snd_ac97_bus *ac97_bus; |
391 | struct snd_ac97 *ac97; | 392 | struct snd_ac97 *ac97; |
@@ -1216,9 +1217,9 @@ static int snd_via82xx_pcm_open(struct via82xx *chip, struct viadev *viadev, | |||
1216 | 1217 | ||
1217 | 1218 | ||
1218 | /* | 1219 | /* |
1219 | * open callback for playback on via686 and via823x DSX | 1220 | * open callback for playback on via686 |
1220 | */ | 1221 | */ |
1221 | static int snd_via82xx_playback_open(struct snd_pcm_substream *substream) | 1222 | static int snd_via686_playback_open(struct snd_pcm_substream *substream) |
1222 | { | 1223 | { |
1223 | struct via82xx *chip = snd_pcm_substream_chip(substream); | 1224 | struct via82xx *chip = snd_pcm_substream_chip(substream); |
1224 | struct viadev *viadev = &chip->devs[chip->playback_devno + substream->number]; | 1225 | struct viadev *viadev = &chip->devs[chip->playback_devno + substream->number]; |
@@ -1230,6 +1231,32 @@ static int snd_via82xx_playback_open(struct snd_pcm_substream *substream) | |||
1230 | } | 1231 | } |
1231 | 1232 | ||
1232 | /* | 1233 | /* |
1234 | * open callback for playback on via823x DXS | ||
1235 | */ | ||
1236 | static int snd_via8233_playback_open(struct snd_pcm_substream *substream) | ||
1237 | { | ||
1238 | struct via82xx *chip = snd_pcm_substream_chip(substream); | ||
1239 | struct viadev *viadev; | ||
1240 | unsigned int stream; | ||
1241 | int err; | ||
1242 | |||
1243 | viadev = &chip->devs[chip->playback_devno + substream->number]; | ||
1244 | if ((err = snd_via82xx_pcm_open(chip, viadev, substream)) < 0) | ||
1245 | return err; | ||
1246 | stream = viadev->reg_offset / 0x10; | ||
1247 | if (chip->dxs_controls[stream]) { | ||
1248 | chip->playback_volume[stream][0] = 0; | ||
1249 | chip->playback_volume[stream][1] = 0; | ||
1250 | chip->dxs_controls[stream]->vd[0].access &= | ||
1251 | ~SNDRV_CTL_ELEM_ACCESS_INACTIVE; | ||
1252 | snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE | | ||
1253 | SNDRV_CTL_EVENT_MASK_INFO, | ||
1254 | &chip->dxs_controls[stream]->id); | ||
1255 | } | ||
1256 | return 0; | ||
1257 | } | ||
1258 | |||
1259 | /* | ||
1233 | * open callback for playback on via823x multi-channel | 1260 | * open callback for playback on via823x multi-channel |
1234 | */ | 1261 | */ |
1235 | static int snd_via8233_multi_open(struct snd_pcm_substream *substream) | 1262 | static int snd_via8233_multi_open(struct snd_pcm_substream *substream) |
@@ -1302,10 +1329,26 @@ static int snd_via82xx_pcm_close(struct snd_pcm_substream *substream) | |||
1302 | return 0; | 1329 | return 0; |
1303 | } | 1330 | } |
1304 | 1331 | ||
1332 | static int snd_via8233_playback_close(struct snd_pcm_substream *substream) | ||
1333 | { | ||
1334 | struct via82xx *chip = snd_pcm_substream_chip(substream); | ||
1335 | struct viadev *viadev = substream->runtime->private_data; | ||
1336 | unsigned int stream; | ||
1337 | |||
1338 | stream = viadev->reg_offset / 0x10; | ||
1339 | if (chip->dxs_controls[stream]) { | ||
1340 | chip->dxs_controls[stream]->vd[0].access |= | ||
1341 | SNDRV_CTL_ELEM_ACCESS_INACTIVE; | ||
1342 | snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_INFO, | ||
1343 | &chip->dxs_controls[stream]->id); | ||
1344 | } | ||
1345 | return snd_via82xx_pcm_close(substream); | ||
1346 | } | ||
1347 | |||
1305 | 1348 | ||
1306 | /* via686 playback callbacks */ | 1349 | /* via686 playback callbacks */ |
1307 | static struct snd_pcm_ops snd_via686_playback_ops = { | 1350 | static struct snd_pcm_ops snd_via686_playback_ops = { |
1308 | .open = snd_via82xx_playback_open, | 1351 | .open = snd_via686_playback_open, |
1309 | .close = snd_via82xx_pcm_close, | 1352 | .close = snd_via82xx_pcm_close, |
1310 | .ioctl = snd_pcm_lib_ioctl, | 1353 | .ioctl = snd_pcm_lib_ioctl, |
1311 | .hw_params = snd_via82xx_hw_params, | 1354 | .hw_params = snd_via82xx_hw_params, |
@@ -1331,8 +1374,8 @@ static struct snd_pcm_ops snd_via686_capture_ops = { | |||
1331 | 1374 | ||
1332 | /* via823x DSX playback callbacks */ | 1375 | /* via823x DSX playback callbacks */ |
1333 | static struct snd_pcm_ops snd_via8233_playback_ops = { | 1376 | static struct snd_pcm_ops snd_via8233_playback_ops = { |
1334 | .open = snd_via82xx_playback_open, | 1377 | .open = snd_via8233_playback_open, |
1335 | .close = snd_via82xx_pcm_close, | 1378 | .close = snd_via8233_playback_close, |
1336 | .ioctl = snd_pcm_lib_ioctl, | 1379 | .ioctl = snd_pcm_lib_ioctl, |
1337 | .hw_params = snd_via82xx_hw_params, | 1380 | .hw_params = snd_via82xx_hw_params, |
1338 | .hw_free = snd_via82xx_hw_free, | 1381 | .hw_free = snd_via82xx_hw_free, |
@@ -1626,7 +1669,7 @@ static int snd_via8233_dxs_volume_get(struct snd_kcontrol *kcontrol, | |||
1626 | struct snd_ctl_elem_value *ucontrol) | 1669 | struct snd_ctl_elem_value *ucontrol) |
1627 | { | 1670 | { |
1628 | struct via82xx *chip = snd_kcontrol_chip(kcontrol); | 1671 | struct via82xx *chip = snd_kcontrol_chip(kcontrol); |
1629 | unsigned int idx = snd_ctl_get_ioff(kcontrol, &ucontrol->id); | 1672 | unsigned int idx = kcontrol->id.subdevice; |
1630 | 1673 | ||
1631 | ucontrol->value.integer.value[0] = VIA_DXS_MAX_VOLUME - chip->playback_volume[idx][0]; | 1674 | 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]; | 1675 | ucontrol->value.integer.value[1] = VIA_DXS_MAX_VOLUME - chip->playback_volume[idx][1]; |
@@ -1646,7 +1689,7 @@ static int snd_via8233_dxs_volume_put(struct snd_kcontrol *kcontrol, | |||
1646 | struct snd_ctl_elem_value *ucontrol) | 1689 | struct snd_ctl_elem_value *ucontrol) |
1647 | { | 1690 | { |
1648 | struct via82xx *chip = snd_kcontrol_chip(kcontrol); | 1691 | struct via82xx *chip = snd_kcontrol_chip(kcontrol); |
1649 | unsigned int idx = snd_ctl_get_ioff(kcontrol, &ucontrol->id); | 1692 | unsigned int idx = kcontrol->id.subdevice; |
1650 | unsigned long port = chip->port + 0x10 * idx; | 1693 | unsigned long port = chip->port + 0x10 * idx; |
1651 | unsigned char val; | 1694 | unsigned char val; |
1652 | int i, change = 0; | 1695 | int i, change = 0; |
@@ -1705,11 +1748,13 @@ static struct snd_kcontrol_new snd_via8233_pcmdxs_volume_control __devinitdata = | |||
1705 | }; | 1748 | }; |
1706 | 1749 | ||
1707 | static struct snd_kcontrol_new snd_via8233_dxs_volume_control __devinitdata = { | 1750 | static struct snd_kcontrol_new snd_via8233_dxs_volume_control __devinitdata = { |
1708 | .name = "VIA DXS Playback Volume", | 1751 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, |
1709 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 1752 | .device = 0, |
1710 | .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | | 1753 | /* .subdevice set later */ |
1711 | SNDRV_CTL_ELEM_ACCESS_TLV_READ), | 1754 | .name = "PCM Playback Volume", |
1712 | .count = 4, | 1755 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | |
1756 | SNDRV_CTL_ELEM_ACCESS_TLV_READ | | ||
1757 | SNDRV_CTL_ELEM_ACCESS_INACTIVE, | ||
1713 | .info = snd_via8233_dxs_volume_info, | 1758 | .info = snd_via8233_dxs_volume_info, |
1714 | .get = snd_via8233_dxs_volume_get, | 1759 | .get = snd_via8233_dxs_volume_get, |
1715 | .put = snd_via8233_dxs_volume_put, | 1760 | .put = snd_via8233_dxs_volume_put, |
@@ -1936,10 +1981,19 @@ static int __devinit snd_via8233_init_misc(struct via82xx *chip) | |||
1936 | } | 1981 | } |
1937 | else /* Using DXS when PCM emulation is enabled is really weird */ | 1982 | else /* Using DXS when PCM emulation is enabled is really weird */ |
1938 | { | 1983 | { |
1939 | /* Standalone DXS controls */ | 1984 | for (i = 0; i < 4; ++i) { |
1940 | err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_via8233_dxs_volume_control, chip)); | 1985 | struct snd_kcontrol *kctl; |
1941 | if (err < 0) | 1986 | |
1942 | return err; | 1987 | kctl = snd_ctl_new1( |
1988 | &snd_via8233_dxs_volume_control, chip); | ||
1989 | if (!kctl) | ||
1990 | return -ENOMEM; | ||
1991 | kctl->id.subdevice = i; | ||
1992 | err = snd_ctl_add(chip->card, kctl); | ||
1993 | if (err < 0) | ||
1994 | return err; | ||
1995 | chip->dxs_controls[i] = kctl; | ||
1996 | } | ||
1943 | } | 1997 | } |
1944 | } | 1998 | } |
1945 | /* select spdif data slot 10/11 */ | 1999 | /* select spdif data slot 10/11 */ |