History

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

Linus Torvalds committed 11 years ago

Commit 2fbbada2 parents c8d17b4 535115b6 files · +58 −7Browse files

Unified · Split

6 files
  1. include/sound/hda_regmap.h +2 −0
  2. sound/hda/hdac_regmap.c +8 −0
  3. sound/pci/hda/hda_codec.c +26 −1
  4. sound/pci/hda/hda_intel.c +17 −2
  5. sound/pci/hda/hda_local.h +2 −2
  6. sound/usb/quirks.c +3 −2
include/sound/hda_regmap.h+2−0
@@ -9,6 +9,8 @@ · 8 unmodified lines
9#include <sound/core.h>9#include <sound/core.h>
10#include <sound/hdaudio.h>10#include <sound/hdaudio.h>
11 11
12#define AC_AMP_FAKE_MUTE 0x10 /* fake mute bit set to amp verbs */
13
12int snd_hdac_regmap_init(struct hdac_device *codec);14int snd_hdac_regmap_init(struct hdac_device *codec);
13void snd_hdac_regmap_exit(struct hdac_device *codec);15void snd_hdac_regmap_exit(struct hdac_device *codec);
14int snd_hdac_regmap_add_vendor_verb(struct hdac_device *codec,16int snd_hdac_regmap_add_vendor_verb(struct hdac_device *codec,
sound/hda/hdac_regmap.c+8−0
@@ -246,6 +246,9 @@ static int hda_reg_read(void *context, unsigned int reg, unsigned int *val) · 245 unmodified lines
246 return hda_reg_read_stereo_amp(codec, reg, val);246 return hda_reg_read_stereo_amp(codec, reg, val);
247 if (verb == AC_VERB_GET_PROC_COEF)247 if (verb == AC_VERB_GET_PROC_COEF)
248 return hda_reg_read_coef(codec, reg, val);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 err = snd_hdac_exec_verb(codec, reg, 0, val);252 err = snd_hdac_exec_verb(codec, reg, 0, val);
250 if (err < 0)253 if (err < 0)
251 return err;254 return err;
@@ -265,6 +268,9 @@ static int hda_reg_write(void *context, unsigned int reg, unsigned int val) · 13 unmodified lines
265 unsigned int verb;268 unsigned int verb;
266 int i, bytes, err;269 int i, bytes, err;
267 270
271 if (codec->caps_overwriting)
272 return 0;
273
268 reg &= ~0x00080000U; /* drop GET bit */274 reg &= ~0x00080000U; /* drop GET bit */
269 reg |= (codec->addr << 28);275 reg |= (codec->addr << 28);
270 verb = get_verb(reg);276 verb = get_verb(reg);
@@ -280,6 +286,8 @@ static int hda_reg_write(void *context, unsigned int reg, unsigned int val) · 9 unmodified lines
280 286
281 switch (verb & 0xf00) {287 switch (verb & 0xf00) {
282 case AC_VERB_SET_AMP_GAIN_MUTE:288 case AC_VERB_SET_AMP_GAIN_MUTE:
289 if ((reg & AC_AMP_FAKE_MUTE) && (val & AC_AMP_MUTE))
290 val = 0;
283 verb = AC_VERB_SET_AMP_GAIN_MUTE;291 verb = AC_VERB_SET_AMP_GAIN_MUTE;
284 if (reg & AC_AMP_GET_LEFT)292 if (reg & AC_AMP_GET_LEFT)
285 verb |= AC_AMP_SET_LEFT >> 8;293 verb |= AC_AMP_SET_LEFT >> 8;
sound/pci/hda/hda_codec.c+26−1
@@ -436,7 +436,7 @@ static unsigned int get_num_devices(struct hda_codec *codec, hda_nid_t nid) · 435 unmodified lines
436 get_wcaps_type(wcaps) != AC_WID_PIN)436 get_wcaps_type(wcaps) != AC_WID_PIN)
437 return 0;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 if (parm == -1 && codec->bus->rirb_error)440 if (parm == -1 && codec->bus->rirb_error)
441 parm = 0;441 parm = 0;
442 return parm & AC_DEV_LIST_LEN_MASK;442 return parm & AC_DEV_LIST_LEN_MASK;
@@ -1375,6 +1375,31 @@ int snd_hda_override_amp_caps(struct hda_codec *codec, hda_nid_t nid, int dir, · 932 unmodified lines
1375}1375}
1376EXPORT_SYMBOL_GPL(snd_hda_override_amp_caps);1376EXPORT_SYMBOL_GPL(snd_hda_override_amp_caps);
1377 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 */
1390int 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}
1401EXPORT_SYMBOL_GPL(snd_hda_codec_amp_update);
1402
1378/**1403/**
1379 * snd_hda_codec_amp_stereo - update the AMP stereo values1404 * snd_hda_codec_amp_stereo - update the AMP stereo values
1380 * @codec: HD-audio codec1405 * @codec: HD-audio codec
sound/pci/hda/hda_intel.c+17−2
@@ -340,6 +340,11 @@ enum { · 339 unmodified lines
340#define use_vga_switcheroo(chip) 0340#define use_vga_switcheroo(chip) 0
341#endif341#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
343static char *driver_short_names[] = {348static char *driver_short_names[] = {
344 [AZX_DRIVER_ICH] = "HDA Intel",349 [AZX_DRIVER_ICH] = "HDA Intel",
345 [AZX_DRIVER_PCH] = "HDA Intel PCH",350 [AZX_DRIVER_PCH] = "HDA Intel PCH",
@@ -1854,8 +1859,17 @@ static int azx_probe_continue(struct azx *chip) · 1508 unmodified lines
1854 if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) {1859 if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) {
1855#ifdef CONFIG_SND_HDA_I9151860#ifdef CONFIG_SND_HDA_I915
1856 err = hda_i915_init(hda);1861 err = hda_i915_init(hda);
1857 if (err < 0)1862 if (err < 0) {
1858 goto out_free;1863 /* if the controller is bound only with HDMI/DP
1864 * (for HSW and BDW), we need to abort the probe;
1865 * for other chips, still continue probing as other
1866 * codecs can be on the same link.
1867 */
1868 if (CONTROLLER_IN_GPU(pci))
1869 goto out_free;
1870 else
1871 goto skip_i915;
1872 }
1859 err = hda_display_power(hda, true);1873 err = hda_display_power(hda, true);
1860 if (err < 0) {1874 if (err < 0) {
1861 dev_err(chip->card->dev,1875 dev_err(chip->card->dev,
@@ -1865,6 +1879,7 @@ static int azx_probe_continue(struct azx *chip) · 3 unmodified lines
1865#endif1879#endif
1866 }1880 }
1867 1881
1882 skip_i915:
1868 err = azx_first_init(chip);1883 err = azx_first_init(chip);
1869 if (err < 0)1884 if (err < 0)
1870 goto out_free;1885 goto out_free;
sound/pci/hda/hda_local.h+2−2
@@ -129,8 +129,8 @@ int snd_hda_mixer_amp_switch_put_beep(struct snd_kcontrol *kcontrol, · 128 unmodified lines
129/* lowlevel accessor with caching; use carefully */129/* lowlevel accessor with caching; use carefully */
130#define snd_hda_codec_amp_read(codec, nid, ch, dir, idx) \130#define snd_hda_codec_amp_read(codec, nid, ch, dir, idx) \
131 snd_hdac_regmap_get_amp(&(codec)->core, nid, ch, dir, idx)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) \132int snd_hda_codec_amp_update(struct hda_codec *codec, hda_nid_t nid,
133 snd_hdac_regmap_update_amp(&(codec)->core, nid, ch, dir, idx, mask, val)133 int ch, int dir, int idx, int mask, int val);
134int snd_hda_codec_amp_stereo(struct hda_codec *codec, hda_nid_t nid,134int snd_hda_codec_amp_stereo(struct hda_codec *codec, hda_nid_t nid,
135 int dir, int idx, int mask, int val);135 int dir, int idx, int mask, int val);
136int snd_hda_codec_amp_init(struct hda_codec *codec, hda_nid_t nid, int ch,136int snd_hda_codec_amp_init(struct hda_codec *codec, hda_nid_t nid, int ch,
sound/usb/quirks.c+3−2
@@ -1267,8 +1267,9 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip, · 1266 unmodified lines
1267 if (fp->altsetting == 2)1267 if (fp->altsetting == 2)
1268 return SNDRV_PCM_FMTBIT_DSD_U32_BE;1268 return SNDRV_PCM_FMTBIT_DSD_U32_BE;
1269 break;1269 break;
1270 /* DIYINHK DSD DXD 384kHz USB to I2S/DSD */1270
1271 case USB_ID(0x20b1, 0x2009):1271 case USB_ID(0x20b1, 0x2009): /* DIYINHK DSD DXD 384kHz USB to I2S/DSD */
1272 case USB_ID(0x20b1, 0x2023): /* JLsounds I2SoverUSB */
1272 if (fp->altsetting == 3)1273 if (fp->altsetting == 3)
1273 return SNDRV_PCM_FMTBIT_DSD_U32_BE;1274 return SNDRV_PCM_FMTBIT_DSD_U32_BE;
1274 break;1275 break;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t