All of lore.kernel.org
 help / color / mirror / Atom feed
* refreshing the reg cache in asoc driver
@ 2010-09-29  9:43 lin_g
  2010-09-29 17:52 ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: lin_g @ 2010-09-29  9:43 UTC (permalink / raw)
  To: alsa-devel

Hi,
I'm writing the driver for wm8804 s/pdif transceiver. However, my problem is that I would like to refresh my register cache inside the driver by periodically reading the values stored in device's registers. There is an interrupt handler fsi_interrupt() (in fsi.c) called when codec receives some data, but I suppose I need to find something closer to the 'codec layer'. Or maybe I'm just thinking wrongly and there is much simpler way of doing this. Appreciate any advice.

Thank you very much,
best regards,
Greg

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: refreshing the reg cache in asoc driver
  2010-09-29  9:43 refreshing the reg cache in asoc driver lin_g
@ 2010-09-29 17:52 ` Mark Brown
  2010-10-01 10:08   ` Grzegorz Daniluk
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2010-09-29 17:52 UTC (permalink / raw)
  To: lin_g; +Cc: Dimitris Papastamos, alsa-devel

On Wed, Sep 29, 2010 at 11:43:24AM +0200, lin_g wrote:

> I'm writing the driver for wm8804 s/pdif transceiver. However, my

Note that Dimitrios just posted a driver for this to the list earlier
today, which is also available from opensource.wolfsonmicro.com.  It
would be best to work with this driver.

> problem is that I would like to refresh my register cache inside the
> driver by periodically reading the values stored in device's
> registers. There is an interrupt handler fsi_interrupt() (in fsi.c)
> called when codec receives some data, but I suppose I need to find
> something closer to the 'codec layer'. Or maybe I'm just thinking
> wrongly and there is much simpler way of doing this. Appreciate any
> advice.

The bigger question would be why you want to refresh the register cache
- normally this should not be required.  If you do need to do this it
would be better to trigger the refresh off whatever event causes the
register status in the CODEC to get out of sync.  If there are registers
which report status which does change dynamically normally they
shouldn't be cached at all but should instead be treated as volatile and
read back from the CODEC at all times.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: refreshing the reg cache in asoc driver
  2010-09-29 17:52 ` Mark Brown
@ 2010-10-01 10:08   ` Grzegorz Daniluk
  0 siblings, 0 replies; 3+ messages in thread
From: Grzegorz Daniluk @ 2010-10-01 10:08 UTC (permalink / raw)
  To: alsa-devel

Mark Brown wrote:
> Note that Dimitrios just posted a driver for this to the list earlier
> today, which is also available from opensource.wolfsonmicro.com.  It
> would be best to work with this driver.
>   
yes, I saw it later after sending my e-mail, I'll try using this one 
instead of my own.
>
> The bigger question would be why you want to refresh the register cache
> - normally this should not be required.  If you do need to do this it
> would be better to trigger the refresh off whatever event causes the
> register status in the CODEC to get out of sync.  If there are registers
> which report status which does change dynamically normally they
> shouldn't be cached at all but should instead be treated as volatile and
> read back from the CODEC at all times.
>   
Thanks a lot, I thought about it in the wrong way.

Greg

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-01 10:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-29  9:43 refreshing the reg cache in asoc driver lin_g
2010-09-29 17:52 ` Mark Brown
2010-10-01 10:08   ` Grzegorz Daniluk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.