diff options
author | Marcel Hasler <mahasler@gmail.com> | 2016-12-15 20:14:03 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-02-03 11:29:24 -0200 |
commit | 9a4825edbcd6f7d7da88696412c6b0436ed7cc0b (patch) | |
tree | fc6f23802f770b5bc19298936dcadece9b0a7639 /drivers/media/usb/stk1160/stk1160-reg.h | |
parent | 1dc7df4d3d787639c9eeb8fc3841dd8d003de82a (diff) |
[media] stk1160: Wait for completion of transfers to and from AC97 codec
The STK1160 needs some time to transfer data to and from the AC97 codec.
The transfer completion is indicated by command read/write bits in the
chip's audio control register. The driver should poll these bits and
wait until they have been cleared by hardware before trying to retrieve
the results of a read operation or setting a new write command.
[mchehab@s-opensource.com: make checkpatch happier]
Signed-off-by: Marcel Hasler <mahasler@gmail.com>
Acked-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/usb/stk1160/stk1160-reg.h')
-rw-r--r-- | drivers/media/usb/stk1160/stk1160-reg.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/usb/stk1160/stk1160-reg.h b/drivers/media/usb/stk1160/stk1160-reg.h index 296a9e712c81..7b08a3cc4504 100644 --- a/drivers/media/usb/stk1160/stk1160-reg.h +++ b/drivers/media/usb/stk1160/stk1160-reg.h @@ -122,6 +122,8 @@ /* AC97 Audio Control */ #define STK1160_AC97CTL_0 0x500 #define STK1160_AC97CTL_1 0x504 +#define STK1160_AC97CTL_0_CR BIT(1) +#define STK1160_AC97CTL_0_CW BIT(2) /* Use [0:6] bits of register 0x504 to set codec command address */ #define STK1160_AC97_ADDR 0x504 |