diff options
author | Roman Volkov <v1ron@mail.ru> | 2014-01-24 16:18:08 +0400 |
---|---|---|
committer | Clemens Ladisch <clemens@ladisch.de> | 2014-01-29 20:45:46 +0100 |
commit | bed61935cc5b70f84480dfd465c0e15a060c1f2c (patch) | |
tree | a347a0d361fafdf9110dd75d911df9e8b2031219 /sound/pci/oxygen/cs4245.h | |
parent | ddd624c332698eb3ee5293bca6b5b3a97d05c0b6 (diff) | |
download | op-kernel-dev-bed61935cc5b70f84480dfd465c0e15a060c1f2c.zip op-kernel-dev-bed61935cc5b70f84480dfd465c0e15a060c1f2c.tar.gz |
ALSA: oxygen: Xonar DG(X): add new CS4245 SPI functions
Add the new SPI write and read functions. The SPI read function
is used for creating initial registers dump and may be used for
debugging purposes. SPI operations are cached, so there is a new
function to manage the cache (shadow). I have to remove
the shift from the CS4245_SPI_* constants, since when
we are performing the reading, we need to shift by 8 instead
of 16.
Signed-off-by: Roman Volkov <v1ron@mail.ru>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'sound/pci/oxygen/cs4245.h')
-rw-r--r-- | sound/pci/oxygen/cs4245.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/pci/oxygen/cs4245.h b/sound/pci/oxygen/cs4245.h index 5e0197e..9909865 100644 --- a/sound/pci/oxygen/cs4245.h +++ b/sound/pci/oxygen/cs4245.h @@ -102,6 +102,9 @@ #define CS4245_ADC_OVFL 0x02 #define CS4245_ADC_UNDRFL 0x01 +#define CS4245_SPI_ADDRESS_S (0x9e << 16) +#define CS4245_SPI_WRITE_S (0 << 16) -#define CS4245_SPI_ADDRESS (0x9e << 16) -#define CS4245_SPI_WRITE (0 << 16) +#define CS4245_SPI_ADDRESS 0x9e +#define CS4245_SPI_WRITE 0 +#define CS4245_SPI_READ 1 |