aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-06-15 04:24:40 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-06-15 04:24:40 -0400
commit2f6e24d3151fb9967774f9721b288f216f3180df (patch)
treeb5fac9c4b02a442324f7cae0fbdcf6c29affa733
parentbecfc5e97cbab00b25a592aabc36838ec7217d1f (diff)
parentad6baae6238136d9380ba95aa1646ab8b2fa52f5 (diff)
Merge tag 'sound-fix-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "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" * tag 'sound-fix-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: usb-audio: Always create the interrupt pipe for the mixer ALSA: usb-audio: Add insertion control for UAC3 BADD ALSA: usb-audio: Change in connectors control creation interface ALSA: usb-audio: Add bi-directional terminal types ALSA: lx6464es: add error handling for pci_ioremap_bar ALSA: sonicvibes: add error handling for snd_ctl_add ALSA: usb-audio: Remove explicitly listed Mytek devices ALSA: usb-audio: Generic DSD detection for XMOS-based implementations ALSA: usb-audio: Add native DSD support for Mytek DACs ALSA: hda/realtek - Add shutup hint ALSA: usb-audio: Disable the quirk for Nura headset ALSA: hda: add dock and led support for HP ProBook 640 G4 ALSA: hda: add dock and led support for HP EliteBook 830 G5 ALSA: emu10k1: add error handling for snd_ctl_add ALSA: fm801: add error handling for snd_ctl_add
-rw-r--r--include/uapi/linux/usb/audio.h8
-rw-r--r--sound/pci/emu10k1/emupcm.c4
-rw-r--r--sound/pci/fm801.c16
-rw-r--r--sound/pci/hda/patch_conexant.c2
-rw-r--r--sound/pci/hda/patch_realtek.c3
-rw-r--r--sound/pci/lx6464es/lx6464es.c7
-rw-r--r--sound/pci/sonicvibes.c12
-rw-r--r--sound/usb/card.h1
-rw-r--r--sound/usb/format.c5
-rw-r--r--sound/usb/mixer.c45
-rw-r--r--sound/usb/quirks-table.h5
-rw-r--r--sound/usb/quirks.c19
12 files changed, 101 insertions, 26 deletions
diff --git a/include/uapi/linux/usb/audio.h b/include/uapi/linux/usb/audio.h
index 13d98e6e0db1..74e520fb944f 100644
--- a/include/uapi/linux/usb/audio.h
+++ b/include/uapi/linux/usb/audio.h
@@ -230,6 +230,14 @@ struct uac1_output_terminal_descriptor {
230#define UAC_OUTPUT_TERMINAL_COMMUNICATION_SPEAKER 0x306 230#define UAC_OUTPUT_TERMINAL_COMMUNICATION_SPEAKER 0x306
231#define UAC_OUTPUT_TERMINAL_LOW_FREQ_EFFECTS_SPEAKER 0x307 231#define UAC_OUTPUT_TERMINAL_LOW_FREQ_EFFECTS_SPEAKER 0x307
232 232
233/* Terminals - 2.4 Bi-directional Terminal Types */
234#define UAC_BIDIR_TERMINAL_UNDEFINED 0x400
235#define UAC_BIDIR_TERMINAL_HANDSET 0x401
236#define UAC_BIDIR_TERMINAL_HEADSET 0x402
237#define UAC_BIDIR_TERMINAL_SPEAKER_PHONE 0x403
238#define UAC_BIDIR_TERMINAL_ECHO_SUPPRESSING 0x404
239#define UAC_BIDIR_TERMINAL_ECHO_CANCELING 0x405
240
233/* Set bControlSize = 2 as default setting */ 241/* Set bControlSize = 2 as default setting */
234#define UAC_DT_FEATURE_UNIT_SIZE(ch) (7 + ((ch) + 1) * 2) 242#define UAC_DT_FEATURE_UNIT_SIZE(ch) (7 + ((ch) + 1) * 2)
235 243
diff --git a/sound/pci/emu10k1/emupcm.c b/sound/pci/emu10k1/emupcm.c
index d39458ab251f..69f9b100bd24 100644
--- a/sound/pci/emu10k1/emupcm.c
+++ b/sound/pci/emu10k1/emupcm.c
@@ -1858,7 +1858,9 @@ int snd_emu10k1_pcm_efx(struct snd_emu10k1 *emu, int device)
1858 if (!kctl) 1858 if (!kctl)
1859 return -ENOMEM; 1859 return -ENOMEM;
1860 kctl->id.device = device; 1860 kctl->id.device = device;
1861 snd_ctl_add(emu->card, kctl); 1861 err = snd_ctl_add(emu->card, kctl);
1862 if (err < 0)
1863 return err;
1862 1864
1863 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(emu->pci), 64*1024, 64*1024); 1865 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(emu->pci), 64*1024, 64*1024);
1864 1866
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c
index 73a67bc3586b..e3fb9c61017c 100644
--- a/sound/pci/fm801.c
+++ b/sound/pci/fm801.c
@@ -1068,11 +1068,19 @@ static int snd_fm801_mixer(struct fm801 *chip)
1068 if ((err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97_sec)) < 0) 1068 if ((err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97_sec)) < 0)
1069 return err; 1069 return err;
1070 } 1070 }
1071 for (i = 0; i < FM801_CONTROLS; i++) 1071 for (i = 0; i < FM801_CONTROLS; i++) {
1072 snd_ctl_add(chip->card, snd_ctl_new1(&snd_fm801_controls[i], chip)); 1072 err = snd_ctl_add(chip->card,
1073 snd_ctl_new1(&snd_fm801_controls[i], chip));
1074 if (err < 0)
1075 return err;
1076 }
1073 if (chip->multichannel) { 1077 if (chip->multichannel) {
1074 for (i = 0; i < FM801_CONTROLS_MULTI; i++) 1078 for (i = 0; i < FM801_CONTROLS_MULTI; i++) {
1075 snd_ctl_add(chip->card, snd_ctl_new1(&snd_fm801_controls_multi[i], chip)); 1079 err = snd_ctl_add(chip->card,
1080 snd_ctl_new1(&snd_fm801_controls_multi[i], chip));
1081 if (err < 0)
1082 return err;
1083 }
1076 } 1084 }
1077 return 0; 1085 return 0;
1078} 1086}
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index dbf9910c5269..e7fcfc3b8885 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -958,6 +958,8 @@ static const struct snd_pci_quirk cxt5066_fixups[] = {
958 SND_PCI_QUIRK(0x103c, 0x8079, "HP EliteBook 840 G3", CXT_FIXUP_HP_DOCK), 958 SND_PCI_QUIRK(0x103c, 0x8079, "HP EliteBook 840 G3", CXT_FIXUP_HP_DOCK),
959 SND_PCI_QUIRK(0x103c, 0x807C, "HP EliteBook 820 G3", CXT_FIXUP_HP_DOCK), 959 SND_PCI_QUIRK(0x103c, 0x807C, "HP EliteBook 820 G3", CXT_FIXUP_HP_DOCK),
960 SND_PCI_QUIRK(0x103c, 0x80FD, "HP ProBook 640 G2", CXT_FIXUP_HP_DOCK), 960 SND_PCI_QUIRK(0x103c, 0x80FD, "HP ProBook 640 G2", CXT_FIXUP_HP_DOCK),
961 SND_PCI_QUIRK(0x103c, 0x83b3, "HP EliteBook 830 G5", CXT_FIXUP_HP_DOCK),
962 SND_PCI_QUIRK(0x103c, 0x83d3, "HP ProBook 640 G4", CXT_FIXUP_HP_DOCK),
961 SND_PCI_QUIRK(0x103c, 0x8174, "HP Spectre x360", CXT_FIXUP_HP_SPECTRE), 963 SND_PCI_QUIRK(0x103c, 0x8174, "HP Spectre x360", CXT_FIXUP_HP_SPECTRE),
962 SND_PCI_QUIRK(0x103c, 0x8115, "HP Z1 Gen3", CXT_FIXUP_HP_GATE_MIC), 964 SND_PCI_QUIRK(0x103c, 0x8115, "HP Z1 Gen3", CXT_FIXUP_HP_GATE_MIC),
963 SND_PCI_QUIRK(0x103c, 0x814f, "HP ZBook 15u G3", CXT_FIXUP_MUTE_LED_GPIO), 965 SND_PCI_QUIRK(0x103c, 0x814f, "HP ZBook 15u G3", CXT_FIXUP_MUTE_LED_GPIO),
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index d64dcb9a4c99..e9bd33ea538f 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -793,6 +793,9 @@ static inline void alc_shutup(struct hda_codec *codec)
793{ 793{
794 struct alc_spec *spec = codec->spec; 794 struct alc_spec *spec = codec->spec;
795 795
796 if (!snd_hda_get_bool_hint(codec, "shutup"))
797 return; /* disabled explicitly by hints */
798
796 if (spec && spec->shutup) 799 if (spec && spec->shutup)
797 spec->shutup(codec); 800 spec->shutup(codec);
798 else 801 else
diff --git a/sound/pci/lx6464es/lx6464es.c b/sound/pci/lx6464es/lx6464es.c
index 9655b08a1c52..6c85f13ab23f 100644
--- a/sound/pci/lx6464es/lx6464es.c
+++ b/sound/pci/lx6464es/lx6464es.c
@@ -1016,6 +1016,10 @@ static int snd_lx6464es_create(struct snd_card *card,
1016 1016
1017 /* dsp port */ 1017 /* dsp port */
1018 chip->port_dsp_bar = pci_ioremap_bar(pci, 2); 1018 chip->port_dsp_bar = pci_ioremap_bar(pci, 2);
1019 if (!chip->port_dsp_bar) {
1020 dev_err(card->dev, "cannot remap PCI memory region\n");
1021 goto remap_pci_failed;
1022 }
1019 1023
1020 err = request_threaded_irq(pci->irq, lx_interrupt, lx_threaded_irq, 1024 err = request_threaded_irq(pci->irq, lx_interrupt, lx_threaded_irq,
1021 IRQF_SHARED, KBUILD_MODNAME, chip); 1025 IRQF_SHARED, KBUILD_MODNAME, chip);
@@ -1055,6 +1059,9 @@ device_new_failed:
1055 free_irq(pci->irq, chip); 1059 free_irq(pci->irq, chip);
1056 1060
1057request_irq_failed: 1061request_irq_failed:
1062 iounmap(chip->port_dsp_bar);
1063
1064remap_pci_failed:
1058 pci_release_regions(pci); 1065 pci_release_regions(pci);
1059 1066
1060request_regions_failed: 1067request_regions_failed:
diff --git a/sound/pci/sonicvibes.c b/sound/pci/sonicvibes.c
index a8abb15e3c3a..7fbdb703bfcd 100644
--- a/sound/pci/sonicvibes.c
+++ b/sound/pci/sonicvibes.c
@@ -1188,6 +1188,7 @@ SONICVIBES_SINGLE("Joystick Speed", 0, SV_IREG_GAME_PORT, 1, 15, 0);
1188static int snd_sonicvibes_create_gameport(struct sonicvibes *sonic) 1188static int snd_sonicvibes_create_gameport(struct sonicvibes *sonic)
1189{ 1189{
1190 struct gameport *gp; 1190 struct gameport *gp;
1191 int err;
1191 1192
1192 sonic->gameport = gp = gameport_allocate_port(); 1193 sonic->gameport = gp = gameport_allocate_port();
1193 if (!gp) { 1194 if (!gp) {
@@ -1203,7 +1204,10 @@ static int snd_sonicvibes_create_gameport(struct sonicvibes *sonic)
1203 1204
1204 gameport_register_port(gp); 1205 gameport_register_port(gp);
1205 1206
1206 snd_ctl_add(sonic->card, snd_ctl_new1(&snd_sonicvibes_game_control, sonic)); 1207 err = snd_ctl_add(sonic->card,
1208 snd_ctl_new1(&snd_sonicvibes_game_control, sonic));
1209 if (err < 0)
1210 return err;
1207 1211
1208 return 0; 1212 return 0;
1209} 1213}
@@ -1515,7 +1519,11 @@ static int snd_sonic_probe(struct pci_dev *pci,
1515 return err; 1519 return err;
1516 } 1520 }
1517 1521
1518 snd_sonicvibes_create_gameport(sonic); 1522 err = snd_sonicvibes_create_gameport(sonic);
1523 if (err < 0) {
1524 snd_card_free(card);
1525 return err;
1526 }
1519 1527
1520 if ((err = snd_card_register(card)) < 0) { 1528 if ((err = snd_card_register(card)) < 0) {
1521 snd_card_free(card); 1529 snd_card_free(card);
diff --git a/sound/usb/card.h b/sound/usb/card.h
index 1406292d50ec..9b41b7dda84f 100644
--- a/sound/usb/card.h
+++ b/sound/usb/card.h
@@ -32,6 +32,7 @@ struct audioformat {
32 struct snd_pcm_chmap_elem *chmap; /* (optional) channel map */ 32 struct snd_pcm_chmap_elem *chmap; /* (optional) channel map */
33 bool dsd_dop; /* add DOP headers in case of DSD samples */ 33 bool dsd_dop; /* add DOP headers in case of DSD samples */
34 bool dsd_bitrev; /* reverse the bits of each DSD sample */ 34 bool dsd_bitrev; /* reverse the bits of each DSD sample */
35 bool dsd_raw; /* altsetting is raw DSD */
35}; 36};
36 37
37struct snd_usb_substream; 38struct snd_usb_substream;
diff --git a/sound/usb/format.c b/sound/usb/format.c
index 1f7a74a77ea3..fd13ac11b136 100644
--- a/sound/usb/format.c
+++ b/sound/usb/format.c
@@ -64,8 +64,11 @@ static u64 parse_audio_format_i_type(struct snd_usb_audio *chip,
64 sample_width = fmt->bBitResolution; 64 sample_width = fmt->bBitResolution;
65 sample_bytes = fmt->bSubslotSize; 65 sample_bytes = fmt->bSubslotSize;
66 66
67 if (format & UAC2_FORMAT_TYPE_I_RAW_DATA) 67 if (format & UAC2_FORMAT_TYPE_I_RAW_DATA) {
68 pcm_formats |= SNDRV_PCM_FMTBIT_SPECIAL; 68 pcm_formats |= SNDRV_PCM_FMTBIT_SPECIAL;
69 /* flag potentially raw DSD capable altsettings */
70 fp->dsd_raw = true;
71 }
69 72
70 format <<= 1; 73 format <<= 1;
71 break; 74 break;
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index 8c3568d8d03b..ca963e94ec03 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -1653,11 +1653,11 @@ static void build_feature_ctl_badd(struct usb_mixer_interface *mixer,
1653 NULL, NULL, unitid, 0, 0); 1653 NULL, NULL, unitid, 0, 0);
1654} 1654}
1655 1655
1656static void get_connector_control_name(struct mixer_build *state, 1656static void get_connector_control_name(struct usb_mixer_interface *mixer,
1657 struct usb_audio_term *term, 1657 struct usb_audio_term *term,
1658 bool is_input, char *name, int name_size) 1658 bool is_input, char *name, int name_size)
1659{ 1659{
1660 int name_len = get_term_name(state->chip, term, name, name_size, 0); 1660 int name_len = get_term_name(mixer->chip, term, name, name_size, 0);
1661 1661
1662 if (name_len == 0) 1662 if (name_len == 0)
1663 strlcpy(name, "Unknown", name_size); 1663 strlcpy(name, "Unknown", name_size);
@@ -1674,7 +1674,7 @@ static void get_connector_control_name(struct mixer_build *state,
1674} 1674}
1675 1675
1676/* Build a mixer control for a UAC connector control (jack-detect) */ 1676/* Build a mixer control for a UAC connector control (jack-detect) */
1677static void build_connector_control(struct mixer_build *state, 1677static void build_connector_control(struct usb_mixer_interface *mixer,
1678 struct usb_audio_term *term, bool is_input) 1678 struct usb_audio_term *term, bool is_input)
1679{ 1679{
1680 struct snd_kcontrol *kctl; 1680 struct snd_kcontrol *kctl;
@@ -1683,7 +1683,7 @@ static void build_connector_control(struct mixer_build *state,
1683 cval = kzalloc(sizeof(*cval), GFP_KERNEL); 1683 cval = kzalloc(sizeof(*cval), GFP_KERNEL);
1684 if (!cval) 1684 if (!cval)
1685 return; 1685 return;
1686 snd_usb_mixer_elem_init_std(&cval->head, state->mixer, term->id); 1686 snd_usb_mixer_elem_init_std(&cval->head, mixer, term->id);
1687 /* 1687 /*
1688 * UAC2: The first byte from reading the UAC2_TE_CONNECTOR control returns the 1688 * UAC2: The first byte from reading the UAC2_TE_CONNECTOR control returns the
1689 * number of channels connected. 1689 * number of channels connected.
@@ -1694,7 +1694,7 @@ static void build_connector_control(struct mixer_build *state,
1694 * This boolean ctl will simply report if any channels are connected 1694 * This boolean ctl will simply report if any channels are connected
1695 * or not. 1695 * or not.
1696 */ 1696 */
1697 if (state->mixer->protocol == UAC_VERSION_2) 1697 if (mixer->protocol == UAC_VERSION_2)
1698 cval->control = UAC2_TE_CONNECTOR; 1698 cval->control = UAC2_TE_CONNECTOR;
1699 else /* UAC_VERSION_3 */ 1699 else /* UAC_VERSION_3 */
1700 cval->control = UAC3_TE_INSERTION; 1700 cval->control = UAC3_TE_INSERTION;
@@ -1705,11 +1705,11 @@ static void build_connector_control(struct mixer_build *state,
1705 cval->max = 1; 1705 cval->max = 1;
1706 kctl = snd_ctl_new1(&usb_connector_ctl_ro, cval); 1706 kctl = snd_ctl_new1(&usb_connector_ctl_ro, cval);
1707 if (!kctl) { 1707 if (!kctl) {
1708 usb_audio_err(state->chip, "cannot malloc kcontrol\n"); 1708 usb_audio_err(mixer->chip, "cannot malloc kcontrol\n");
1709 kfree(cval); 1709 kfree(cval);
1710 return; 1710 return;
1711 } 1711 }
1712 get_connector_control_name(state, term, is_input, kctl->id.name, 1712 get_connector_control_name(mixer, term, is_input, kctl->id.name,
1713 sizeof(kctl->id.name)); 1713 sizeof(kctl->id.name));
1714 kctl->private_free = snd_usb_mixer_elem_free; 1714 kctl->private_free = snd_usb_mixer_elem_free;
1715 snd_usb_mixer_add_control(&cval->head, kctl); 1715 snd_usb_mixer_add_control(&cval->head, kctl);
@@ -2042,7 +2042,7 @@ static int parse_audio_input_terminal(struct mixer_build *state, int unitid,
2042 2042
2043 /* Check for jack detection. */ 2043 /* Check for jack detection. */
2044 if (uac_v2v3_control_is_readable(bmctls, control)) 2044 if (uac_v2v3_control_is_readable(bmctls, control))
2045 build_connector_control(state, &iterm, true); 2045 build_connector_control(state->mixer, &iterm, true);
2046 2046
2047 return 0; 2047 return 0;
2048} 2048}
@@ -2918,6 +2918,23 @@ static int snd_usb_mixer_controls_badd(struct usb_mixer_interface *mixer,
2918 UAC3_BADD_FU_ID7, map->map); 2918 UAC3_BADD_FU_ID7, map->map);
2919 } 2919 }
2920 2920
2921 /* Insertion Control */
2922 if (f->subclass == UAC3_FUNCTION_SUBCLASS_HEADSET_ADAPTER) {
2923 struct usb_audio_term iterm, oterm;
2924
2925 /* Input Term - Insertion control */
2926 memset(&iterm, 0, sizeof(iterm));
2927 iterm.id = UAC3_BADD_IT_ID4;
2928 iterm.type = UAC_BIDIR_TERMINAL_HEADSET;
2929 build_connector_control(mixer, &iterm, true);
2930
2931 /* Output Term - Insertion control */
2932 memset(&oterm, 0, sizeof(oterm));
2933 oterm.id = UAC3_BADD_OT_ID3;
2934 oterm.type = UAC_BIDIR_TERMINAL_HEADSET;
2935 build_connector_control(mixer, &oterm, false);
2936 }
2937
2921 return 0; 2938 return 0;
2922} 2939}
2923 2940
@@ -2990,7 +3007,7 @@ static int snd_usb_mixer_controls(struct usb_mixer_interface *mixer)
2990 3007
2991 if (uac_v2v3_control_is_readable(le16_to_cpu(desc->bmControls), 3008 if (uac_v2v3_control_is_readable(le16_to_cpu(desc->bmControls),
2992 UAC2_TE_CONNECTOR)) { 3009 UAC2_TE_CONNECTOR)) {
2993 build_connector_control(&state, &state.oterm, 3010 build_connector_control(state.mixer, &state.oterm,
2994 false); 3011 false);
2995 } 3012 }
2996 } else { /* UAC_VERSION_3 */ 3013 } else { /* UAC_VERSION_3 */
@@ -3017,7 +3034,7 @@ static int snd_usb_mixer_controls(struct usb_mixer_interface *mixer)
3017 3034
3018 if (uac_v2v3_control_is_readable(le32_to_cpu(desc->bmControls), 3035 if (uac_v2v3_control_is_readable(le32_to_cpu(desc->bmControls),
3019 UAC3_TE_INSERTION)) { 3036 UAC3_TE_INSERTION)) {
3020 build_connector_control(&state, &state.oterm, 3037 build_connector_control(state.mixer, &state.oterm,
3021 false); 3038 false);
3022 } 3039 }
3023 } 3040 }
@@ -3321,10 +3338,12 @@ int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif,
3321 err = snd_usb_mixer_controls(mixer); 3338 err = snd_usb_mixer_controls(mixer);
3322 if (err < 0) 3339 if (err < 0)
3323 goto _error; 3340 goto _error;
3324 err = snd_usb_mixer_status_create(mixer);
3325 if (err < 0)
3326 goto _error;
3327 } 3341 }
3342
3343 err = snd_usb_mixer_status_create(mixer);
3344 if (err < 0)
3345 goto _error;
3346
3328 err = create_keep_iface_ctl(mixer); 3347 err = create_keep_iface_ctl(mixer);
3329 if (err < 0) 3348 if (err < 0)
3330 goto _error; 3349 goto _error;
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
index 0e37e358ca97..8aac48f9c322 100644
--- a/sound/usb/quirks-table.h
+++ b/sound/usb/quirks-table.h
@@ -3277,6 +3277,10 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),
3277 } 3277 }
3278}, 3278},
3279 3279
3280/* disabled due to regression for other devices;
3281 * see https://bugzilla.kernel.org/show_bug.cgi?id=199905
3282 */
3283#if 0
3280{ 3284{
3281 /* 3285 /*
3282 * Nura's first gen headphones use Cambridge Silicon Radio's vendor 3286 * Nura's first gen headphones use Cambridge Silicon Radio's vendor
@@ -3324,6 +3328,7 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),
3324 } 3328 }
3325 } 3329 }
3326}, 3330},
3331#endif /* disabled */
3327 3332
3328{ 3333{
3329 /* 3334 /*
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index f4b69173682c..02b6cc02767f 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -1362,16 +1362,12 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,
1362 case USB_ID(0x1511, 0x0037): /* AURALiC VEGA */ 1362 case USB_ID(0x1511, 0x0037): /* AURALiC VEGA */
1363 case USB_ID(0x20b1, 0x0002): /* Wyred 4 Sound DAC-2 DSD */ 1363 case USB_ID(0x20b1, 0x0002): /* Wyred 4 Sound DAC-2 DSD */
1364 case USB_ID(0x20b1, 0x2004): /* Matrix Audio X-SPDIF 2 */ 1364 case USB_ID(0x20b1, 0x2004): /* Matrix Audio X-SPDIF 2 */
1365 case USB_ID(0x20b1, 0x3008): /* iFi Audio micro/nano iDSD */
1366 case USB_ID(0x20b1, 0x2008): /* Matrix Audio X-Sabre */ 1365 case USB_ID(0x20b1, 0x2008): /* Matrix Audio X-Sabre */
1367 case USB_ID(0x20b1, 0x300a): /* Matrix Audio Mini-i Pro */ 1366 case USB_ID(0x20b1, 0x300a): /* Matrix Audio Mini-i Pro */
1368 case USB_ID(0x22d9, 0x0416): /* OPPO HA-1 */ 1367 case USB_ID(0x22d9, 0x0416): /* OPPO HA-1 */
1369 case USB_ID(0x22d9, 0x0436): /* OPPO Sonica */ 1368 case USB_ID(0x22d9, 0x0436): /* OPPO Sonica */
1370 case USB_ID(0x22d9, 0x0461): /* OPPO UDP-205 */ 1369 case USB_ID(0x22d9, 0x0461): /* OPPO UDP-205 */
1371 case USB_ID(0x2522, 0x0012): /* LH Labs VI DAC Infinity */ 1370 case USB_ID(0x2522, 0x0012): /* LH Labs VI DAC Infinity */
1372 case USB_ID(0x25ce, 0x001f): /* Mytek Brooklyn DAC */
1373 case USB_ID(0x25ce, 0x0021): /* Mytek Manhattan DAC */
1374 case USB_ID(0x25ce, 0x8025): /* Mytek Brooklyn DAC+ */
1375 case USB_ID(0x2772, 0x0230): /* Pro-Ject Pre Box S2 Digital */ 1371 case USB_ID(0x2772, 0x0230): /* Pro-Ject Pre Box S2 Digital */
1376 if (fp->altsetting == 2) 1372 if (fp->altsetting == 2)
1377 return SNDRV_PCM_FMTBIT_DSD_U32_BE; 1373 return SNDRV_PCM_FMTBIT_DSD_U32_BE;
@@ -1389,7 +1385,6 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,
1389 case USB_ID(0x20b1, 0x3021): /* Eastern El. MiniMax Tube DAC Supreme */ 1385 case USB_ID(0x20b1, 0x3021): /* Eastern El. MiniMax Tube DAC Supreme */
1390 case USB_ID(0x20b1, 0x3023): /* Aune X1S 32BIT/384 DSD DAC */ 1386 case USB_ID(0x20b1, 0x3023): /* Aune X1S 32BIT/384 DSD DAC */
1391 case USB_ID(0x20b1, 0x302d): /* Unison Research Unico CD Due */ 1387 case USB_ID(0x20b1, 0x302d): /* Unison Research Unico CD Due */
1392 case USB_ID(0x20b1, 0x3036): /* Holo Springs Level 3 R2R DAC */
1393 case USB_ID(0x20b1, 0x307b): /* CH Precision C1 DAC */ 1388 case USB_ID(0x20b1, 0x307b): /* CH Precision C1 DAC */
1394 case USB_ID(0x20b1, 0x3086): /* Singxer F-1 converter board */ 1389 case USB_ID(0x20b1, 0x3086): /* Singxer F-1 converter board */
1395 case USB_ID(0x22d9, 0x0426): /* OPPO HA-2 */ 1390 case USB_ID(0x22d9, 0x0426): /* OPPO HA-2 */
@@ -1443,6 +1438,20 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,
1443 return SNDRV_PCM_FMTBIT_DSD_U32_BE; 1438 return SNDRV_PCM_FMTBIT_DSD_U32_BE;
1444 } 1439 }
1445 1440
1441 /* Mostly generic method to detect many DSD-capable implementations -
1442 * from XMOS/Thesycon
1443 */
1444 switch (USB_ID_VENDOR(chip->usb_id)) {
1445 case 0x20b1: /* XMOS based devices */
1446 case 0x25ce: /* Mytek devices */
1447 if (fp->dsd_raw)
1448 return SNDRV_PCM_FMTBIT_DSD_U32_BE;
1449 break;
1450 default:
1451 break;
1452
1453 }
1454
1446 return 0; 1455 return 0;
1447} 1456}
1448 1457