shrikantetc
Posts: 10
Joined: Mon Jul 17, 2017 5:54 am

TLV320AIC3254 audio codec device tree overlay

Wed Sep 13, 2017 11:39 am

Hi ,

I am trying to interface TLV320AIC3254 audio codec with raspberry pi.
And somehow manage to compile the kernel with TLV320AIC32x4 module.
But not able to write .dts file for TLV320AIC3254 audio codec evaluation board.

output of "lsmod" command to your technical team:

Module Size Used by
bnep 11847 2
bluetooth 377680 5 bnep
cfg80211 524570 0
rfkill 21272 3 bluetooth,cfg80211
spidev 7034 0
snd_bcm2835 22966 1
i2c_bcm2835 6401 0
spi_bcm2835 7628 0
bcm2835_gpiomem 3791 0
fixed 3029 0
uio_pdrv_genirq 3718 0
uio 10134 1 uio_pdrv_genirq
snd_soc_tlv320aic32x4_spi 2020 0
snd_soc_tlv320aic32x4_i2c 2020 0
snd_soc_tlv320aic32x4 24093 2 snd_soc_tlv320aic32x4_spi,snd_soc_tlv320aic32x4_i2c
snd_soc_core 175984 1 snd_soc_tlv320aic32x4
snd_pcm_dmaengine 6002 1 snd_soc_core
snd_compress 10112 1 snd_soc_core
snd_pcm 97377 4 snd_pcm_dmaengine,snd_soc_tlv320aic32x4,snd_bcm2835,snd_soc_core

snd_timer 22610 1 snd_pcm
snd 68426 7 snd_compress,snd_timer,snd_bcm2835,snd_soc_core,snd_pcm
i2c_dev 6674 0
fuse 93798 3
ipv6 380873 44


You can see "snd_soc_tlv320aic32x4" in the modules list.

Can anybody guide for writing .dts file for TLV320AIC3254 audio codec...?

Please help me out


Thanks,
Shrikant

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1361
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: TLV320AIC3254 audio codec device tree overlay

Wed Sep 13, 2017 12:05 pm

The module is being loaded, so that is something. What are you expecting to happen? Just having a codec on its own is not enough - you need a sound card driver to make use of it. If the codec requires no controls then you should be able to make use of the simple-audio-card as described in the AK4554 thread you just cross-posted to. If you can't make that work, post your overlay and any drivers here, describing the problem in as much detail as possible.

shrikantetc
Posts: 10
Joined: Mon Jul 17, 2017 5:54 am

Re: TLV320AIC3254 audio codec device tree overlay

Thu Sep 14, 2017 11:21 am

Hi Sir,

I have TLV320AIC3254 evaluation board. and codec driver files and device tree file.
What else required to use TLV320AIC3254 evaluation, board? Please tell me.
The device tree file contains:

Texas Instruments - tlv320aic32x4 Codec module

The tlv320aic32x4 serial control bus communicates through I2C protocols

Required properties:
- compatible: Should be "ti,tlv320aic32x4"
- reg: I2C slave address
- supply-*: Required supply regulators are:
"iov" - digital IO power supply
"ldoin" - LDO power supply
"dv" - Digital core power supply
"av" - Analog core power supply
If you supply ldoin, dv and av are optional. Otherwise they are required
See regulator/regulator.txt for more information about the detailed binding
format.

Optional properties:
- reset-gpios: Reset-GPIO phandle with args as described in gpio/gpio.txt
- clocks/clock-names: Clock named 'mclk' for the master clock of the codec.
See clock/clock-bindings.txt for information about the detailed format.


Example:

codec: tlv320aic32x4@18 {
compatible = "ti,tlv320aic32x4";
reg = <0x18>;
clocks = <&clks 201>;
clock-names = "mclk";
};


And driver files which i manage to load previously are:
https://github.com/raspberrypi/linux/bl ... 0aic32x4.c
https://github.com/raspberrypi/linux/bl ... 0aic32x4.h
https://github.com/raspberrypi/linux/bl ... 0aic32x4.h
https://github.com/raspberrypi/linux/bl ... 32x4-i2c.c
https://github.com/raspberrypi/linux/bl ... 32x4-spi.c


Thanks,
Shrikant

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1361
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: TLV320AIC3254 audio codec device tree overlay

Thu Sep 14, 2017 2:06 pm

I think we've reached the point where there are enough sound card drivers and overlays in the raspberrypi/linux repo that we can expect people to at least have a go at writing either a driver + overlay or a "simple-audio-card" overlay using the existing examples for guidance. I don't have time to teach you, and I doubt anyone else will.

Return to “Device Tree”

Who is online

Users browsing this forum: No registered users and 2 guests