summaryrefslogtreecommitdiffstats
path: root/sound/pci/oxygen/xonar_dg.h
diff options
context:
space:
mode:
authorRoman Volkov <v1ron@mail.ru>2014-01-24 16:18:08 +0400
committerClemens Ladisch <clemens@ladisch.de>2014-01-29 20:45:46 +0100
commitbed61935cc5b70f84480dfd465c0e15a060c1f2c (patch)
treea347a0d361fafdf9110dd75d911df9e8b2031219 /sound/pci/oxygen/xonar_dg.h
parentddd624c332698eb3ee5293bca6b5b3a97d05c0b6 (diff)
downloadtalos-op-linux-bed61935cc5b70f84480dfd465c0e15a060c1f2c.tar.gz
talos-op-linux-bed61935cc5b70f84480dfd465c0e15a060c1f2c.zip
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/xonar_dg.h')
-rw-r--r--sound/pci/oxygen/xonar_dg.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/pci/oxygen/xonar_dg.h b/sound/pci/oxygen/xonar_dg.h
index 081269224850..f2fa846d7246 100644
--- a/sound/pci/oxygen/xonar_dg.h
+++ b/sound/pci/oxygen/xonar_dg.h
@@ -18,7 +18,14 @@
#define PLAYBACK_DST_HP_FP 1
#define PLAYBACK_DST_MULTICH 2
+enum cs4245_shadow_operation {
+ CS4245_SAVE_TO_SHADOW,
+ CS4245_LOAD_FROM_SHADOW
+};
+
struct dg {
+ /* shadow copy of the CS4245 register space */
+ unsigned char cs4245_shadow[17];
unsigned int output_sel;
s8 input_vol[4][2];
unsigned int input_sel;
OpenPOWER on IntegriCloud