[alsa-devel] [PATCH 1/2] ALSA: hdmi - poll eld at resume time
Wang, Xingchao
xingchao.wang at intel.com
Wed Jun 26 06:28:43 CEST 2013
Hi Takashi,
> -----Original Message-----
> From: Wang, Xingchao
> Sent: Tuesday, June 25, 2013 4:30 PM
> To: Takashi Iwai
> Cc: alsa-devel at alsa-project.org; Wang Xingchao
[snip]
> > > >
> > > > Do you assume jackpoll_interval be non-zero? If so the
> > > > hda_jackpoll_work
> > will continue to run periodically.
> > > > IMO the callback just need be called only once at resume time.
> > >
> > > Hmm, the problem is that the callback updater isn't called in the
> > > resume path as default. The oneliner below will fix it.
> >
> > Forgot to attach...
>
> Yes, it works if call snd_hda_jack_poll_all(codec) directly, but sometimes read
> pin sense value is 0xc000,0000 even unplug monitor, and eld# will keep valid all
> the time.
> Although sometimes it works(the ELD info refreshed correctly), you have to
> wake up controller/codec before check eld info(cat codec# or play a piece of
> audio).
The fix is not enough.
When hotplug event happen and codec/controller in active state, hdmi_intrinsic_event() will be called.
In such scenario, jack event would be reported but not handled(hdmi_present_sense() was moved to callback).
So there's no eld info updated, have to trigger codec_resume to update the eld info.
If App depends on ELD# info to check external monitor status, it may cause confuse as eld# under /proc donot
Provide realtime information.
Thanks
--xingchao
>
> Thanks
> --xingchao
>
> >
> >
> > Takashi
> >
> > ---
> > diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
> > index
> > 35090b3..86d4709 100644
> > --- a/sound/pci/hda/hda_codec.c
> > +++ b/sound/pci/hda/hda_codec.c
> > @@ -3942,6 +3942,7 @@ static void hda_call_codec_resume(struct
> > hda_codec *codec)
> > codec->patch_ops.init(codec);
> > snd_hda_codec_resume_amp(codec);
> > snd_hda_codec_resume_cache(codec);
> > + snd_hda_jack_poll_all(codec);
> > }
> >
> > if (codec->jackpoll_interval)
More information about the Alsa-devel
mailing list