forked from Minki/linux
sound fixes for 4.6-rc1
The previous pull request introduced a few WARN_ON() for Intel HD-audio HDMI. Indeed it caught bugs, and now users get annoyed. So this request came up: a collection of small fixes to paper over the inconsistencies on (mostly) old Intel chipsets. In addition, a trivial USB-audio quirk is included, too. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJW8R25AAoJEGwxgFQ9KSmkwVsP/2vrRqqDcKKotz90MOJzy7Ll xAgULBLFaz9K7w8g005wjBNfHFhKOgIelHqKItsBR9IOIXAcDhwwqfsgSu/nl/D1 UyvCN4lQvZV6ksFwnPg8Z7w31BmWdncBT2DV/MA+HmcCnJLL7JvZbuW5hDNyozp9 npVvZlVN6fUNGI0D75TtDXJSY45h87cTzY8g519FkJrd5kuklkaGwd79Ak6VnucD MPTSwxluEl8xUgzvY+Po+k50rHla2WXm0h0k5Ut10xGRbs1GAczQy58wXrueFRlD Pq/1cVh8RKppFekpFp4lEK7HAgo8Ml5sTod1V3FFa2Q3LIrb63pereFbPO/S6rjS N0oeFmGRYR7nDSnnAOg3IXCfRuki6K6pxliplNIENJpG5e+saVeEjsSbpcgaFRJ6 a1uvo2ikpGbtWrgTAbW2m8fecnqJU8DPK9IyDS5OYaJ4ffjeJtUDxL6J+j5haUUc 36Ego02LpmucBDgw1Xt701Ee9aVNuuFcS6jOqyv7DM6MzT5IhOLzv9CzjTbJVPax oNSGjxQJ7Qnq8kABgjr2POtjjnx/b9jGnbU0YkB7ObAKOINQKWmQGO22pE7EVByF 0czcV+eEjvdqKzjfj00SHnGX7MI15bBWDQWy4vxz/mJZrua9oYaTQaRVaotlpaq/ 9H1jjfitzhfVINceQiBd =ac9g -----END PGP SIGNATURE----- Merge tag 'sound-fix-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "The previous pull request introduced a few WARN_ON() for Intel HD-audio HDMI. Indeed it caught bugs, and now users get annoyed. So this request came up: a collection of small fixes to paper over the inconsistencies on (mostly) old Intel chipsets. In addition, a trivial USB-audio quirk is included, too" * tag 'sound-fix-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Fix missing ELD update at unplugging ALSA: usb-audio: add Microsoft HD-5001 to quirks ALSA: hda - Workaround for unbalanced i915 power refcount by concurrent probe ALSA: hda - Fix spurious kernel WARNING on Baytrail HDMI ALSA: hda - Fix forgotten HDMI monitor_present update ALSA: hda - Really restrict i915 notifier to HSW+
This commit is contained in:
commit
87cf815b9e
@ -152,6 +152,7 @@ struct hdmi_spec {
|
||||
struct hda_pcm_stream pcm_playback;
|
||||
|
||||
/* i915/powerwell (Haswell+/Valleyview+) specific */
|
||||
bool use_acomp_notifier; /* use i915 eld_notify callback for hotplug */
|
||||
struct i915_audio_component_audio_ops i915_audio_ops;
|
||||
bool i915_bound; /* was i915 bound in this driver? */
|
||||
|
||||
@ -159,8 +160,11 @@ struct hdmi_spec {
|
||||
};
|
||||
|
||||
#ifdef CONFIG_SND_HDA_I915
|
||||
#define codec_has_acomp(codec) \
|
||||
((codec)->bus->core.audio_component != NULL)
|
||||
static inline bool codec_has_acomp(struct hda_codec *codec)
|
||||
{
|
||||
struct hdmi_spec *spec = codec->spec;
|
||||
return spec->use_acomp_notifier;
|
||||
}
|
||||
#else
|
||||
#define codec_has_acomp(codec) false
|
||||
#endif
|
||||
@ -1354,6 +1358,7 @@ static void update_eld(struct hda_codec *codec,
|
||||
eld->eld_size) != 0)
|
||||
eld_changed = true;
|
||||
|
||||
pin_eld->monitor_present = eld->monitor_present;
|
||||
pin_eld->eld_valid = eld->eld_valid;
|
||||
pin_eld->eld_size = eld->eld_size;
|
||||
if (eld->eld_valid)
|
||||
@ -1479,11 +1484,10 @@ static void sync_eld_via_acomp(struct hda_codec *codec,
|
||||
int size;
|
||||
|
||||
mutex_lock(&per_pin->lock);
|
||||
eld->monitor_present = false;
|
||||
size = snd_hdac_acomp_get_eld(&codec->bus->core, per_pin->pin_nid,
|
||||
&eld->monitor_present, eld->eld_buffer,
|
||||
ELD_MAX_SIZE);
|
||||
if (size < 0)
|
||||
goto unlock;
|
||||
if (size > 0) {
|
||||
size = min(size, ELD_MAX_SIZE);
|
||||
if (snd_hdmi_parse_eld(codec, &eld->info,
|
||||
@ -1736,6 +1740,7 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
|
||||
|
||||
/* Call sync_audio_rate to set the N/CTS/M manually if necessary */
|
||||
/* Todo: add DP1.2 MST audio support later */
|
||||
if (codec_has_acomp(codec))
|
||||
snd_hdac_sync_audio_rate(&codec->bus->core, pin_nid, runtime->rate);
|
||||
|
||||
non_pcm = check_non_pcm_per_cvt(codec, cvt_nid);
|
||||
@ -2248,12 +2253,24 @@ static int patch_generic_hdmi(struct hda_codec *codec)
|
||||
codec->spec = spec;
|
||||
hdmi_array_init(spec, 4);
|
||||
|
||||
#ifdef CONFIG_SND_HDA_I915
|
||||
/* Try to bind with i915 for Intel HSW+ codecs (if not done yet) */
|
||||
if (!codec_has_acomp(codec) &&
|
||||
(codec->core.vendor_id >> 16) == 0x8086 &&
|
||||
is_haswell_plus(codec))
|
||||
if ((codec->core.vendor_id >> 16) == 0x8086 &&
|
||||
is_haswell_plus(codec)) {
|
||||
#if 0
|
||||
/* on-demand binding leads to an unbalanced refcount when
|
||||
* both i915 and hda drivers are probed concurrently;
|
||||
* disabled temporarily for now
|
||||
*/
|
||||
if (!codec->bus->core.audio_component)
|
||||
if (!snd_hdac_i915_init(&codec->bus->core))
|
||||
spec->i915_bound = true;
|
||||
#endif
|
||||
/* use i915 audio component notifier for hotplug */
|
||||
if (codec->bus->core.audio_component)
|
||||
spec->use_acomp_notifier = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (is_haswell_plus(codec)) {
|
||||
intel_haswell_enable_all_pins(codec, true);
|
||||
|
@ -1126,6 +1126,7 @@ bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip)
|
||||
switch (chip->usb_id) {
|
||||
case USB_ID(0x045E, 0x075D): /* MS Lifecam Cinema */
|
||||
case USB_ID(0x045E, 0x076D): /* MS Lifecam HD-5000 */
|
||||
case USB_ID(0x045E, 0x076E): /* MS Lifecam HD-5001 */
|
||||
case USB_ID(0x045E, 0x076F): /* MS Lifecam HD-6000 */
|
||||
case USB_ID(0x045E, 0x0772): /* MS Lifecam Studio */
|
||||
case USB_ID(0x045E, 0x0779): /* MS Lifecam HD-3000 */
|
||||
|
Loading…
Reference in New Issue
Block a user