Other Parts Discussed in Thread: TAS2563,
linux-firmware has stero (tas2781RCA2) and quad (tas2781RCA4) configs.
our design is mono.
where can i get tas2781RCA1?
thank you.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi Christopher
Glad to support you.
regbin tool and guideline is here: tool - lpaa-android-drivers/pcmdevice-linux-driver - Unnamed repository; edit this file 'description' to name the repository.
More one thing, we have three kinds of tas2563 Linux drivers:
CGit @ Texas Instruments - Open Source Git Repositories - git.TI.com/cgit
Driver Guideline: doc - tas2781-linux-drivers/tas2781-linux-driver - Unnamed repository; edit this file 'description' to name the repository. Kindly spend some time on it, it contains an example for dts and dai_link in BBB or QCom. it will bring more benefit for you.
Factory tool: tas2781-linux-drivers/tas2781-ftc - Unnamed repository; edit this file 'description' to name the repository.
Factory tool guideline: git.ti.com/cgit/tas2781-linux-drivers/tas2781-ftc/plain/Guideline for Integrated SmartAMP FTC on Linux.pdf Kindly spend some time on it for factory line.
tas2781-i2c.c « codecs « soc « sound - kernel/git/torvalds/linux.git - Linux kernel source tree
this code is a part of Linux Kernel official code. You will find the .h files ,Kconfig, Makefile in the same folder of the c file.
Dts: ti,tas2781.yaml « sound « bindings « devicetree « Documentation - kernel/git/torvalds/linux.git - Linux kernel source tree, it is also a part of official kernel
As to Dai_link readme kind find the Linux official document.
tas2781_hda_i2c.c « hda « pci « sound - kernel/git/torvalds/linux.git - Linux kernel source tree
this code is also a part of Linux Kernel official code. You will find the .h files ,Kconfig, Makefile in the same folder of the c file.
If possible, kindly offer your platform information, such as kernel version, whether to use devicetree in your system.
i have the linux-stable driver integrated into my kernel and device tree.
at present i am able to bring the chip out of standby and the chip responds to i2c.
(i had to fix what seems like a bug here:
tas_priv->reset = devm_gpiod_get_optional(&client->dev,
"reset", GPIOD_OUT_HIGH);
otherwise it was looking for reset-gpios-gpios
)
the problem at the moment is that the chip is requested RCA1 for its firmware because there's only one chip. linux-firmware has tias2781RCA2 and RAC4 but no RCA1.
regbin « jsn - tas2781-linux-drivers/tas2781-linux-driver - Unnamed repository; edit this file 'description' to name the repository. (pls look for the file name tas2781-1amp-reg.json)
regbin tool and guideline is here: tool - lpaa-android-drivers/pcmdevice-linux-driver - Unnamed repository; edit this file 'description' to name the repository.
i was able to tuirn tas2781-1amp-reg.json into tas2781-1amp-reg.bin using the regbin. thank you.
the driver still wants tas2871RC1.bin ... where may i find that?
rename tas2781-1amp-reg.bin to tas2871RC1.bin
One more thing, do you want to enable the dsp mode inside tas2781?
> rename tas2781-1amp-reg.bin to tas2871RC1.bin
it loads that now (thank you).
Do I need _coef.bin or is it OK as is, if not running DSP?
[ 7.218933] tas2781-codec 1-0038: CH/tasdevice_fw_ready
[ 7.223976] tas2781-codec 1-0038: CH/tasdevice_dsp_parser attempting to load
[ 7.231351] tas2781-codec 1-0038: Direct firmware load for tas2781_coef.bin failed with error -2
[ 7.240281] tas2781-codec 1-0038: Falling back to sysfs fallback for: tas2781_coef.bin
[ 68.575596] tas2781-codec 1-0038: tasdevice_dsp_parser: load tas2781_coef.bin error
[ 68.583286] tas2781-codec 1-0038: dspfw load tas2781_coef.bin error
The mixer is there.
root@imx8mp-ddr4-evk:~# amixer
Simple mixer control 'Speaker Analog Gain',0
Capabilities: volume volume-joined
Playback channels: Mono
Capture channels: Mono
Limits: 0 - 20
Mono: 20 [100%]
Simple mixer control 'Speaker Digital Gain',0
Capabilities: volume volume-joined
Playback channels: Mono
Capture channels: Mono
Limits: 0 - 200
Mono: 200 [100%]
Simple mixer control 'Speaker Force Firmware Load',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'Speaker Profile Id',0
Capabilities: volume volume-joined
Playback channels: Mono
Capture channels: Mono
Limits: 0 - 5
Mono: 0 [0%]
root@imx8mp-ddr4-evk:~#
But it seems that if coef.bin isn't loaded, the dai startup method returns -EINVAL and trying to play something fails:
root@imx8mp-ddr4-evk:~# aplay -Dsysdefault:CARD=tas2781 tone.wav
[ 331.324245] tas2781-codec 1-0038: DSP bin file not loaded
[ 331.329821] tas2781-codec 1-0038: ASoC: error at snd_soc_dai_startup on tas2781_codec: -22
[ 331.338274] 30c30000.sai-tas2781_codec: ASoC: error at __soc_pcm_open on 30c30000.sai-tas2781_codec: -22
aplay: main:831: audio open error: Invalid argument
root@imx8mp-ddr4-evk:~#
> One more thing, do you want to enable the dsp mode inside tas2781?
at some point yes, but just need the basics working right now.
Thank you!
You can remove the DSP bin. You can remove the tasdevice_startup, only regbin file still can work.
I suggest you to use this code tas2781-linux-drivers/tas2781-linux-driver - Unnamed repository; edit this file 'description' to name the repository.
this code contains factory test feature and in this code, support only regbin without dspbin mode case.
factory tool: tas2781-linux-drivers/tas2781-ftc - Unnamed repository; edit this file 'description' to name the repository.
As you know, tas2781 is a smartamp, it need calibrate each speaker impedance at room temperature(about 20~25 degrees centigrade), which is useful for speaker protection in dsp mode. so I strongly recommend you use the code from git,ti,com.
Speak also need modelling
As to the dsp bin file, let me involve dsp expert to support you.
we will take a look at the non mainline driver.
i tried disabling dsp in the linux-stable driver, but i was unable to get to work.
if we could get a dsp image for a 1 chipconfig, that would be awesome, as that's where we would prefer to land.
thank you for getting the dsp folks inolved.
Hi guy
Can you tell the audio spec in your system, such as sample rate and bit width?
I check the tas2781-1amp-reg.json, it supports 32-bit, 48kHz, i2s, hope this can meet your requirements.
If you want to run bypass mode
kindly run following command for bypass, this dsp params won't load
amix set "Program" 1 /*do not select 0, 0 will enable dsp*/
amix set "TASDEVICE Profile id" 0
aplay xxxxx
