Hi,
I am using custom make board with AM-3358 based board with TLV320aIC3106 codec.
After following the instructions on am335x-audio driver guide I have added a device tree entries, configured a kernel for ALSA sound modules.
But I am getting following error. I have added
################################################################################
Kernel log during boot up:
INIT: version 2.88 booting
Error opening /dev/fb0: No such file or directory
Starting udev
[ 2.788874] udevd[802]: starting version 182
[ 3.354402] PM: CM3 Firmware Version = 0x186
[ 3.523565] c_can_platform 481cc000.d_can: c_can_platform device registered (regs=fa1cc000, irq=68)
[ 3.698333] c_can_platform 481d0000.d_can: can't request region for resource [mem 0x44e10644-0x44e10647]
[ 3.708544] c_can_platform 481d0000.d_can: control memory is not used for raminit
[ 3.837983] inside aic31xx_device_init
[ 3.842227]
[ 3.842227] audio coded RSTn GPIO = 45
[ 3.857107] c_can_platform 481d0000.d_can: c_can_platform device registered (regs=fa1d0000, irq=71)
[ 3.889015] tlv320aic31xx-codec 1-001b: Failed to get supply 'HPVDD': -19
[ 3.896210] tlv320aic31xx-codec 1-001b: Failed to request supplies: -19
[ 6.610898] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 6.759140] musb-hdrc musb-hdrc.0.auto: Enabled SW babble control
[ 6.767272] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver
[ 6.870724] musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 1
[ 6.925845] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 6.933122] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 6.940764] usb usb1: Product: MUSB HDRC host driver
[ 6.946005] usb usb1: Manufacturer: Linux 3.12.10-ti2013.12.01 musb-hcd
[ 6.953001] usb usb1: SerialNumber: musb-hdrc.0.auto
[ 7.117161] hub 1-0:1.0: USB hub found
[ 7.130972] hub 1-0:1.0: 1 port detected
[ 7.144785] musb-hdrc musb-hdrc.1.auto: Enabled SW babble control
[ 7.162056] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 7.168924] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 2
[ 7.177426] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[ 7.184643] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 7.192284] usb usb2: Product: MUSB HDRC host driver
[ 7.197523] usb usb2: Manufacturer: Linux 3.12.10-ti2013.12.01 musb-hcd
[ 7.204518] usb usb2: SerialNumber: musb-hdrc.1.auto
[ 7.210989] hub 2-0:1.0: USB hub found
[ 7.214997] hub 2-0:1.0: 1 port detected
Starting Bootlog daemon: bootlogd: cannot allocate pseudo tty: No such file or directory
bootlogd.
[ 7.379899] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
[ 7.829099] musb-hdrc musb-hdrc.1.auto: VBUS_ERROR in a_wait_vrise (80, <SessEnd), retry #3, port1 0008010c
ALSA: Restoring mixer settings...
/usr/sbin/alsactl: load_state:1696: No soundcards found...
Configuring network interfaces... ifconfig: SIOCGIFFLAGS: No such device
done.
################################################################################
On inserting tlv320aic31xx kernel module:
[ 88.708956] inside aic31xx_device_init
[ 88.713065] of_get_named_gpio_flags exited with status 45
[ 88.718846]
[ 88.718846] audio coded RSTn GPIO = 45
[ 88.724912] tlv320aic31xx-codec 1-001b: Failed to get supply 'HPVDD': -19
[ 88.732128] tlv320aic31xx-codec 1-001b: Failed to request supplies: -19
################################################################################
cat /proc/modules output:
root@am335x-evm:/dev/snd# cat /proc/modules
snd_soc_evm 7298 0 - Live 0xbf1d5000
snd_soc_davinci_mcasp 9484 0 - Live 0xbf1cf000
snd_soc_davinci 5438 1 snd_soc_davinci_mcasp, Live 0xbf1ca000
snd_soc_tlv320aic31xx 17697 0 - Live 0xbf1c1000
snd_rawmidi 16841 0 - Live 0xbf18e000
musb_dsps 6511 0 - Live 0xbf13d000
musb_hdrc 52593 1 musb_dsps, Live 0xbf117000
wlcore_sdio 4233 0 - Live 0xbf112000
snd_soc_core 99221 4 snd_soc_evm,snd_soc_davinci_mcasp,snd_soc_davinci,snd_soc_tlv320aic31xx, Live 0xbf0a3000
regmap_spi 1469 1 snd_soc_core, Live 0xbf09f000
snd_pcm 66734 3 snd_soc_evm,snd_soc_davinci,snd_soc_core, Live 0xbf067000
c_can_platform 4176 0 - Live 0xbf05d000
snd_timer 16028 1 snd_pcm, Live 0xbf04b000
ti_am335x_adc 3183 0 - Live 0xbf047000
snd_page_alloc 4843 1 snd_pcm, Live 0xbf03b000
snd_compress 7419 1 snd_soc_core, Live 0xbf031000
industrialio 32701 1 ti_am335x_adc, Live 0xbf020000
snd 45368 5 snd_rawmidi,snd_soc_core,snd_pcm,snd_timer,snd_compress, Live 0xbf00a000
soundcore 4767 1 snd, Live 0xbf004000
musb_am335x 1199 0 [permanent], Live 0xbf000000
################################################################################
aplay output
root@am335x-evm:/dev/snd# aplay
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4246:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4246:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4246:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4725:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM default
aplay: main:696: audio open error: No such file or directory
Following are the device tree entries.
mcasp0_pins: mcasp0_pins {
pinctrl-single,pins = <
0x60 (PIN_INPUT_PULLDOWN | MUX_MODE6)
0x64 (PIN_INPUT_PULLDOWN | MUX_MODE6)
0x68 (PIN_OUTPUT_PULLDOWN | MUX_MODE6)
0x6C (PIN_INPUT_PULLDOWN | MUX_MODE6)
>;
};
mcasp0_sleep_pins: mcasp0_sleep_pins {
pinctrl-single,pins = <
0x60 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x68 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x6C (PIN_INPUT_PULLDOWN | MUX_MODE7)
>;
};
tlv320aic310x: tlv320aic310x@1b {
compatible = "ti,tlv320aic310x";
reg = <0x1b>;
gpio-reset = <&gpio1 13 0>;
status = "okay";
#if 0
/* Regulators */
AVDD-supply = <&vaux2_reg>;
IOVDD-supply = <&vaux2_reg>;
DRVDD-supply = <&vaux2_reg>;
DVDD-supply = <&vbat>;
#endif
};
sound {
compatible = "ti,da850-evm-audio";
ti,model = "DA850-EVM";
ti,audio-codec = <&tlv320aic310x>;
ti,mcasp-controller = <&mcasp0>;
ti,codec-clock-rate = <12000000>;
ti,audio-routing =
"Headphone Jack", "HPLOUT",
"Headphone Jack", "HPROUT",
"LINE1L", "Line In",
"LINE1R", "Line In";
};
Regulators part is commented as we are not using any regulator IC but the power supplies can be switch ON-OFF using specific a GPIO pins.
Thanks & Regards,
Uday