[alsa-devel] hda- Disable Sticky PCM

Takashi Iwai tiwai at suse.de
Tue Sep 20 08:37:57 CEST 2011


At Tue, 20 Sep 2011 08:15:09 +0800,
Raymond Yau wrote:
> 
> 2011/9/18 Takashi Iwai <tiwai at suse.de>:
> >
> > Well, I can't reproduce it in hda-emu, so I don't know now.
> > Try to get a stacktrace to see what's calling there actually.
> >
> 
> 
> set stream active : active stream  1
> ALSA hda_intel.c:1757: azx_pcm_prepare: bufsize=0xd750, format=0x4111
> ALSA hda_codec.c:1412: hda_codec_setup_stream: NID=0x4, stream=0x5,
> channel=0, format=0x4111
> ALSA hda_codec.c:1412: hda_codec_setup_stream: NID=0x3, stream=0x5,
> channel=0, format=0x4111
> ALSA hda_codec.c:1412: hda_codec_setup_stream: NID=0x6, stream=0x5,
> channel=0, format=0x4111
> ALSA hda_codec.c:1412: hda_codec_setup_stream: NID=0x5, stream=0x5,
> channel=0, format=0x4111
> ALSA hda_codec.c:1412: hda_codec_setup_stream: NID=0xa, stream=0x5,
> channel=0, format=0x4111
> hda-intel: IRQ timing workaround is activated for card #1. Suggest a
> bigger bdl_pos_adj.
> ALSA hda_codec.c:1475: hda_codec_cleanup_stream: NID=0x4
> ------------[ cut here ]------------
(snip)

Thanks, so it's called from hw_free.  This is a call just to be sure,
and should be harmless.  If you mind, the verbs are suppressed by a
patch like below.


Takashi

---
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 6b611d5..e3db196 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -1491,8 +1491,11 @@ static void really_cleanup_stream(struct hda_codec *codec,
 				  struct hda_cvt_setup *q)
 {
 	hda_nid_t nid = q->nid;
-	snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CHANNEL_STREAMID, 0);
-	snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_STREAM_FORMAT, 0);
+	if (q->stream_tag || q->channel_id)
+		snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CHANNEL_STREAMID, 0);
+	if (q->format_id)
+		snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_STREAM_FORMAT, 0
+);
 	memset(q, 0, sizeof(*q));
 	q->nid = nid;
 }


More information about the Alsa-devel mailing list