All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ASoC: STA32x: filter coefficients, bug fix
@ 2011-07-11 15:01 Johannes Stezenbach
  2011-07-11 15:01 ` [PATCH 1/2] ASoC: STA32x: Add mixer controls for biquad coefficients Johannes Stezenbach
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Johannes Stezenbach @ 2011-07-11 15:01 UTC (permalink / raw)
  To: alsa-devel; +Cc: Mark Brown, Liam Girdwood, Daniel Mack

Hi,

here are two patches for the ST STA32x ASoC codec driver.
The first one adds SNDRV_CTL_ELEM_TYPE_BYTES controls
for access to the biquad filter coefficients.  I haven't found
any other driver using SNDRV_CTL_ELEM_TYPE_BYTES in this way,
but it works nicely.  The coefficients can be set with
amixer (although amixer has a quirk in that it prints
the values in hex but can read them only as decimal).

# amixer cget name='Ch1 - Biquad 1'
numid=43,iface=MIXER,name='Ch1 - Biquad 1'
  ; type=BYTES,access=rw------,values=15
  : values=0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00

# amixer cset name='Ch1 - Biquad 1' 12,34,0,0,0,0,0,0,0,0,0,0,0,255,78
numid=43,iface=MIXER,name='Ch1 - Biquad 1'
  ; type=BYTES,access=rw------,values=15
  : values=0x0c,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x4e

Due to the way the internal coeffcient RAM is accessed, the
corresponding I2C registers are volatile, thus I added the
.volatile_register function in this patch.

The second patch preserves reset values as required by the
chip documentation, it is mainly for future compatibility
and was added during hardware testing to rule out issues from
this side, although it did not make a difference in my tests.
However, the chip spec insists it is important.


Thanks
Johannes

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

end of thread, other threads:[~2011-07-13 15:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-11 15:01 [PATCH 0/2] ASoC: STA32x: filter coefficients, bug fix Johannes Stezenbach
2011-07-11 15:01 ` [PATCH 1/2] ASoC: STA32x: Add mixer controls for biquad coefficients Johannes Stezenbach
2011-07-11 15:01 ` [PATCH 2/2] ASoC: STA32x: Preserve reserved register bits Johannes Stezenbach
2011-07-13 15:25 ` [PATCH 0/2] ASoC: STA32x: filter coefficients, bug fix Mark Brown

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.