Skip to contentSkip to conversation

ASoC: Fix wrong define for AD1836_ADC_WORD_OFFSET

PATCH Applied Axel Lin 3 participants 3 messages Nov 22, 2011

Subsystems (3)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 ASoC: Fix wrong define for AD1836_ADC_WORD_OFFSET

According to the datasheet:
The BIT[5:4] of ADC Control Register 2 is to control the word width.

        00 = 25 Bits
        01 = 20 Bits
        10 = 16 Bits
        11 = Invalid

Thus, the AD1836_ADC_WORD_OFFSET should be defined as 4.

---
 sound/soc/codecs/ad1836.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/codecs/ad1836.h +1 -1
index 444747f..dd7be0d 100644
@@ -34,7 +34,7 @@
 
 #define AD1836_ADC_CTRL2               13
 #define AD1836_ADC_WORD_LEN_MASK       0x30
-#define AD1836_ADC_WORD_OFFSET         5
+#define AD1836_ADC_WORD_OFFSET         4
 #define AD1836_ADC_SERFMT_MASK         (7 << 6)
 #define AD1836_ADC_SERFMT_PCK256       (0x4 << 6)
 #define AD1836_ADC_SERFMT_PCK128       (0x5 << 6)
Signature · 1 line
1.7.5.4
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Axel Lin

According to the datasheet:
The BIT[5:4] of ADC Control Register 2 is to control the word width.

        00 = 25 Bits
        01 = 20 Bits
        10 = 16 Bits
        11 = Invalid

Thus, the AD1836_ADC_WORD_OFFSET should be defined as 4.

Thanks

Quoted 17 lines
---
 sound/soc/codecs/ad1836.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/codecs/ad1836.h +1 -1
index 444747f..dd7be0d 100644
@@ -34,7 +34,7 @@
 
 #define AD1836_ADC_CTRL2               13
 #define AD1836_ADC_WORD_LEN_MASK       0x30
-#define AD1836_ADC_WORD_OFFSET         5
+#define AD1836_ADC_WORD_OFFSET         4
 #define AD1836_ADC_SERFMT_MASK         (7 << 6)
 #define AD1836_ADC_SERFMT_PCK256       (0x4 << 6)
 #define AD1836_ADC_SERFMT_PCK128       (0x5 << 6)
Applied
#2 lore raw
In reply to Axel Lin
Quoted 10 lines · Axel Lin

According to the datasheet:
The BIT[5:4] of ADC Control Register 2 is to control the word width.

        00 = 25 Bits
        01 = 20 Bits
        10 = 16 Bits
        11 = Invalid

Thus, the AD1836_ADC_WORD_OFFSET should be defined as 4.

Applied, thanks.