On Wed, Oct 28, 2009 at 12:46:21PM +0800, Wu Fengguang wrote:
> - if add a 800ms sleep in intel_hdmi_playback_pcm_prepare(), the
>   first-0.5s-samples-lost problem disappears

I managed to locate the HDA command that caused the delay :)

        void snd_hda_codec_setup_stream(struct hda_codec *codec, hda_nid_t nid,
                                        u32 stream_tag,
                                        int channel_id, int format)
        {      
                if (!nid)
                        return;

                snd_printdd("hda_codec_setup_stream: "
                            "NID=0x%x, stream=0x%x, channel=%d, format=0x%x\n",
                            nid, stream_tag, channel_id, format);
==>             snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CHANNEL_STREAMID,
                                    (stream_tag << 4) | channel_id);
+               msleep(500);


If the msleep() is added before the AC_VERB_SET_CHANNEL_STREAMID line,
problem remains; if added after it, problem disappears.

However it's very unclear how it can be fixed in a more sane way..

Thanks,
Fengguang

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to