Part Number: TAC5212
ound/soc/codecs/tac5x1x.c: In function ‘tac5x1x_set_dai_fmt’:
sound/soc/codecs/tac5x1x.c:938:30: warning: unused variable ‘tac5x1x’ [-Wunused-variable]
938 | struct tac5x1x_priv *tac5x1x = snd_soc_component_get_drvdata(component);
| ^~~~~~~
sound/soc/codecs/tac5x1x.c: At top level:
sound/soc/codecs/tac5x1x.c:1101:10: error: ‘struct snd_soc_dai_driver’ has no member named ‘symmetric_rate’; did you mean ‘symmetric_rates’?
1101 | .symmetric_rate = 1,
| ^~~~~~~~~~~~~~
| symmetric_rates
sound/soc/codecs/tac5x1x.c:1101:27: warning: initialization of ‘const struct snd_soc_cdai_ops *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
1101 | .symmetric_rate = 1,
| ^
sound/soc/codecs/tac5x1x.c:1101:27: note: (near initialization for ‘tac5x1x_dai.cops’)
sound/soc/codecs/tac5x1x.c: In function ‘tac5x1x_add_controls’:
sound/soc/codecs/tac5x1x.c:1224:35: warning: division ‘sizeof (int *) / sizeof (int)’ does not compute the number of array elements [-Wsizeof-pointer-div]
1224 | sizeof(gpio_func) / sizeof(gpio_func[0]))) {
| ^
sound/soc/codecs/tac5x1x.c:1182:14: note: first ‘sizeof’ operand was declared here
1182 | int *gpio_func = tac5x1x->gpio_setup->gpio_func;
| ^~~~~~~~~
sound/soc/codecs/tac5x1x.c: In function ‘tac5x1x_add_widgets’:
sound/soc/codecs/tac5x1x.c:1278:35: warning: division ‘sizeof (int *) / sizeof (int)’ does not compute the number of array elements [-Wsizeof-pointer-div]
1278 | sizeof(gpio_func) / sizeof(gpio_func[0]))) {
| ^
sound/soc/codecs/tac5x1x.c:1240:14: note: first ‘sizeof’ operand was declared here
1240 | int *gpio_func = tac5x1x->gpio_setup->gpio_func;
| ^~~~~~~~~
sound/soc/codecs/tac5x1x.c: In function ‘tac5x1x_soc_resume’:
sound/soc/codecs/tac5x1x.c:1330:9: warning: ignoring return value of ‘regulator_enable’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
1330 | regulator_enable(tac5x1x->supply_avdd);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/codecs/tac5x1x.c:1331:9: warning: ignoring return value of ‘regulator_enable’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
1331 | regulator_enable(tac5x1x->supply_iovdd);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/codecs/tac5x1x.c: In function ‘tac5x1x_add_controls’:
sound/soc/codecs/tac5x1x.c:1209:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
1209 | if (ret)
| ^
sound/soc/codecs/tac5x1x.c:1211:9: note: here
1211 | case TAC5312:
| ^~~~
make[3]: *** [scripts/Makefile.build:286: sound/soc/codecs/tac5x1x.o] Error 1
make[2]: *** [scripts/Makefile.build:503: sound/soc/codecs] Error 2
make[1]: *** [scripts/Makefile.build:503: sound/soc] Error 2
make: *** [Makefile:1836: sound] Error 2




sound/soc/codecs/tac5x1x-i2c.c:1311:23: error: ‘SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK’ undeclared (first use in this function); did you mean ‘SND_SOC_DAIFMT_CLOCK_MASK’?
1311 | switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| SND_SOC_DAIFMT_CLOCK_MASK
sound/soc/codecs/tac5x1x-i2c.c:1311:23: note: each undeclared identifier is reported only once for each function it appears in
sound/soc/codecs/tac5x1x-i2c.c:1312:14: error: ‘SND_SOC_DAIFMT_CBP_CFP’ undeclared (first use in this function); did you mean ‘SND_SOC_DAIFMT_CBS_CFM’?
1312 | case SND_SOC_DAIFMT_CBP_CFP:
| ^~~~~~~~~~~~~~~~~~~~~~
| SND_SOC_DAIFMT_CBS_CFM
sound/soc/codecs/tac5x1x-i2c.c:1315:14: error: ‘SND_SOC_DAIFMT_CBC_CFC’ undeclared (first use in this function); did you mean ‘SND_SOC_DAIFMT_CBS_CFM’?
1315 | case SND_SOC_DAIFMT_CBC_CFC:
| ^~~~~~~~~~~~~~~~~~~~~~
| SND_SOC_DAIFMT_CBS_CFM
sound/soc/codecs/tac5x1x-i2c.c: At top level:
sound/soc/codecs/tac5x1x-i2c.c:1522:10: error: ‘struct snd_soc_dai_driver’ has no member named ‘symmetric_rate’; did you mean ‘symmetric_rates’?
1522 | .symmetric_rate = 1,
| ^~~~~~~~~~~~~~
| symmetric_rates
sound/soc/codecs/tac5x1x-i2c.c:1522:27: warning: initialization of ‘const struct snd_soc_cdai_ops *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
1522 | .symmetric_rate = 1,
| ^
sound/soc/codecs/tac5x1x-i2c.c:1522:27: note: (near initialization for ‘tac5x1x_dai.cops’)
sound/soc/codecs/tac5x1x-i2c.c:1535:10: error: ‘struct snd_soc_dai_driver’ has no member named ‘symmetric_rate’; did you mean ‘symmetric_rates’?
1535 | .symmetric_rate = 1,
| ^~~~~~~~~~~~~~
| symmetric_rates
sound/soc/codecs/tac5x1x-i2c.c:1535:27: warning: initialization of ‘const struct snd_soc_cdai_ops *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
1535 | .symmetric_rate = 1,
| ^
sound/soc/codecs/tac5x1x-i2c.c:1535:27: note: (near initialization for ‘taa5x1x_dai.cops’)
sound/soc/codecs/tac5x1x-i2c.c:1555:10: error: ‘struct snd_soc_dai_driver’ has no member named ‘symmetric_rate’; did you mean ‘symmetric_rates’?
1555 | .symmetric_rate = 1,
| ^~~~~~~~~~~~~~
| symmetric_rates
sound/soc/codecs/tac5x1x-i2c.c:1555:27: warning: initialization of ‘const struct snd_soc_cdai_ops *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
1555 | .symmetric_rate = 1,
| ^
sound/soc/codecs/tac5x1x-i2c.c:1555:27: note: (near initialization for ‘tad5x1x_dai.cops’)
new Kernel (6, 5.15?) versus kernel 5.10.140 soc-dai.h
=======================================
SND_SOC_DAIFMT_CLOCK_MASTER_MASK => SND_SOC_DAIFMT_MASTER_MASK
SND_SOC_DAIFMT_CBP_CFP => SND_SOC_DAIFMT_CBM_CFM
SND_SOC_DAIFMT_CBC_CFC => SND_SOC_DAIFMT_CBS_CFS




<I2S1_SUBM>, // Allows the non-secure Linux kernel to own the I2S1 data path pins. <PDMA1_TZNS>,



> tac5x1x_set_bias_level(struct snd_soc_component *component, enum snd_soc_bias_level level)
> ret = tac5x1x_pwr_ctrl(component, true);
/soc-dapm.h: SND_SOC_BIAS_ON = 3, OFF = 0 STANDBY=1, PREPARE=2
enum snd_soc_bias_level level)
break;
case SND_SOC_BIAS_STANDBY:
break;
amixer -c 0 cset iface=MIXER,name='OUT1x Source' 'DAC Input’
amixer -c 0 cset iface=MIXER,name='OUT1x Config' 'Differential’
amixer -c 0 cset iface=MIXER,name='OUT1x Driver' 'Line-out’
amixer -c 0 cset iface=MIXER,name='ASI_RX_CH2_EN Switch' on
amixer -c 0 cset iface=MIXER,name=‘OUT2x Source' 'DAC Input’
amixer -c 0 cset iface=MIXER,name=‘OUT2x Config' 'Differential’
amixer -c 0 cset iface=MIXER,name=‘OUT2x Driver' 'Line-o'
aplay -c 2 -f S16_LE -r 44100 -d 15 --device='hw:0,0' pure_tone_44.1K_16b_stereo.wav
# insmod snd-soc-tac5x1x.ko [ 203.607549] tac5x1x-codec 2-0051: TAC5x1x driver is looking for supply name: 'iovdd' [ 203.615250] tac5x1x-codec 2-0051: TAC5x1x driver is looking for supply name: 'avdd' # [ 203.666981] tac5x1x-codec 2-0051: TAC5x1x using I2S format [ 203.689895] tac5x1x-codec 2-0051: TAC5x1x bias level set to 1 [ 203.695703] tac5x1x-codec 2-0051: TAC5x1x set power level STANDBY ignored # sh test_stereo.sh numid=57,iface=MIXER,name='ASI_RX_CH1_EN Switch' ; type=BOOLEAN,access=rw------,values=1 : values=on numid=54,iface=MIXER,name='OUT1x Source' ; type=ENUMERATED,access=rw------,values=1,items=6 ; Item #0 'Disabled' ; Item #1 'DAC Input' ; Item #2 'Analog Bypass' ; Item #3 'DAC + Analog Bypass Mix' ; Item #4 'DAC -> OUTxP, INxP -> OUTxM' ; Item #5 'INxM -> OUTxP, DAC -> OUTxM' : values=0 numid=56,iface=MIXER,name='OUT1x Driver' ; type=ENUMERATED,access=rw------,values=1,items=4 ; Item #0 'Line-out' ; Item #1 'He[ 210.077928] tac5x1x-codec 2-0051: TAC5x1x using sample rate of 44100 Hz adphone' ; It[ 210.085707] tac5x1x-codec 2-0051: TAC5x1x word length is 16 bits em #2 '4 ohm' ; Item #3 'FD Receiver/Debug' : values=0 Playing WAVE 'pure_tone_44.1K_16b_stereo.wav' : Signed 16 bit Little Endian, Rate [ 210.105426] i2s_clk: 200000000 44100 Hz, Mono [ 210.108566] ma35d1_audio->pdm_decimation: 0 [ 210.114119] sample_rate: 44100 bitrate: 1411200 [ 210.118628] bclkdiv: 70, mclkdiv: 8 [ 210.122089] i2s_clk=200000000 [ 210.125035] sample_rate=44100 channels=1 width=16 [ 210.129715] target_bclk=1411200 bclkdiv=70 actual_bclk=1408450 error_ppm=-1948 [ 210.136925] target_mclk=12000000 mclkdiv=8 actual_mclk=12500000 [ 210.142808] I2S_CLKDIV=0x00004608 [ 210.146323] tac5x1x-codec 2-0051: TAC5x1x bias level set to 2 [ 210.152126] tac5x1x-codec 2-0051: TAC5x1x set power level PREPARE ignored [ 210.166451] tac5x1x-codec 2-0051: TAC5x1x bias level set to 3 [ 210.172235] tac5x1x-codec 2-0051: TAC5x1x set power level UP aplay: pcm_write:2058: write error: Input/output error #
amixer -c 0 cset iface=MIXER,name='ASI_RX_CH1_EN Switch' on amixer -c 0 cset iface=MIXER,name='OUT1x Source' 'DAC Input’ amixer -c 0 cset iface=MIXER,name='OUT1x Config' 'Differential’ amixer -c 0 cset iface=MIXER,name='OUT1x Driver' 'Line-out’ amixer -c 0 cset iface=MIXER,name='ASI_RX_CH2_EN Switch' on amixer -c 0 cset iface=MIXER,name=‘OUT2x Source' 'DAC Input’ amixer -c 0 cset iface=MIXER,name=‘OUT2x Config' 'Differential’ amixer -c 0 cset iface=MIXER,name=‘OUT2x Driver' 'Line-out' aplay -c 2 -f S16_LE -r 44100 -d 15 --device='hw:0,0' pure_tone_44.1K_16b_stereo.wav