[media] stk1160: Wait for completion of transfers to and from AC97 codec
authorMarcel Hasler <mahasler@gmail.com>
Thu, 15 Dec 2016 22:14:03 +0000 (20:14 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 3 Feb 2017 13:29:24 +0000 (11:29 -0200)
commit9a4825edbcd6f7d7da88696412c6b0436ed7cc0b
treefc6f23802f770b5bc19298936dcadece9b0a7639
parent1dc7df4d3d787639c9eeb8fc3841dd8d003de82a
[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>
drivers/media/usb/stk1160/stk1160-ac97.c
drivers/media/usb/stk1160/stk1160-reg.h
drivers/media/usb/stk1160/stk1160.h