linux-stable/sound/soc/meson
Martin Blumenstingl ee907afb0c
ASoC: meson: aiu: Move AIU_I2S_MISC hold setting to aiu-fifo-i2s
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: 6ae9ca9ce9 ("ASoC: meson: aiu: add i2s and spdif support")
Reported-by: Christian Hewitt <christianshewitt@gmail.com>
Reported-by: Geraldo Nascimento <geraldogabriel@gmail.com>
Tested-by: Christian Hewitt <christianshewitt@gmail.com>
Tested-by: Geraldo Nascimento <geraldogabriel@gmail.com>
Acked-by: Jerome Brunet <jbrunet@baylibre.com>
Cc: stable@vger.kernel.org
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20211206210804.2512999-3-martin.blumenstingl@googlemail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-12-14 17:15:32 +00:00
..
aiu-acodec-ctrl.c ASoC: constify of_phandle_args in snd_soc_get_dai_name() 2021-03-10 13:07:14 +00:00
aiu-codec-ctrl.c ASoC: constify of_phandle_args in snd_soc_get_dai_name() 2021-03-10 13:07:14 +00:00
aiu-encoder-i2s.c ASoC: meson: aiu: Move AIU_I2S_MISC hold setting to aiu-fifo-i2s 2021-12-14 17:15:32 +00:00
aiu-encoder-spdif.c ASoC: meson: aiu: Fix spelling mistake "Unsupport" -> "Unsupported" 2021-09-27 13:01:07 +01:00
aiu-fifo-i2s.c ASoC: meson: aiu: Move AIU_I2S_MISC hold setting to aiu-fifo-i2s 2021-12-14 17:15:32 +00:00
aiu-fifo-spdif.c ASoC: meson: Use managed DMA buffer allocation 2020-12-28 12:24:46 +00:00
aiu-fifo.c ASoC: meson: aiu: fifo: Add missing dma_coerce_mask_and_coherent() 2021-12-14 17:15:29 +00:00
aiu-fifo.h ASoC: meson: aiu: add i2s and spdif support 2020-02-13 20:57:22 +00:00
aiu.c ASoC: constify of_phandle_args in snd_soc_get_dai_name() 2021-03-10 13:07:14 +00:00
aiu.h ASoC: constify of_phandle_args in snd_soc_get_dai_name() 2021-03-10 13:07:14 +00:00
axg-card.c ASoC: meson: axg-card: make links nonatomic 2021-10-22 13:25:47 +01:00
axg-fifo.c ASoC: meson: axg-fifo: add NO_PERIOD_WAKEUP support 2021-04-07 16:58:31 +01:00
axg-fifo.h ASoC: meson: axg-fifo: relax period size constraints 2019-12-18 20:01:34 +00:00
axg-frddr.c ASoC: meson: axg-frddr: fix fifo depth on g12 and sm1 2021-04-13 12:31:51 +01:00
axg-pdm.c ASoC: meson: axg-pdm: use devm_platform_ioremap_resource() to simplify code 2019-07-31 12:07:29 +01:00
axg-spdifin.c ASoC: meson: axg-spdifin: use devm_platform_ioremap_resource() to simplify code 2019-07-31 12:07:48 +01:00
axg-spdifout.c ASoC: meson: merge .digital_mute() into .mute_stream() 2020-07-16 23:06:09 +01:00
axg-tdm-formatter.c ASoC: various vendors: delete repeated words in comments 2020-08-18 14:52:32 +01:00
axg-tdm-formatter.h ASoC: meson: axg-tdm-formatters: fix sclk inversion 2020-07-30 19:45:01 +01:00
axg-tdm-interface.c ASoC: meson: axg-tdm-interface: manage formatters in trigger 2021-10-22 13:25:48 +01:00
axg-tdm.h ASoC: meson: axg-tdm: fix sample clock inversion 2019-06-13 19:44:02 +01:00
axg-tdmin.c ASoC: meson: axg-tdmin: remove useless assignment 2021-03-31 18:03:17 +01:00
axg-tdmout.c ASoC: meson: axg-tdmout: remove useless assignment 2021-03-31 18:03:18 +01:00
axg-toddr.c ASoC: meson: axg-toddr: fix channel order on g12 platforms 2020-08-28 19:02:54 +01:00
g12a-toacodec.c ASoC: meson: g12a-toacodec: add support for SM1 TOACODEC 2021-05-19 14:19:05 +01:00
g12a-tohdmitx.c Merge branch 'for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.7 2020-02-24 22:26:06 +00:00
gx-card.c Merge remote-tracking branch 'asoc/for-5.9' into asoc-next 2020-07-31 19:54:03 +01:00
Kconfig ASoC: Fix 7/8 spaces indentation in Kconfig 2020-11-17 17:08:45 +00:00
Makefile ASoC: meson: g12a: add internal DAC glue driver 2020-02-21 16:39:04 +00:00
meson-card-utils.c ASoC: meson: implement driver_name for snd_soc_card in meson-card-utils 2021-10-18 13:56:43 +01:00
meson-card.h ASoC: meson: axg: extract sound card utils 2020-02-13 20:57:25 +00:00
meson-codec-glue.c ASoC: soc-core: accept zero format at snd_soc_runtime_set_dai_fmt() 2021-10-18 13:56:40 +01:00
meson-codec-glue.h ASoC: meson: g12a: extract codec-to-codec utils 2020-02-13 20:57:20 +00:00
t9015.c ASoC: meson: t9015: mark OF related data as maybe unused 2020-11-26 13:07:05 +00:00