Tool/software:
Hi,
I'm currently integrating the amplifier in a mono speaker configuration in an embedded Linux project.
The hardware is set up to use PVDD only (no VBAT) as described in this FAQ.
Schematics:
PVBUS (connected to PVDD and VBST) is configurable, we've set it to 9V.
For the software I grabbed the latest driver from the for-next branch of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git. As far as I understand, that one should run even without having DSP parameters configured. We are using kernel 5.10, so I had to make a few minor changes to make it compile.
I created the firmware binary with the regbin tool from https://git.ti.com/cgit/tas2781-linux-drivers/tas2781-linux-driver/tree/regbin/toolset together with the contained JSON file tas2563-1amp-reg.json and compiled it into the kernel using CONFIG_EXTRA_FIRMWARE.
As we don't use VBAT, I added a register setting book 0x00, page 0x00, register 0x33, value 0xc4 to every power up configuration before writing the bin file.
The driver complains about the coef.bin file not being preset:
# dmesg | grep tas2
[ 0.706546] tasdev-codec 2-004f: Direct firmware load for tas2563_coef.bin failed with error -2
[ 0.716538] tasdev-codec 2-004f: tasdevice_dsp_parser: load tas2563_coef.bin error
[ 0.724327] tasdev-codec 2-004f: dspfw load tas2563_coef.bin error
but I think it loads anyways because I can see the profile selection in amixer:
# amixer contents
numid=2,iface=MIXER,name='DMIC High Pass Filter1 Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=3,iface=MIXER,name='DMIC High Pass Filter2 Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=4,iface=MIXER,name='DMIC Low Pass Filter Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=5,iface=MIXER,name='DMIC SW_LR Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=1,iface=MIXER,name='DMIC Volume'
; type=INTEGER,access=rw---R--,values=1,min=0,max=31,step=0
: values=15
| dBscale-min=0.00dB,step=3.00dB,mute=0
.... [ several mux config settings ] ....
numid=8,iface=MIXER,name='Mixer0 LR_MIX Switch'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=9,iface=MIXER,name='Mixer0 MIX_MODE Option'
; type=ENUMERATED,access=rw------,values=1,items=4
; Item #0 'Linear weighted plus'
; Item #1 'Average'
; Item #2 'Clamping'
; Item #3 'Nonlinear Distort'
: values=1
numid=6,iface=MIXER,name='Speaker Force Firmware Load'
; type=BOOLEAN,access=rw------,values=1
: values=off
numid=7,iface=MIXER,name='Speaker Profile Id'
; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
: values=0
numid=10,iface=MIXER,name='baic1_fmt'
; type=ENUMERATED,access=rw------,values=1,items=11
; Item #0 'PCMA'
; Item #1 'PCMB'
; Item #2 'DSPA'
; Item #3 'DSPB'
; Item #4 'TDM1A'
; Item #5 'TDM1B'
; Item #6 'TDM2A'
; Item #7 'TDM2B'
; Item #8 'I2S'
; Item #9 'LEFT'
; Item #10 'RIGHT'
: values=8
aplay does not complain:
# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: dv20 [d_v20], device 0: DMA1 playback (*) []
Subdevices: 0/1
Subdevice #0: subdevice #0
# aplay /data/sound/test.wav
Playing WAVE '/data/audio/test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
# i2cdump -y -f -r 0x00-0x7F 2 0x4f
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 00 00 20 c6 22 13 02 00 10 f1 46 44 04 05 06 ... ?"??.??FD???
10: 07 14 12 76 01 2e 60 0e 0c 00 fc a6 df ff ff 04 ???v?.`??.???..?
20: 00 00 80 00 04 00 22 80 00 80 00 00 00 00 00 a2 ..?.?."?.?.....?
30: 99 40 80 c4 4b 74 03 00 0d 0c be 58 68 08 10 00 ?@??Kt?.???Xh??.
40: 76 41 d8 c0 10 21 00 b4 ac 00 00 00 00 00 00 00 vA???!.??.......
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
70: 00 00 00 f0 00 0f 00 00 80 00 00 00 00 10 7b 00 ...?.?..?....?{.
What should I try next?
Thanks,
Stephan