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.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"Most of commits are regression fixes for HD-audio: a few corner case
fixes for regmap transition, and i915 binding issues.

In addition, a quirk for another USB-audio device supporting DSD"

* tag 'sound-4.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda - Abort the probe without i915 binding for HSW/BDW
ALSA: hda - Re-add the lost fake mute support
ALSA: hda - Continue probing even if i915 binding fails
ALSA: hda - Don't actually write registers for caps overwrites
ALSA: hda - fix number of devices query on hotplug
ALSA: usb-audio: add native DSD support for JLsounds I2SoverUSB

+58 -7
+2
include/sound/hda_regmap.h
··· 9 9 #include <sound/core.h> 10 10 #include <sound/hdaudio.h> 11 11 12 + #define AC_AMP_FAKE_MUTE 0x10 /* fake mute bit set to amp verbs */ 13 + 12 14 int snd_hdac_regmap_init(struct hdac_device *codec); 13 15 void snd_hdac_regmap_exit(struct hdac_device *codec); 14 16 int snd_hdac_regmap_add_vendor_verb(struct hdac_device *codec,
+8
sound/hda/hdac_regmap.c
··· 246 246 return hda_reg_read_stereo_amp(codec, reg, val); 247 247 if (verb == AC_VERB_GET_PROC_COEF) 248 248 return hda_reg_read_coef(codec, reg, val); 249 + if ((verb & 0x700) == AC_VERB_SET_AMP_GAIN_MUTE) 250 + reg &= ~AC_AMP_FAKE_MUTE; 251 + 249 252 err = snd_hdac_exec_verb(codec, reg, 0, val); 250 253 if (err < 0) 251 254 return err; ··· 268 265 unsigned int verb; 269 266 int i, bytes, err; 270 267 268 + if (codec->caps_overwriting) 269 + return 0; 270 + 271 271 reg &= ~0x00080000U; /* drop GET bit */ 272 272 reg |= (codec->addr << 28); 273 273 verb = get_verb(reg); ··· 286 280 287 281 switch (verb & 0xf00) { 288 282 case AC_VERB_SET_AMP_GAIN_MUTE: 283 + if ((reg & AC_AMP_FAKE_MUTE) && (val & AC_AMP_MUTE)) 284 + val = 0; 289 285 verb = AC_VERB_SET_AMP_GAIN_MUTE; 290 286 if (reg & AC_AMP_GET_LEFT) 291 287 verb |= AC_AMP_SET_LEFT >> 8;
+26 -1
sound/pci/hda/hda_codec.c
··· 436 436 get_wcaps_type(wcaps) != AC_WID_PIN) 437 437 return 0; 438 438 439 - parm = snd_hda_param_read(codec, nid, AC_PAR_DEVLIST_LEN); 439 + parm = snd_hdac_read_parm_uncached(&codec->core, nid, AC_PAR_DEVLIST_LEN); 440 440 if (parm == -1 && codec->bus->rirb_error) 441 441 parm = 0; 442 442 return parm & AC_DEV_LIST_LEN_MASK; ··· 1374 1374 return snd_hdac_override_parm(&codec->core, nid, parm, caps); 1375 1375 } 1376 1376 EXPORT_SYMBOL_GPL(snd_hda_override_amp_caps); 1377 + 1378 + /** 1379 + * snd_hda_codec_amp_update - update the AMP mono value 1380 + * @codec: HD-audio codec 1381 + * @nid: NID to read the AMP value 1382 + * @ch: channel to update (0 or 1) 1383 + * @dir: #HDA_INPUT or #HDA_OUTPUT 1384 + * @idx: the index value (only for input direction) 1385 + * @mask: bit mask to set 1386 + * @val: the bits value to set 1387 + * 1388 + * Update the AMP values for the given channel, direction and index. 1389 + */ 1390 + int snd_hda_codec_amp_update(struct hda_codec *codec, hda_nid_t nid, 1391 + int ch, int dir, int idx, int mask, int val) 1392 + { 1393 + unsigned int cmd = snd_hdac_regmap_encode_amp(nid, ch, dir, idx); 1394 + 1395 + /* enable fake mute if no h/w mute but min=mute */ 1396 + if ((query_amp_caps(codec, nid, dir) & 1397 + (AC_AMPCAP_MUTE | AC_AMPCAP_MIN_MUTE)) == AC_AMPCAP_MIN_MUTE) 1398 + cmd |= AC_AMP_FAKE_MUTE; 1399 + return snd_hdac_regmap_update_raw(&codec->core, cmd, mask, val); 1400 + } 1401 + EXPORT_SYMBOL_GPL(snd_hda_codec_amp_update); 1377 1402 1378 1403 /** 1379 1404 * snd_hda_codec_amp_stereo - update the AMP stereo values
+17 -2
sound/pci/hda/hda_intel.c
··· 340 340 #define use_vga_switcheroo(chip) 0 341 341 #endif 342 342 343 + #define CONTROLLER_IN_GPU(pci) (((pci)->device == 0x0a0c) || \ 344 + ((pci)->device == 0x0c0c) || \ 345 + ((pci)->device == 0x0d0c) || \ 346 + ((pci)->device == 0x160c)) 347 + 343 348 static char *driver_short_names[] = { 344 349 [AZX_DRIVER_ICH] = "HDA Intel", 345 350 [AZX_DRIVER_PCH] = "HDA Intel PCH", ··· 1859 1854 if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) { 1860 1855 #ifdef CONFIG_SND_HDA_I915 1861 1856 err = hda_i915_init(hda); 1862 - if (err < 0) 1863 - goto out_free; 1857 + if (err < 0) { 1858 + /* if the controller is bound only with HDMI/DP 1859 + * (for HSW and BDW), we need to abort the probe; 1860 + * for other chips, still continue probing as other 1861 + * codecs can be on the same link. 1862 + */ 1863 + if (CONTROLLER_IN_GPU(pci)) 1864 + goto out_free; 1865 + else 1866 + goto skip_i915; 1867 + } 1864 1868 err = hda_display_power(hda, true); 1865 1869 if (err < 0) { 1866 1870 dev_err(chip->card->dev, ··· 1879 1865 #endif 1880 1866 } 1881 1867 1868 + skip_i915: 1882 1869 err = azx_first_init(chip); 1883 1870 if (err < 0) 1884 1871 goto out_free;
+2 -2
sound/pci/hda/hda_local.h
··· 129 129 /* lowlevel accessor with caching; use carefully */ 130 130 #define snd_hda_codec_amp_read(codec, nid, ch, dir, idx) \ 131 131 snd_hdac_regmap_get_amp(&(codec)->core, nid, ch, dir, idx) 132 - #define snd_hda_codec_amp_update(codec, nid, ch, dir, idx, mask, val) \ 133 - snd_hdac_regmap_update_amp(&(codec)->core, nid, ch, dir, idx, mask, val) 132 + int snd_hda_codec_amp_update(struct hda_codec *codec, hda_nid_t nid, 133 + int ch, int dir, int idx, int mask, int val); 134 134 int snd_hda_codec_amp_stereo(struct hda_codec *codec, hda_nid_t nid, 135 135 int dir, int idx, int mask, int val); 136 136 int snd_hda_codec_amp_init(struct hda_codec *codec, hda_nid_t nid, int ch,
+3 -2
sound/usb/quirks.c
··· 1267 1267 if (fp->altsetting == 2) 1268 1268 return SNDRV_PCM_FMTBIT_DSD_U32_BE; 1269 1269 break; 1270 - /* DIYINHK DSD DXD 384kHz USB to I2S/DSD */ 1271 - case USB_ID(0x20b1, 0x2009): 1270 + 1271 + case USB_ID(0x20b1, 0x2009): /* DIYINHK DSD DXD 384kHz USB to I2S/DSD */ 1272 + case USB_ID(0x20b1, 0x2023): /* JLsounds I2SoverUSB */ 1272 1273 if (fp->altsetting == 3) 1273 1274 return SNDRV_PCM_FMTBIT_DSD_U32_BE; 1274 1275 break;