sound fixes for 4.16-rc2
Linus,
please pull sound fixes for v4.16-rc2 from:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git tags/sound-4.16-rc2
The topmost commit is fdcc968a3b290407bcba9d4c90e2fba6d8d928f1
----------------------------------------------------------------
sound fixes for 4.16-rc2
A collection of usual suspects:
- A handful USB-audio and HD-audio device-specific quirks
- Some trivial fixes for the new AC97 bus stuff
- Another race fix in ALSA sequencer core
----------------------------------------------------------------
Daniel Mack (1):
ALSA: usb: add more device quirks for USB DSD devices
Hui Wang (1):
ALSA: hda - Fix headset mic detection problem for two Dell machines
Jan-Marek Glogowski (1):
ALSA: hda/realtek: PCI quirk for Fujitsu U7x7
Kailang Yang (2):
ALSA: hda/realtek - Add headset mode support for Dell laptop
ALSA: hda/realtek - Enable Thinkpad Dock device for ALC298 platform
Kirill Marinushkin (1):
ALSA: usb-audio: Fix UAC2 get_ctl request with a RANGE attribute
Lassi Ylikojola (1):
ALSA: usb-audio: add implicit fb quirk for Behringer UFX1204
Matthias Lange (1):
ALSA: ac97: Fix copy and paste typo in documentation
Takashi Iwai (1):
ALSA: seq: Fix racy pool initializations
Ulf Magnusson (1):
ALSA: ac97: kconfig: Remove select of undefined symbol AC97
--- include/sound/ac97/regs.h | 2 +- sound/ac97/Kconfig | 1 - sound/core/seq/seq_clientmgr.c | 8 +++-- sound/pci/hda/patch_realtek.c | 72 ++++++++++++++++++++++++++++++++++++++++++ sound/usb/mixer.c | 18 +++++++---- sound/usb/pcm.c | 9 ++++++ sound/usb/quirks.c | 7 ++-- 7 files changed, 104 insertions(+), 13 deletions(-)
include/sound/ac97/regs.h +1 -1
@@ -31,7 +31,7 @@#define AC97_HEADPHONE 0x04/* Headphone Volume (optional) */ #define AC97_MASTER_MONO 0x06/* Master Volume Mono (optional) */ #define AC97_MASTER_TONE 0x08/* Master Tone (Bass & Treble) (optional) */ -#define AC97_PC_BEEP 0x0a/* PC Beep Volume (optinal) */ +#define AC97_PC_BEEP 0x0a/* PC Beep Volume (optional) */ #define AC97_PHONE 0x0c/* Phone Volume (optional) */ #define AC97_MIC 0x0e/* MIC Volume */ #define AC97_LINE 0x10/* Line In Volume */
sound/ac97/Kconfig +0 -1
@@ -5,7 +5,6 @@ config AC97_BUS_NEW tristate - select AC97 help This is the new AC97 bus type, successor of AC97_BUS. The ported drivers which benefit from the AC97 automatic probing should "select"
sound/core/seq/seq_clientmgr.c +6 -2
@@ -1003,7 +1003,7 @@ static ssize_t snd_seq_write(struct file *file, const char __user *buf, {struct snd_seq_client *client = file->private_data;int written =0 , len; -int err = -EINVAL ; +int err;struct snd_seq_event event;if (!(snd_seq_file_flags (file) &SNDRV_SEQ_LFLG_OUTPUT ))
@@ -1018,11 +1018,15 @@ static ssize_t snd_seq_write(struct file *file, const char __user *buf,/* allocate the pool now if the pool is not allocated yet */ if (client->pool->size >0 && !snd_seq_write_pool_allocated (client)) { -if (snd_seq_pool_init (client->pool) <0 ) +mutex_lock (&client->ioctl_mutex); + err =snd_seq_pool_init (client->pool); +mutex_unlock (&client->ioctl_mutex); +if (err <0 )return -ENOMEM ; }/* only process whole events */ + err = -EINVAL ;while (count >=sizeof (struct snd_seq_event )) {/* Read in the event header from the user */ len =sizeof (event);
sound/pci/hda/patch_realtek.c +72 -0
147 lines not on this page · raw message
sound/usb/mixer.c +11 -7
@@ -347,17 +347,20 @@ static int get_ctl_value_v2(struct usb_mixer_elem_info *cval, int request, int validx, int *value_ret) { struct snd_usb_audio *chip = cval->head.mixer->chip; -unsigned char buf[4 +3 *sizeof (__u32)];/* enough space for one range */ +/* enough space for one range */ +unsigned char buf[sizeof (__u16) +3 *sizeof (__u32)];unsigned char *val; -int idx =0 , ret, size; +int idx =0 , ret, val_size, size;__u8 bRequest; + val_size =uac2_ctl_value_size (cval->val_type); +if (request ==UAC_GET_CUR ) { bRequest =UAC2_CS_CUR ; - size =uac2_ctl_value_size (cval->val_type); + size = val_size; }else { bRequest =UAC2_CS_RANGE ; - size =sizeof (buf); + size =sizeof (__u16) +3 * val_size; }memset (buf,0 ,sizeof (buf));
@@ -390,16 +393,17 @@ static int get_ctl_value_v2(struct usb_mixer_elem_info *cval, int request, val = buf +sizeof (__u16);break ;case UAC_GET_MAX : - val = buf +sizeof (__u16) *2 ; + val = buf +sizeof (__u16) + val_size;break ;case UAC_GET_RES : - val = buf +sizeof (__u16) *3 ; + val = buf +sizeof (__u16) + val_size *2 ;break ;default :return -EINVAL ; } - *value_ret =convert_signed_value (cval,snd_usb_combine_bytes (val,sizeof (__u16))); + *value_ret =convert_signed_value (cval, +snd_usb_combine_bytes (val, val_size));return 0 ; }
sound/usb/pcm.c +9 -0
@@ -352,6 +352,15 @@ static int set_sync_ep_implicit_fb_quirk(struct snd_usb_substream *subs, ep =0x86 ; iface =usb_ifnum_to_if (dev,2 ); +if (!iface || iface->num_altsetting ==0 ) +return -EINVAL ; + + alts = &iface->altsetting[1 ]; + goto add_sync_ep; +case USB_ID (0x1397 ,0x0002 ): + ep =0x81 ; + iface =usb_ifnum_to_if (dev,1 ); +if (!iface || iface->num_altsetting ==0 )return -EINVAL ;
sound/usb/quirks.c +5 -2
@@ -1363,8 +1363,11 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,return SNDRV_PCM_FMTBIT_DSD_U32_BE ;break ; -/* Amanero Combo384 USB interface with native DSD support */ -case USB_ID (0x16d0 ,0x071a ): +/* Amanero Combo384 USB based DACs with native DSD support */ +case USB_ID (0x16d0 ,0x071a ):/* Amanero - Combo384 */ +case USB_ID (0x2ab6 ,0x0004 ):/* T+A DAC8DSD-V2.0, MP1000E-V2.0, MP2000R-V2.0, MP2500R-V2.0, MP3100HV-V2.0 */ +case USB_ID (0x2ab6 ,0x0005 ):/* T+A USB HD Audio 1 */ +case USB_ID (0x2ab6 ,0x0006 ):/* T+A USB HD Audio 2 */ if (fp->altsetting ==2 ) {switch (le16_to_cpu (chip->dev->descriptor.bcdDevice)) {case 0x199 :