Re: [RFC PATCH] ALSA: hda: call ext hda codec link up/down if available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 04 Feb 2021 11:42:20 +0100,
Kai Vehmanen wrote:
> 
> Hey,
> 
> On Thu, 4 Feb 2021, Takashi Iwai wrote:
> 
> > On Thu, 04 Feb 2021 09:07:09 +0100, Kai Vehmanen wrote:
> > > Takashi and others, this patch is a follow-up to the earlier thread about 
> > > hdac link management:
> > > https://mailman.alsa-project.org/pipermail/alsa-devel/2021-January/179715.html
> > > 
> > > We have absolutely no calls from sound/pci/hda/ to hdaudio_ext.h before
> > > this patch, so I'm wondering if this is the right approach to take. 
> > 
> > An obvious drawback by this patch is that it'll make the hda-ext code
> > always loaded whenever it's enabled, no matter whether it's really
> > used or not.
> > 
> > Maybe adding a new callback (link) in hdac_bus_ops can help?
> 
> hmm, that's true. Let me try adding a separate callback and resend for 
> review. That will look cleaner in hda_codec.c.

Thanks.

BTW, one more thing: the code link up/down isn't always paired.  It's
a bit map and only holding states.  For example, in hda_codec.c, the
link power down may happen conditionally marked in
hda_codec_runtime_suspend() while the resume always marks the link
power up.  So you'd need to check the bitmap change to perform the
refcount up/down in the hda-ext side.


Takashi



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux