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

Pull sound fixes from Takashi Iwai:
"Again a relatively calm week without surprise: most of fixes are about
HD-audio, including fixes for Cirrus codec regression and a race over
regmap access. Although both change are slightly unintuitive, the
risk of further breakage is quite low, I hope.

Other than that, all the rest are trivial"

* tag 'sound-4.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda - Fix possible race on regmap bypass flip
ALSA: pcxhr: Fix missing mutex unlock
ALSA: hda - add PCI ID for Intel Broxton-T
ALSA: hda - Keep powering up ADCs on Cirrus codecs
ALSA: hda/realtek - Add ALC3234 headset mode for Optiplex 9020m
ALSA - hda: hdmi check NULL pointer in hdmi_set_chmap
ALSA: hda - Don't trust the reported actual power state

+59 -20
+2
include/sound/hda_regmap.h
··· 17 17 unsigned int verb); 18 18 int snd_hdac_regmap_read_raw(struct hdac_device *codec, unsigned int reg, 19 19 unsigned int *val); 20 + int snd_hdac_regmap_read_raw_uncached(struct hdac_device *codec, 21 + unsigned int reg, unsigned int *val); 20 22 int snd_hdac_regmap_write_raw(struct hdac_device *codec, unsigned int reg, 21 23 unsigned int val); 22 24 int snd_hdac_regmap_update_raw(struct hdac_device *codec, unsigned int reg,
+4 -6
sound/hda/hdac_device.c
··· 299 299 int snd_hdac_read_parm_uncached(struct hdac_device *codec, hda_nid_t nid, 300 300 int parm) 301 301 { 302 - int val; 302 + unsigned int cmd, val; 303 303 304 - if (codec->regmap) 305 - regcache_cache_bypass(codec->regmap, true); 306 - val = snd_hdac_read_parm(codec, nid, parm); 307 - if (codec->regmap) 308 - regcache_cache_bypass(codec->regmap, false); 304 + cmd = snd_hdac_regmap_encode_verb(nid, AC_VERB_PARAMETERS) | parm; 305 + if (snd_hdac_regmap_read_raw_uncached(codec, cmd, &val) < 0) 306 + return -1; 309 307 return val; 310 308 } 311 309 EXPORT_SYMBOL_GPL(snd_hdac_read_parm_uncached);
+28 -12
sound/hda/hdac_regmap.c
··· 453 453 EXPORT_SYMBOL_GPL(snd_hdac_regmap_write_raw); 454 454 455 455 static int reg_raw_read(struct hdac_device *codec, unsigned int reg, 456 - unsigned int *val) 456 + unsigned int *val, bool uncached) 457 457 { 458 - if (!codec->regmap) 458 + if (uncached || !codec->regmap) 459 459 return hda_reg_read(codec, reg, val); 460 460 else 461 461 return regmap_read(codec->regmap, reg, val); 462 + } 463 + 464 + static int __snd_hdac_regmap_read_raw(struct hdac_device *codec, 465 + unsigned int reg, unsigned int *val, 466 + bool uncached) 467 + { 468 + int err; 469 + 470 + err = reg_raw_read(codec, reg, val, uncached); 471 + if (err == -EAGAIN) { 472 + err = snd_hdac_power_up_pm(codec); 473 + if (!err) 474 + err = reg_raw_read(codec, reg, val, uncached); 475 + snd_hdac_power_down_pm(codec); 476 + } 477 + return err; 462 478 } 463 479 464 480 /** ··· 488 472 int snd_hdac_regmap_read_raw(struct hdac_device *codec, unsigned int reg, 489 473 unsigned int *val) 490 474 { 491 - int err; 492 - 493 - err = reg_raw_read(codec, reg, val); 494 - if (err == -EAGAIN) { 495 - err = snd_hdac_power_up_pm(codec); 496 - if (!err) 497 - err = reg_raw_read(codec, reg, val); 498 - snd_hdac_power_down_pm(codec); 499 - } 500 - return err; 475 + return __snd_hdac_regmap_read_raw(codec, reg, val, false); 501 476 } 502 477 EXPORT_SYMBOL_GPL(snd_hdac_regmap_read_raw); 478 + 479 + /* Works like snd_hdac_regmap_read_raw(), but this doesn't read from the 480 + * cache but always via hda verbs. 481 + */ 482 + int snd_hdac_regmap_read_raw_uncached(struct hdac_device *codec, 483 + unsigned int reg, unsigned int *val) 484 + { 485 + return __snd_hdac_regmap_read_raw(codec, reg, val, true); 486 + } 503 487 504 488 /** 505 489 * snd_hdac_regmap_update_raw - update a pseudo register with power mgmt
+4 -2
sound/pci/hda/hda_generic.c
··· 826 826 bool allow_powerdown) 827 827 { 828 828 hda_nid_t nid, changed = 0; 829 - int i, state; 829 + int i, state, power; 830 830 831 831 for (i = 0; i < path->depth; i++) { 832 832 nid = path->path[i]; ··· 838 838 state = AC_PWRST_D0; 839 839 else 840 840 state = AC_PWRST_D3; 841 - if (!snd_hda_check_power_state(codec, nid, state)) { 841 + power = snd_hda_codec_read(codec, nid, 0, 842 + AC_VERB_GET_POWER_STATE, 0); 843 + if (power != (state | (state << 4))) { 842 844 snd_hda_codec_write(codec, nid, 0, 843 845 AC_VERB_SET_POWER_STATE, state); 844 846 changed = nid;
+3
sound/pci/hda/hda_intel.c
··· 2232 2232 /* Broxton-P(Apollolake) */ 2233 2233 { PCI_DEVICE(0x8086, 0x5a98), 2234 2234 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_BROXTON }, 2235 + /* Broxton-T */ 2236 + { PCI_DEVICE(0x8086, 0x1a98), 2237 + .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_BROXTON }, 2235 2238 /* Haswell */ 2236 2239 { PCI_DEVICE(0x8086, 0x0a0c), 2237 2240 .driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL },
+14
sound/pci/hda/patch_cirrus.c
··· 361 361 { 362 362 struct cs_spec *spec = codec->spec; 363 363 int err; 364 + int i; 364 365 365 366 err = snd_hda_parse_pin_defcfg(codec, &spec->gen.autocfg, NULL, 0); 366 367 if (err < 0) ··· 370 369 err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg); 371 370 if (err < 0) 372 371 return err; 372 + 373 + /* keep the ADCs powered up when it's dynamically switchable */ 374 + if (spec->gen.dyn_adc_switch) { 375 + unsigned int done = 0; 376 + for (i = 0; i < spec->gen.input_mux.num_items; i++) { 377 + int idx = spec->gen.dyn_adc_idx[i]; 378 + if (done & (1 << idx)) 379 + continue; 380 + snd_hda_gen_fix_pin_power(codec, 381 + spec->gen.adc_nids[idx]); 382 + done |= 1 << idx; 383 + } 384 + } 373 385 374 386 return 0; 375 387 }
+2
sound/pci/hda/patch_hdmi.c
··· 1858 1858 struct hdmi_spec *spec = codec->spec; 1859 1859 struct hdmi_spec_per_pin *per_pin = pcm_idx_to_pin(spec, pcm_idx); 1860 1860 1861 + if (!per_pin) 1862 + return; 1861 1863 mutex_lock(&per_pin->lock); 1862 1864 per_pin->chmap_set = true; 1863 1865 memcpy(per_pin->chmap, chmap, ARRAY_SIZE(per_pin->chmap));
+1
sound/pci/hda/patch_realtek.c
··· 5449 5449 SND_PCI_QUIRK(0x1028, 0x064a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 5450 5450 SND_PCI_QUIRK(0x1028, 0x064b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 5451 5451 SND_PCI_QUIRK(0x1028, 0x0665, "Dell XPS 13", ALC288_FIXUP_DELL_XPS_13), 5452 + SND_PCI_QUIRK(0x1028, 0x0669, "Dell Optiplex 9020m", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), 5452 5453 SND_PCI_QUIRK(0x1028, 0x069a, "Dell Vostro 5480", ALC290_FIXUP_SUBWOOFER_HSJACK), 5453 5454 SND_PCI_QUIRK(0x1028, 0x06c7, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), 5454 5455 SND_PCI_QUIRK(0x1028, 0x06d9, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
+1
sound/pci/pcxhr/pcxhr_core.c
··· 1341 1341 } 1342 1342 1343 1343 pcxhr_msg_thread(mgr); 1344 + mutex_unlock(&mgr->lock); 1344 1345 return IRQ_HANDLED; 1345 1346 }