Skip to contentSkip to conversation

ALSA: cs5535audio: fix ACC_BM[x]_CMD register handling

PATCH In review Andres Salomon 2 participants 2 messages Aug 30, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 4/5 ALSA: cs5535audio: fix ACC_BM[x]_CMD register handling

ACcording to 6.3.2.7 of the cs5535/cs5536 data sheets, the ACC_BM[x]_CMD registers are only 8 bits wide. This driver treats them as 32 bits wide, and also has bits in the wrong place. Simple fix to the definitions.

---

 sound/pci/cs5535audio/cs5535audio.h |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
sound/pci/cs5535audio/cs5535audio.h +5 -5
index c7a2044..516219a 100644
@@ -62,11 +62,11 @@
 #define EOP				(1<<0)
 #define BM_EOP_ERR			(1<<1)
 /* ACC_BMX_CTL */
-#define BM_CTL_EN			0x00000001
-#define BM_CTL_PAUSE			0x00000011
-#define BM_CTL_DIS			0x00000000
-#define BM_CTL_BYTE_ORD_LE		0x00000000
-#define BM_CTL_BYTE_ORD_BE		0x00000100
+#define BM_CTL_EN			0x01
+#define BM_CTL_PAUSE			0x03
+#define BM_CTL_DIS			0x00
+#define BM_CTL_BYTE_ORD_LE		0x00
+#define BM_CTL_BYTE_ORD_BE		0x04
 /* cs5535 specific ac97 codec register defines */
 #define CMD_MASK			0xFF00FFFF
 #define CMD_NEW				0x00010000
Acked-by on v1 4/5
#1 lore raw
Quoted 6 lines · Andres Salomon

ACcording to 6.3.2.7 of the cs5535/cs5536 data sheets, the ACC_BM[x]_CMD registers are only 8 bits wide. This driver treats them as 32 bits wide, and also has bits in the wrong place. Simple fix to the definitions.

Quoted 28 lines

---

 sound/pci/cs5535audio/cs5535audio.h |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
sound/pci/cs5535audio/cs5535audio.h +5 -5
index c7a2044..516219a 100644
@@ -62,11 +62,11 @@
 #define EOP				(1<<0)
 #define BM_EOP_ERR			(1<<1)
 /* ACC_BMX_CTL */
-#define BM_CTL_EN			0x00000001
-#define BM_CTL_PAUSE			0x00000011
-#define BM_CTL_DIS			0x00000000
-#define BM_CTL_BYTE_ORD_LE		0x00000000
-#define BM_CTL_BYTE_ORD_BE		0x00000100
+#define BM_CTL_EN			0x01
+#define BM_CTL_PAUSE			0x03
+#define BM_CTL_DIS			0x00
+#define BM_CTL_BYTE_ORD_LE		0x00
+#define BM_CTL_BYTE_ORD_BE		0x04
 /* cs5535 specific ac97 codec register defines */
 #define CMD_MASK			0xFF00FFFF
 #define CMD_NEW				0x00010000
Signature · 3 lines
Jordan Crouse
Systems Software Development Engineer 
Advanced Micro Devices, Inc.