Skip to content

Commit 8321fc0

Browse files
Hans-Christian Egtvedttiwai
Hans-Christian Egtvedt
authored andcommitted
ALSA: snd-atmel-ac97c: cleanup register definitions
This patch will remove traces of channel B registers, since they are not used by the AC97C driver. Channel B might be used for other purposes. The driver also adds channel status bits TXEMPTY and OVRUN and a AC97C_CH_MASK macro to ease clearing a channel settings. Signed-off-by: Hans-Christian Egtvedt <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent 0221c81 commit 8321fc0

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

sound/atmel/ac97c.h

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Register definitions for the Atmel AC97C controller
2+
* Register definitions for Atmel AC97C
33
*
44
* Copyright (C) 2005-2009 Atmel Corporation
55
*
@@ -17,10 +17,6 @@
1717
#define AC97C_CATHR 0x24
1818
#define AC97C_CASR 0x28
1919
#define AC97C_CAMR 0x2c
20-
#define AC97C_CBRHR 0x30
21-
#define AC97C_CBTHR 0x34
22-
#define AC97C_CBSR 0x38
23-
#define AC97C_CBMR 0x3c
2420
#define AC97C_CORHR 0x40
2521
#define AC97C_COTHR 0x44
2622
#define AC97C_COSR 0x48
@@ -46,8 +42,10 @@
4642
#define AC97C_MR_VRA (1 << 2)
4743

4844
#define AC97C_CSR_TXRDY (1 << 0)
45+
#define AC97C_CSR_TXEMPTY (1 << 1)
4946
#define AC97C_CSR_UNRUN (1 << 2)
5047
#define AC97C_CSR_RXRDY (1 << 4)
48+
#define AC97C_CSR_OVRUN (1 << 5)
5149
#define AC97C_CSR_ENDTX (1 << 10)
5250
#define AC97C_CSR_ENDRX (1 << 14)
5351

@@ -61,11 +59,15 @@
6159
#define AC97C_CMR_DMAEN (1 << 22)
6260

6361
#define AC97C_SR_CAEVT (1 << 3)
62+
#define AC97C_SR_COEVT (1 << 2)
63+
#define AC97C_SR_WKUP (1 << 1)
64+
#define AC97C_SR_SOF (1 << 0)
6465

66+
#define AC97C_CH_MASK(slot) \
67+
(0x7 << (3 * (AC97_SLOT_##slot - 3)))
6568
#define AC97C_CH_ASSIGN(slot, channel) \
6669
(AC97C_CHANNEL_##channel << (3 * (AC97_SLOT_##slot - 3)))
6770
#define AC97C_CHANNEL_NONE 0x0
6871
#define AC97C_CHANNEL_A 0x1
69-
#define AC97C_CHANNEL_B 0x2
7072

7173
#endif /* __SOUND_ATMEL_AC97C_H */

0 commit comments

Comments
 (0)