45 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
From 1f2109de8368f08a353d7862f462b943a5ac4b4a Mon Sep 17 00:00:00 2001
 | 
						|
From: Takashi Iwai <tiwai@suse.de>
 | 
						|
Date: Fri, 18 Mar 2016 19:45:13 +0100
 | 
						|
Subject: [PATCH 3/3] ALSA: hda - Fix spurious kernel WARNING on Baytrail HDMI
 | 
						|
MIME-Version: 1.0
 | 
						|
Content-Type: text/plain; charset=UTF-8
 | 
						|
Content-Transfer-Encoding: 8bit
 | 
						|
 | 
						|
snd_hdac_sync_audio_rate() call is mandatory only for HSW and later
 | 
						|
models, but we call the function unconditionally blindly assuming that
 | 
						|
the function doesn't do anything harmful.  But since recently, the
 | 
						|
function checks the validity of the passed pin NID, and eventually
 | 
						|
spews the warning if an unexpected pin is passed.  This is seen on old
 | 
						|
chips like Baytrail.
 | 
						|
 | 
						|
The fix is to limit the call of this function again only for the chips
 | 
						|
with the proper binding.  This can be identified by the same flag as
 | 
						|
the eld notifier.
 | 
						|
 | 
						|
Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
 | 
						|
Tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
 | 
						|
Cc: <stable@vger.kernel.org> # v4.5
 | 
						|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
 | 
						|
---
 | 
						|
 sound/pci/hda/patch_hdmi.c | 3 ++-
 | 
						|
 1 file changed, 2 insertions(+), 1 deletion(-)
 | 
						|
 | 
						|
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
 | 
						|
index e7d9453ecd10..56d3575ee6cc 100644
 | 
						|
--- a/sound/pci/hda/patch_hdmi.c
 | 
						|
+++ b/sound/pci/hda/patch_hdmi.c
 | 
						|
@@ -1741,7 +1741,8 @@ 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 */
 | 
						|
-	snd_hdac_sync_audio_rate(&codec->bus->core, pin_nid, runtime->rate);
 | 
						|
+	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);
 | 
						|
 	mutex_lock(&per_pin->lock);
 | 
						|
-- 
 | 
						|
2.5.0
 | 
						|
 |