forked from luck/tmp_suning_uos_patched
30140e252f
commit ee907afb0c39a41ee74b862882cfe12820c74b98 upstream.
The out-of-tree vendor driver uses the following approach to set the
AIU_I2S_MISC register:
1) write AIU_MEM_I2S_START_PTR and AIU_MEM_I2S_RD_PTR
2) configure AIU_I2S_MUTE_SWAP[15:0]
3) write AIU_MEM_I2S_END_PTR
4) set AIU_I2S_MISC[2] to 1 (documented as: "put I2S interface in hold
mode")
5) set AIU_I2S_MISC[4] to 1 (depending on the driver revision it always
stays at 1 while for older drivers this bit is unset in step 4)
6) set AIU_I2S_MISC[2] to 0
7) write AIU_MEM_I2S_MASKS
8) toggle AIU_MEM_I2S_CONTROL[0]
9) toggle AIU_MEM_I2S_BUF_CNTL[0]
Move setting the AIU_I2S_MISC[2] bit to aiu_fifo_i2s_hw_params() so it
resembles the flow in the vendor kernel more closely. While here also
configure AIU_I2S_MISC[4] (documented as: "force each audio data to
left or right according to the bit attached with the audio data")
similar to how the vendor driver does this. This fixes the infamous and
long-standing "machine gun noise" issue (a buffer underrun issue).
Fixes:
|
||
---|---|---|
.. | ||
aiu-acodec-ctrl.c | ||
aiu-codec-ctrl.c | ||
aiu-encoder-i2s.c | ||
aiu-encoder-spdif.c | ||
aiu-fifo-i2s.c | ||
aiu-fifo-spdif.c | ||
aiu-fifo.c | ||
aiu-fifo.h | ||
aiu.c | ||
aiu.h | ||
axg-card.c | ||
axg-fifo.c | ||
axg-fifo.h | ||
axg-frddr.c | ||
axg-pdm.c | ||
axg-spdifin.c | ||
axg-spdifout.c | ||
axg-tdm-formatter.c | ||
axg-tdm-formatter.h | ||
axg-tdm-interface.c | ||
axg-tdm.h | ||
axg-tdmin.c | ||
axg-tdmout.c | ||
axg-toddr.c | ||
g12a-toacodec.c | ||
g12a-tohdmitx.c | ||
gx-card.c | ||
Kconfig | ||
Makefile | ||
meson-card-utils.c | ||
meson-card.h | ||
meson-codec-glue.c | ||
meson-codec-glue.h | ||
t9015.c |