Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'sound-4.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"All stable fixes here:

- a regression fix of USB-audio for the previous hardening patch

- a potential UAF fix in rawmidi

- HD-audio and USB-audio quirks, the missing new ID"

* tag 'sound-4.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: usb-audio: Fix the missing ctl name suffix at parsing SU
ALSA: hda/realtek - Fix Dell AIO LineOut issue
ALSA: rawmidi: Avoid racy info ioctl via ctl device
ALSA: hda - Add vendor id for Cannonlake HDMI codec
ALSA: usb-audio: Add native DSD support for Esoteric D-05X

+70 -20
+12 -3
sound/core/rawmidi.c
··· 579 579 return 0; 580 580 } 581 581 582 - int snd_rawmidi_info_select(struct snd_card *card, struct snd_rawmidi_info *info) 582 + static int __snd_rawmidi_info_select(struct snd_card *card, 583 + struct snd_rawmidi_info *info) 583 584 { 584 585 struct snd_rawmidi *rmidi; 585 586 struct snd_rawmidi_str *pstr; 586 587 struct snd_rawmidi_substream *substream; 587 588 588 - mutex_lock(&register_mutex); 589 589 rmidi = snd_rawmidi_search(card, info->device); 590 - mutex_unlock(&register_mutex); 591 590 if (!rmidi) 592 591 return -ENXIO; 593 592 if (info->stream < 0 || info->stream > 1) ··· 601 602 return snd_rawmidi_info(substream, info); 602 603 } 603 604 return -ENXIO; 605 + } 606 + 607 + int snd_rawmidi_info_select(struct snd_card *card, struct snd_rawmidi_info *info) 608 + { 609 + int ret; 610 + 611 + mutex_lock(&register_mutex); 612 + ret = __snd_rawmidi_info_select(card, info); 613 + mutex_unlock(&register_mutex); 614 + return ret; 604 615 } 605 616 EXPORT_SYMBOL(snd_rawmidi_info_select); 606 617
+4 -2
sound/pci/hda/patch_hdmi.c
··· 55 55 #define is_kabylake(codec) ((codec)->core.vendor_id == 0x8086280b) 56 56 #define is_geminilake(codec) (((codec)->core.vendor_id == 0x8086280d) || \ 57 57 ((codec)->core.vendor_id == 0x80862800)) 58 + #define is_cannonlake(codec) ((codec)->core.vendor_id == 0x8086280c) 58 59 #define is_haswell_plus(codec) (is_haswell(codec) || is_broadwell(codec) \ 59 60 || is_skylake(codec) || is_broxton(codec) \ 60 - || is_kabylake(codec)) || is_geminilake(codec) 61 - 61 + || is_kabylake(codec)) || is_geminilake(codec) \ 62 + || is_cannonlake(codec) 62 63 #define is_valleyview(codec) ((codec)->core.vendor_id == 0x80862882) 63 64 #define is_cherryview(codec) ((codec)->core.vendor_id == 0x80862883) 64 65 #define is_valleyview_plus(codec) (is_valleyview(codec) || is_cherryview(codec)) ··· 3842 3841 HDA_CODEC_ENTRY(0x80862809, "Skylake HDMI", patch_i915_hsw_hdmi), 3843 3842 HDA_CODEC_ENTRY(0x8086280a, "Broxton HDMI", patch_i915_hsw_hdmi), 3844 3843 HDA_CODEC_ENTRY(0x8086280b, "Kabylake HDMI", patch_i915_hsw_hdmi), 3844 + HDA_CODEC_ENTRY(0x8086280c, "Cannonlake HDMI", patch_i915_glk_hdmi), 3845 3845 HDA_CODEC_ENTRY(0x8086280d, "Geminilake HDMI", patch_i915_glk_hdmi), 3846 3846 HDA_CODEC_ENTRY(0x80862800, "Geminilake HDMI", patch_i915_glk_hdmi), 3847 3847 HDA_CODEC_ENTRY(0x80862880, "CedarTrail HDMI", patch_generic_hdmi),
+34 -1
sound/pci/hda/patch_realtek.c
··· 5185 5185 } 5186 5186 } 5187 5187 5188 + /* Forcibly assign NID 0x03 to HP/LO while NID 0x02 to SPK for EQ */ 5189 + static void alc274_fixup_bind_dacs(struct hda_codec *codec, 5190 + const struct hda_fixup *fix, int action) 5191 + { 5192 + struct alc_spec *spec = codec->spec; 5193 + static hda_nid_t preferred_pairs[] = { 5194 + 0x21, 0x03, 0x1b, 0x03, 0x16, 0x02, 5195 + 0 5196 + }; 5197 + 5198 + if (action != HDA_FIXUP_ACT_PRE_PROBE) 5199 + return; 5200 + 5201 + spec->gen.preferred_dacs = preferred_pairs; 5202 + } 5203 + 5188 5204 /* for hda_fixup_thinkpad_acpi() */ 5189 5205 #include "thinkpad_helper.c" 5190 5206 ··· 5318 5302 ALC233_FIXUP_LENOVO_MULTI_CODECS, 5319 5303 ALC294_FIXUP_LENOVO_MIC_LOCATION, 5320 5304 ALC700_FIXUP_INTEL_REFERENCE, 5305 + ALC274_FIXUP_DELL_BIND_DACS, 5306 + ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, 5321 5307 }; 5322 5308 5323 5309 static const struct hda_fixup alc269_fixups[] = { ··· 6130 6112 {} 6131 6113 } 6132 6114 }, 6115 + [ALC274_FIXUP_DELL_BIND_DACS] = { 6116 + .type = HDA_FIXUP_FUNC, 6117 + .v.func = alc274_fixup_bind_dacs, 6118 + .chained = true, 6119 + .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE 6120 + }, 6121 + [ALC274_FIXUP_DELL_AIO_LINEOUT_VERB] = { 6122 + .type = HDA_FIXUP_PINS, 6123 + .v.pins = (const struct hda_pintbl[]) { 6124 + { 0x1b, 0x0401102f }, 6125 + { } 6126 + }, 6127 + .chained = true, 6128 + .chain_id = ALC274_FIXUP_DELL_BIND_DACS 6129 + }, 6133 6130 }; 6134 6131 6135 6132 static const struct snd_pci_quirk alc269_fixup_tbl[] = { ··· 6611 6578 {0x14, 0x90170110}, 6612 6579 {0x1b, 0x90a70130}, 6613 6580 {0x21, 0x03211020}), 6614 - SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, 6581 + SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, 6615 6582 {0x12, 0xb7a60130}, 6616 6583 {0x13, 0xb8a61140}, 6617 6584 {0x16, 0x90170110},
+16 -11
sound/usb/mixer.c
··· 2173 2173 kctl->private_value = (unsigned long)namelist; 2174 2174 kctl->private_free = usb_mixer_selector_elem_free; 2175 2175 2176 - nameid = uac_selector_unit_iSelector(desc); 2176 + /* check the static mapping table at first */ 2177 2177 len = check_mapped_name(map, kctl->id.name, sizeof(kctl->id.name)); 2178 - if (len) 2179 - ; 2180 - else if (nameid) 2181 - len = snd_usb_copy_string_desc(state, nameid, kctl->id.name, 2182 - sizeof(kctl->id.name)); 2183 - else 2184 - len = get_term_name(state, &state->oterm, 2185 - kctl->id.name, sizeof(kctl->id.name), 0); 2186 - 2187 2178 if (!len) { 2188 - strlcpy(kctl->id.name, "USB", sizeof(kctl->id.name)); 2179 + /* no mapping ? */ 2180 + /* if iSelector is given, use it */ 2181 + nameid = uac_selector_unit_iSelector(desc); 2182 + if (nameid) 2183 + len = snd_usb_copy_string_desc(state, nameid, 2184 + kctl->id.name, 2185 + sizeof(kctl->id.name)); 2186 + /* ... or pick up the terminal name at next */ 2187 + if (!len) 2188 + len = get_term_name(state, &state->oterm, 2189 + kctl->id.name, sizeof(kctl->id.name), 0); 2190 + /* ... or use the fixed string "USB" as the last resort */ 2191 + if (!len) 2192 + strlcpy(kctl->id.name, "USB", sizeof(kctl->id.name)); 2189 2193 2194 + /* and add the proper suffix */ 2190 2195 if (desc->bDescriptorSubtype == UAC2_CLOCK_SELECTOR) 2191 2196 append_ctl_name(kctl, " Clock Source"); 2192 2197 else if ((state->oterm.type & 0xff00) == 0x0100)
+4 -3
sound/usb/quirks.c
··· 1166 1166 /* TEAC UD-501/UD-503/NT-503 USB DACs need a vendor cmd to switch 1167 1167 * between PCM/DOP and native DSD mode 1168 1168 */ 1169 - static bool is_teac_50X_dac(unsigned int id) 1169 + static bool is_teac_dsd_dac(unsigned int id) 1170 1170 { 1171 1171 switch (id) { 1172 1172 case USB_ID(0x0644, 0x8043): /* TEAC UD-501/UD-503/NT-503 */ 1173 + case USB_ID(0x0644, 0x8044): /* Esoteric D-05X */ 1173 1174 return true; 1174 1175 } 1175 1176 return false; ··· 1203 1202 break; 1204 1203 } 1205 1204 mdelay(20); 1206 - } else if (is_teac_50X_dac(subs->stream->chip->usb_id)) { 1205 + } else if (is_teac_dsd_dac(subs->stream->chip->usb_id)) { 1207 1206 /* Vendor mode switch cmd is required. */ 1208 1207 switch (fmt->altsetting) { 1209 1208 case 3: /* DSD mode (DSD_U32) requested */ ··· 1393 1392 } 1394 1393 1395 1394 /* TEAC devices with USB DAC functionality */ 1396 - if (is_teac_50X_dac(chip->usb_id)) { 1395 + if (is_teac_dsd_dac(chip->usb_id)) { 1397 1396 if (fp->altsetting == 3) 1398 1397 return SNDRV_PCM_FMTBIT_DSD_U32_BE; 1399 1398 }