sound fixes for 4.18-rc1
Linus,
please pull sound fixes for v4.18-rc1 from:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git tags/sound-fix-4.18-rc1
The topmost commit is ad6baae6238136d9380ba95aa1646ab8b2fa52f5
----------------------------------------------------------------
sound fixes for 4.18-rc1
Here is a collection of small fixes on top of the previous update. All small and obvious fixes. Mostly for usual suspects, USB-audio and HD-audio, but a few trivial error handling fixes for misc drivers as well.
----------------------------------------------------------------
Dennis Wassenberg (2):
ALSA: hda: add dock and led support for HP EliteBook 830 G5
ALSA: hda: add dock and led support for HP ProBook 640 G4
Jorge Sanjuan (4):
ALSA: usb-audio: Add bi-directional terminal types
ALSA: usb-audio: Change in connectors control creation interface
ALSA: usb-audio: Add insertion control for UAC3 BADD
ALSA: usb-audio: Always create the interrupt pipe for the mixer
Jussi Laako (3):
ALSA: usb-audio: Add native DSD support for Mytek DACs
ALSA: usb-audio: Generic DSD detection for XMOS-based implementations
ALSA: usb-audio: Remove explicitly listed Mytek devices
Takashi Iwai (2):
ALSA: usb-audio: Disable the quirk for Nura headset
ALSA: hda/realtek - Add shutup hint
Zhouyang Jia (4):
ALSA: fm801: add error handling for snd_ctl_add
ALSA: emu10k1: add error handling for snd_ctl_add
ALSA: sonicvibes: add error handling for snd_ctl_add
ALSA: lx6464es: add error handling for pci_ioremap_bar
--- include/uapi/linux/usb/audio.h | 8 ++++++++ sound/pci/emu10k1/emupcm.c | 4 +++- sound/pci/fm801.c | 16 +++++++++++---- sound/pci/hda/patch_conexant.c | 2 ++ sound/pci/hda/patch_realtek.c | 3 +++ sound/pci/lx6464es/lx6464es.c | 7 +++++++ sound/pci/sonicvibes.c | 12 +++++++++-- sound/usb/card.h | 1 + sound/usb/format.c | 5 ++++- sound/usb/mixer.c | 45 ++++++++++++++++++++++++++++++------------ sound/usb/quirks-table.h | 5 +++++ sound/usb/quirks.c | 19 +++++++++++++----- 12 files changed, 101 insertions(+), 26 deletions(-)
include/uapi/linux/usb/audio.h +8 -0
@@ -230,6 +230,14 @@ struct uac1_output_terminal_descriptor {#define UAC_OUTPUT_TERMINAL_COMMUNICATION_SPEAKER 0x306#define UAC_OUTPUT_TERMINAL_LOW_FREQ_EFFECTS_SPEAKER 0x307 +/* Terminals - 2.4 Bi-directional Terminal Types */ +#define UAC_BIDIR_TERMINAL_UNDEFINED 0x400 +#define UAC_BIDIR_TERMINAL_HANDSET 0x401 +#define UAC_BIDIR_TERMINAL_HEADSET 0x402 +#define UAC_BIDIR_TERMINAL_SPEAKER_PHONE 0x403 +#define UAC_BIDIR_TERMINAL_ECHO_SUPPRESSING 0x404 +#define UAC_BIDIR_TERMINAL_ECHO_CANCELING 0x405 +/* Set bControlSize = 2 as default setting */ #define UAC_DT_FEATURE_UNIT_SIZE (ch) (7 + ((ch) + 1) * 2)
sound/pci/emu10k1/emupcm.c +3 -1
@@ -1858,7 +1858,9 @@ int snd_emu10k1_pcm_efx(struct snd_emu10k1 *emu, int device)if (!kctl)return -ENOMEM ; kctl->id.device = device; -snd_ctl_add (emu->card, kctl); + err =snd_ctl_add (emu->card, kctl); +if (err <0 ) +return err;snd_pcm_lib_preallocate_pages_for_all (pcm,SNDRV_DMA_TYPE_DEV ,snd_dma_pci_data (emu->pci),64 *1024 ,64 *1024 );
sound/pci/fm801.c +12 -4
@@ -1068,11 +1068,19 @@ static int snd_fm801_mixer(struct fm801 *chip)if ((err =snd_ac97_mixer (chip->ac97_bus, &ac97, &chip->ac97_sec)) <0 )return err; } -for (i =0 ; i <FM801_CONTROLS ; i++) -snd_ctl_add (chip->card,snd_ctl_new1 (&snd_fm801_controls[i], chip)); +for (i =0 ; i <FM801_CONTROLS ; i++) { + err =snd_ctl_add (chip->card, +snd_ctl_new1 (&snd_fm801_controls[i], chip)); +if (err <0 ) +return err; + }if (chip->multichannel) { -for (i =0 ; i <FM801_CONTROLS_MULTI ; i++) -snd_ctl_add (chip->card,snd_ctl_new1 (&snd_fm801_controls_multi[i], chip)); +for (i =0 ; i <FM801_CONTROLS_MULTI ; i++) { + err =snd_ctl_add (chip->card, +snd_ctl_new1 (&snd_fm801_controls_multi[i], chip)); +if (err <0 ) +return err; + } }return 0 ; }
sound/pci/hda/patch_conexant.c +2 -0
@@ -958,6 +958,8 @@ static const struct snd_pci_quirk cxt5066_fixups[] = {SND_PCI_QUIRK (0x103c ,0x8079 ,"HP EliteBook 840 G3" ,CXT_FIXUP_HP_DOCK ),SND_PCI_QUIRK (0x103c ,0x807C ,"HP EliteBook 820 G3" ,CXT_FIXUP_HP_DOCK ),SND_PCI_QUIRK (0x103c ,0x80FD ,"HP ProBook 640 G2" ,CXT_FIXUP_HP_DOCK ), +SND_PCI_QUIRK (0x103c ,0x83b3 ,"HP EliteBook 830 G5" ,CXT_FIXUP_HP_DOCK ), +SND_PCI_QUIRK (0x103c ,0x83d3 ,"HP ProBook 640 G4" ,CXT_FIXUP_HP_DOCK ),SND_PCI_QUIRK (0x103c ,0x8174 ,"HP Spectre x360" ,CXT_FIXUP_HP_SPECTRE ),SND_PCI_QUIRK (0x103c ,0x8115 ,"HP Z1 Gen3" ,CXT_FIXUP_HP_GATE_MIC ), SND_PCI_QUIRK(0x103c, 0x814f, "HP ZBook 15u G3", CXT_FIXUP_MUTE_LED_GPIO),
sound/pci/hda/patch_realtek.c +3 -0
@@ -793,6 +793,9 @@ static inline void alc_shutup(struct hda_codec *codec) {struct alc_spec *spec = codec->spec; +if (!snd_hda_get_bool_hint (codec,"shutup" )) +return ;/* disabled explicitly by hints */ +if (spec && spec->shutup) spec->shutup (codec);else
sound/pci/lx6464es/lx6464es.c +7 -0
@@ -1016,6 +1016,10 @@ static int snd_lx6464es_create(struct snd_card *card,/* dsp port */ chip->port_dsp_bar =pci_ioremap_bar (pci,2 ); +if (!chip->port_dsp_bar) { +dev_err (card->dev,"cannot remap PCI memory region\n" ); + goto remap_pci_failed; + } err =request_threaded_irq (pci->irq, lx_interrupt, lx_threaded_irq,IRQF_SHARED ,KBUILD_MODNAME , chip);
@@ -1055,6 +1059,9 @@ static int snd_lx6464es_create(struct snd_card *card,free_irq (pci->irq, chip); request_irq_failed: +iounmap (chip->port_dsp_bar); + +remap_pci_failed:pci_release_regions (pci); request_regions_failed:
sound/pci/sonicvibes.c +10 -2
@@ -1188,6 +1188,7 @@ SONICVIBES_SINGLE("Joystick Speed", 0, SV_IREG_GAME_PORT, 1, 15, 0);static int snd_sonicvibes_create_gameport (struct sonicvibes *sonic) {struct gameport *gp; +int err; sonic->gameport = gp =gameport_allocate_port ();if (!gp) {
@@ -1203,7 +1204,10 @@ static int snd_sonicvibes_create_gameport(struct sonicvibes *sonic)gameport_register_port (gp); -snd_ctl_add (sonic->card,snd_ctl_new1 (&snd_sonicvibes_game_control, sonic)); + err =snd_ctl_add (sonic->card, +snd_ctl_new1 (&snd_sonicvibes_game_control, sonic)); +if (err <0 ) +return err;return 0 ; }
@@ -1515,7 +1519,11 @@ static int snd_sonic_probe(struct pci_dev *pci,return err; } -snd_sonicvibes_create_gameport (sonic); + err =snd_sonicvibes_create_gameport (sonic); +if (err <0 ) { +snd_card_free (card); +return err; + }if ((err =snd_card_register (card)) <0 ) {snd_card_free (card);
sound/usb/card.h +1 -0
@@ -32,6 +32,7 @@ struct audioformat {struct snd_pcm_chmap_elem *chmap;/* (optional) channel map */ bool dsd_dop;/* add DOP headers in case of DSD samples */ bool dsd_bitrev;/* reverse the bits of each DSD sample */ +bool dsd_raw;/* altsetting is raw DSD */ };struct snd_usb_substream ;
sound/usb/format.c +4 -1
@@ -64,8 +64,11 @@ static u64 parse_audio_format_i_type(struct snd_usb_audio *chip, sample_width = fmt->bBitResolution; sample_bytes = fmt->bSubslotSize; -if (format &UAC2_FORMAT_TYPE_I_RAW_DATA ) +if (format &UAC2_FORMAT_TYPE_I_RAW_DATA ) { pcm_formats |=SNDRV_PCM_FMTBIT_SPECIAL ; +/* flag potentially raw DSD capable altsettings */ + fp->dsd_raw = true; + } format <<=1 ;break ;
sound/usb/mixer.c +32 -13
112 lines not on this page · raw message
sound/usb/quirks-table.h +5 -0
@@ -3277,6 +3277,10 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"), } }, +/* disabled due to regression for other devices; +* see https://bugzilla.kernel.org/show_bug.cgi?id=199905 +*/ +#if 0 {/* * Nura's first gen headphones use Cambridge Silicon Radio's vendor
@@ -3324,6 +3328,7 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"), } } }, +#endif /* disabled */ {/*
sound/usb/quirks.c +14 -5
@@ -1362,16 +1362,12 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,case USB_ID (0x1511 ,0x0037 ):/* AURALiC VEGA */ case USB_ID (0x20b1 ,0x0002 ):/* Wyred 4 Sound DAC-2 DSD */ case USB_ID (0x20b1 ,0x2004 ):/* Matrix Audio X-SPDIF 2 */ -case USB_ID (0x20b1 ,0x3008 ):/* iFi Audio micro/nano iDSD */ case USB_ID (0x20b1 ,0x2008 ):/* Matrix Audio X-Sabre */ case USB_ID (0x20b1 ,0x300a ):/* Matrix Audio Mini-i Pro */ case USB_ID (0x22d9 ,0x0416 ):/* OPPO HA-1 */ case USB_ID (0x22d9 ,0x0436 ):/* OPPO Sonica */ case USB_ID (0x22d9 ,0x0461 ):/* OPPO UDP-205 */ case USB_ID (0x2522 ,0x0012 ):/* LH Labs VI DAC Infinity */ -case USB_ID (0x25ce ,0x001f ):/* Mytek Brooklyn DAC */ -case USB_ID (0x25ce ,0x0021 ):/* Mytek Manhattan DAC */ -case USB_ID (0x25ce ,0x8025 ):/* Mytek Brooklyn DAC+ */ case USB_ID (0x2772 ,0x0230 ):/* Pro-Ject Pre Box S2 Digital */ if (fp->altsetting ==2 )return SNDRV_PCM_FMTBIT_DSD_U32_BE ;
@@ -1389,7 +1385,6 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,case USB_ID (0x20b1 ,0x3021 ):/* Eastern El. MiniMax Tube DAC Supreme */ case USB_ID (0x20b1 ,0x3023 ):/* Aune X1S 32BIT/384 DSD DAC */ case USB_ID (0x20b1 ,0x302d ):/* Unison Research Unico CD Due */ -case USB_ID (0x20b1 ,0x3036 ):/* Holo Springs Level 3 R2R DAC */ case USB_ID (0x20b1 ,0x307b ):/* CH Precision C1 DAC */ case USB_ID (0x20b1 ,0x3086 ):/* Singxer F-1 converter board */ case USB_ID (0x22d9 ,0x0426 ):/* OPPO HA-2 */
@@ -1443,6 +1438,20 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,return SNDRV_PCM_FMTBIT_DSD_U32_BE ; } +/* Mostly generic method to detect many DSD-capable implementations - +* from XMOS/Thesycon +*/ +switch (USB_ID_VENDOR (chip->usb_id)) { +case 0x20b1 :/* XMOS based devices */ +case 0x25ce :/* Mytek devices */ +if (fp->dsd_raw) +return SNDRV_PCM_FMTBIT_DSD_U32_BE ; +break ; +default : +break ; + + } +return 0 ; }