[alsa-devel] [PATCH v4 11/19] ALSA: Oxygen: Modify CS4245 register dumping function

Roman Volkov v1ron at mail.ru
Fri Jan 24 13:18:12 CET 2014


Change the function to read the data from the new shadow buffer.

Signed-off-by: Roman Volkov <v1ron at mail.ru>
---
 sound/pci/oxygen/xonar_dg.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/sound/pci/oxygen/xonar_dg.c b/sound/pci/oxygen/xonar_dg.c
index a7dc39d..b277f0d 100644
--- a/sound/pci/oxygen/xonar_dg.c
+++ b/sound/pci/oxygen/xonar_dg.c
@@ -626,11 +626,12 @@ static void dump_cs4245_registers(struct oxygen *chip,
 				  struct snd_info_buffer *buffer)
 {
 	struct dg *data = chip->model_data;
-	unsigned int i;
+	unsigned int addr;
 
 	snd_iprintf(buffer, "\nCS4245:");
-	for (i = 1; i <= 0x10; ++i)
-		snd_iprintf(buffer, " %02x", data->cs4245_shadow[i]);
+	cs4245_read_spi(chip, CS4245_INT_STATUS);
+	for (addr = 1; addr < ARRAY_SIZE(data->cs4245_shadow); addr++)
+		snd_iprintf(buffer, " %02x", data->cs4245_shadow[addr]);
 	snd_iprintf(buffer, "\n");
 }
 
-- 
1.7.10.4



More information about the Alsa-devel mailing list