Commit Graph

6 Commits

Author SHA1 Message Date
Arnd Bergmann
cad9720dd7
ASoC: sophgo: fix 64-bit division build failure
cv1800b_adc_setbclk_div() does four 64-bit divisions in a row, which
is rather inefficient on 32-bit systems, and using the plain division
causes a build failure as a result:

ERROR: modpost: "__aeabi_uldivmod" [sound/soc/sophgo/cv1800b-sound-adc.ko] undefined!

Consolidate those into a single division using the div_u64() macro.

Fixes: 4cf8752a03 ("ASoC: sophgo: add CV1800B internal ADC codec driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20260202095323.1233553-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-02-02 12:09:35 +00:00
Anton D. Stavinskii
8cf19b19db
ASoC: sophgo: cv1800b: tidy Kconfig spacing
Restore the empty line that was accidentally removed earlier

Signed-off-by: Anton D. Stavinskii <stavinsky@gmail.com>
Link: https://patch.msgid.link/20260127-incremental-for-i2s-dvier-v2-2-5f66b841f63d@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-27 20:06:36 +00:00
Anton D. Stavinskii
a8e3e48829
ASoC: sophgo: cv1800b: document DAC overwrite handling
Add comments to cv1800b_dac_mute() and its caller to explain how the
overwrite mechanism works and why we force it off before playback.

Signed-off-by: Anton D. Stavinskii <stavinsky@gmail.com>
Link: https://patch.msgid.link/20260127-incremental-for-i2s-dvier-v2-1-5f66b841f63d@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-27 20:06:35 +00:00
Anton D. Stavinskii
b3eb755e2d
ASoC: sophgo: add CV1800B internal DAC codec driver
Codec DAI endpoint for TXDAC. The codec does only a few things
- set up decimation
- enable codec and I2S output
- ensures the driver doesn't have dac overwrite enabled. (unmute the
  output)

Signed-off-by: Anton D. Stavinskii <stavinsky@gmail.com>
Link: https://patch.msgid.link/20260120-cv1800b-i2s-driver-v4-5-6ef787dc6426@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-27 12:52:06 +00:00
Anton D. Stavinskii
4cf8752a03
ASoC: sophgo: add CV1800B internal ADC codec driver
Codec DAI endpoint for RXADC + basic controls.
THe codec have basic volume control. Which is
imlemented by lookup table for simplicity.
The codec expects set_sysclk callback to
adjust internal mclk divider.

Signed-off-by: Anton D. Stavinskii <stavinsky@gmail.com>
Link: https://patch.msgid.link/20260120-cv1800b-i2s-driver-v4-4-6ef787dc6426@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-27 12:52:05 +00:00
Anton D. Stavinskii
ea0fb91c02
ASoC: sophgo: add CV1800B I2S/TDM controller driver
The actual CPU DAI controller. The driver can be used with
simple-audio-card. It respects fixed clock configuration
from simple-audio-card. The card driver can request direction out,
this will be interpreted as mclk out, the clock which can be used
in other CPU or codecs. For example I2S3 generates clock for ADC.
I2S was tested in S24_32 and S16 dual channel formats.

Signed-off-by: Anton D. Stavinskii <stavinsky@gmail.com>
Link: https://patch.msgid.link/20260120-cv1800b-i2s-driver-v4-2-6ef787dc6426@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-01-27 12:52:03 +00:00