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.

Interfacing TLV320AIC3254 Audio codec driver

Other Parts Discussed in Thread: TWL6032, TWL6030, TLV320AIC3256

Hi all, 

Based on the e2e forum suggestion from this link --- http://e2e.ti.com/support/data_converters/audio_converters/f/64/t/266169.aspx

we are trying to bring up audio codec in a OMAP4460 board. But during kernel bootup we are getting this error:

[ 2.659423] soc-audio soc-audio: binding Legacy McBSP2 at idx 0
[ 2.659423] soc-audio soc-audio: CPU DAI omap-mcbsp.2 not registered
[ 2.661529] soc-audio soc-audio: CODEC tlv320aic325x-codec not registered
[ 2.661560] soc-audio soc-audio: Registered card 'Tablet44xx'

The way we had initialized the audio machine driver in the kernel is:

/* Digital audio interface glue - connects codec <--> CPU */
static struct snd_soc_dai_link sdp44xx_aic3256_dai[] = {
{
.name = "Legacy McBSP2",
.stream_name = "tlv320aic325x-codec",
.cpu_dai_name ="omap-mcbsp.2", // Mcbsp 2
.codec_dai_name = "tlv320aic325x-MM_EXT",
.platform_name = "omap-pcm-audio",
.codec_name = "tlv320aic325x-codec",
.init = sdp44xx_aic3256_init,
.ops = &sdp44xx_aic3256_ops,
},
};

/* Audio machine driver */
static struct snd_soc_card snd_soc_sdp44xx_aic3256 = {
.name = "Tablet44xx",
.dai_link = sdp44xx_aic3256_dai,
.num_links = ARRAY_SIZE(sdp44xx_aic3256_dai),
.codec_conf = sdp44xx_codec_conf,
.num_configs = ARRAY_SIZE(sdp44xx_codec_conf),
};

Can someone help us on what is being missed in getting through with the registration of the codec and MCBSP interfaces?

Thanks and regards

Rajam R

  • Hi, Rajam,

    I hope someone in the community has some tips for you. We do not have experience with this devices and the OMAP4460.

    You may want to investigate approaching one of our Third Parties for help with this issue. You can find a list of OMAP4460 Third parties here.

    -d2

  • Hi 

    After some struggle, we could compile kernel with driver code for the board which initializes the codec and mcbsp interface, However the kernel hangs while booting during the initialization of MMC interface. 

    In the board design, the audio codec is connected to I2C-1 bus in which the PMIC chip TWL6032 is also connected. 

    Here is the snapshot of kernel log where it stops:

    [ 0.279968] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 400 kHz
    [ 0.281005] twl_core: detected twl6032 rev.1 eepromrev.56
    [ 0.282287] twl 1-0048: PIH (irq 39) chaining IRQs 416..436
    [ 0.283355] LDOUSB: 3300 mV normal standby
    [ 0.287017] twl6030_usb twl6030_usb: Initialized TWL6030 USB module
    [ 0.287994] VANA: 2100 mV normal standby
    [ 0.288726] CLK32KAUDIO:
    [ 0.289642] SYSEN:
    [ 0.290588] REGEN1:
    [ 0.291290] CLK32KG:
    [ 0.291564] V2V1: 2100 mV normal
    [ 0.291595] V2V1: supplied by SYSEN
    [ 0.292236] LDO5: 1200 <--> 3000 mV at 3000 mV normal standby
    [ 0.293182] LDO1: 1800 <--> 2500 mV at 1900 mV normal standby
    [ 0.294097] LDO7: 1200 <--> 2900 mV at 1800 mV normal standby
    [ 0.295227] LDO6: 1800 mV normal standby
    [ 0.295440] LDO6: supplied by V2V1
    [ 0.296752] LDOLN: 1800 mV normal standby
    [ 0.296966] LDOLN: supplied by V2V1
    [ 0.297943] LDO2: 1000 <--> 3000 mV at 2800 mV normal standby
    [ 0.298858] LDO4: 1200 <--> 2800 mV at 1800 mV normal standby
    [ 0.299774] LDO3: 1000 <--> 3000 mV at 1200 mV normal standby
    [ 0.301025] SMPS4: 1800 mV normal standby
    [ 0.301391] twl6032: set (mod=0x0D reg=0x53 val=0x01): VCORE1 OFF=OFF SLEEP=O
    [ 0.301544] twl6032: set (mod=0x0D reg=0x59 val=0x01): VCORE2 OFF=OFF SLEEP=O
    [ 0.301666] twl6032: set (mod=0x0D reg=0xf6 val=0x77): VCORE1 disable PD on n
    [ 0.301788] twl6032: set (mod=0x0D reg=0x5e val=0x00): VCORE3 - remove bindis
    [ 0.301910] twl6032: set (mod=0x0D reg=0x64 val=0x00): VMEM - remove bindings
    [ 0.302398] omap_i2c omap_i2c.2: bus 2 rev2.4.0 at 400 kHz
    [ 0.302703] omap_i2c omap_i2c.4: bus 4 rev2.4.0 at 400 kHz
    [ 0.302947] Linux video capture interface: v2.00
    [ 0.303009] sr_init: No PMIC hook to init smartreflex
    [ 0.303558] omap-iommu omap-iommu.0: dsp registered
    [ 0.303649] omap-iommu omap-iommu.1: ipu registered
    [ 0.303863] Advanced Linux Sound Architecture Driver Version 1.0.24.
    [ 0.304565] Bluetooth: Core ver 2.16
    [ 0.304626] NET: Registered protocol family 31
    [ 0.304626] Bluetooth: HCI device and connection manager initialized
    [ 0.304626] Bluetooth: HCI socket layer initialized
    [ 0.304656] Bluetooth: L2CAP socket layer initialized
    [ 0.304687] Bluetooth: SCO socket layer initialized
    [ 0.306274] smartreflex smartreflex.0: omap_sr_probe: SmartReflex driver inid
    [ 0.306793] smartreflex smartreflex.1: omap_sr_probe: SmartReflex driver inid
    [ 0.307250] smartreflex smartreflex.2: omap_sr_probe: SmartReflex driver inid
    [ 0.307312] Power Management for TI OMAP4XX/OMAP5XXX devices.
    [ 0.307647] omap_opp_set_min_rate: Missing opp info for hwmod hsi
    [ 0.307678] Forcing clock hsi_fck to minimum rate 96000000
    [ 0.307708] omap_opp_set_min_rate: Missing opp info for hwmod dsp_c0
    [ 0.307708] Forcing clock virt_dpll_dsp_ck to minimum rate 232750000
    [ 0.307739] omap_opp_set_min_rate: Missing opp info for hwmod aess
    [ 0.307739] Forcing clock abe_clk to minimum rate 98304000
    [ 0.308258] Switching to clocksource 32k_counter
    [ 0.327972] NET: Registered protocol family 2
    [ 0.328247] IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
    [ 0.328948] TCP established hash table entries: 131072 (order: 8, 1048576 by)
    [ 0.331115] TCP bind hash table entries: 65536 (order: 7, 786432 bytes)
    [ 0.332397] TCP: Hash tables configured (established 131072 bind 65536)
    [ 0.332397] TCP: reno registered
    [ 0.332427] UDP hash table entries: 512 (order: 2, 16384 bytes)
    [ 0.332489] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
    [ 0.332824] NET: Registered protocol family 1
    [ 0.333160] RPC: Registered named UNIX socket transport module.
    [ 0.333190] RPC: Registered udp transport module.
    [ 0.333190] RPC: Registered tcp transport module.
    [ 0.333221] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [ 0.333343] usbhs_omap usbhs_omap: ehci_logic_fck failed:-2
    [ 0.334503] NetWinder Floating Point Emulator V0.97 (double precision)
    [ 0.335296] omap-rproc.1: alias fck already exists
    [ 0.347625] sr_classp5_calib_work: smartreflex_core: Calibration complete: V0
    [ 0.355285] sr_classp5_calib_work: smartreflex_mpu: Calibration complete: Vo0
    [ 0.355438] sr_classp5_calib_work: smartreflex_iva: Calibration complete: Vo0
    [ 0.476562] highmem bounce pool size: 64 pages
    [ 0.477783] fuse init (API version 7.18)
    [ 0.477996] msgmni has been set to 1255
    [ 0.479736] io scheduler noop registered
    [ 0.479736] io scheduler deadline registered
    [ 0.479827] io scheduler cfq registered (default)
    [ 0.480590] omap_uart.1: ttyO1 at MMIO 0x4806c000 (irq = 105) is a OMAP UART1
    [ 0.480987] omap_uart.2: ttyO2 at MMIO 0x48020000 (irq = 106) is a OMAP UART2
    [ 1.668121] console [ttyO2] enabled
    [ 1.672393] omap_uart.3: ttyO3 at MMIO 0x4806e000 (irq = 102) is a OMAP UART3
    [ 1.680725] [drm] Initialized drm 1.1.0 20060810
    [ 1.694213] brd: module loaded
    [ 1.702026] loop: module loaded
    [ 1.705566] (hci_tty): inside hci_tty_init
    [ 1.710174] (hci_tty): allocated 252, 0
    [ 1.715148] inside aic3xxx_i2c_probe
    [ 1.719146] tlv320aic325x 1-0018: aic3xxx_device_init beginning
    [ 1.736541] tlv320aic325x 1-0018: TLV320AIC3256 revision 0
    [ 1.743530] tlv320aic325x 1-0018: aic3xxx_device_init added mfd devices
    [ 1.753326] NFC Driver for TI WiLink
    [ 1.757659] omap2_mcspi omap2_mcspi.1: master is unqueued, this is deprecated
    [ 1.765960] omap2_mcspi omap2_mcspi.2: master is unqueued, this is deprecated
    [ 1.774047] omap2_mcspi omap2_mcspi.3: master is unqueued, this is deprecated
    [ 1.782165] omap2_mcspi omap2_mcspi.4: master is unqueued, this is deprecated
    [ 1.790252] tun: Universal TUN/TAP device driver, 1.6
    [ 1.795745] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
    [ 1.803070] usbcore: registered new interface driver asix
    [ 1.809020] usbcore: registered new interface driver cdc_ether
    [ 1.815429] usbcore: registered new interface driver smsc95xx
    [ 1.821716] usbcore: registered new interface driver net1080
    [ 1.827941] usbcore: registered new interface driver cdc_subset
    [ 1.834411] usbcore: registered new interface driver zaurus
    [ 1.840545] usbcore: registered new interface driver cdc_ncm
    [ 1.846954] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [ 1.854431] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
    [ 1.860870] ehci-omap ehci-omap.0: new USB bus registered, assigned bus numb1
    [ 1.870483] ehci-omap ehci-omap.0: irq 109, io mem 0x4a064c00
    [ 1.886505] ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
    [ 1.892944] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [ 1.900329] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber1
    [ 1.908142] usb usb1: Product: OMAP-EHCI Host Controller
    [ 1.913909] usb usb1: Manufacturer: Linux 3.4.34 ehci_hcd
    [ 1.919769] usb usb1: SerialNumber: ehci-omap.0
    [ 1.925292] hub 1-0:1.0: USB hub found
    [ 1.929382] hub 1-0:1.0: 3 ports detected
    [ 1.964935] usbcore: registered new interface driver usbtest
    [ 1.971069] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
    [ 2.178924] musb-hdrc musb-hdrc: USB OTG mode controller at f01dc000 using D4
    [ 2.188049] mousedev: PS/2 mouse device common for all mice
    [ 2.195373] twl6030_pwrbutton_probe: Enter
    [ 2.200378] input: twl6030_pwrbutton as /devices/platform/omap_i2c.1/i2c-1/10
    [ 2.213348] twl_rtc twl_rtc: Power up reset detected.
    [ 2.220031] twl_rtc twl_rtc: Enabling TWL-RTC.
    [ 2.261505] usb 1-1: new high-speed USB device number 2 using ehci-omap
    [ 2.271148] twl_rtc twl_rtc: rtc core: registered twl_rtc as rtc0
    [ 2.277801] i2c /dev entries driver
    [ 2.282043] usbcore: registered new interface driver uvcvideo
    [ 2.288238] USB Video Class driver (1.1.1)
    [ 2.292816] Driver for 1-wire Dallas network protocol.
    [ 2.313629] twl6030_bci twl6030_bci: Battery Voltage at Bootup is 3792 mV
    [ 2.328094] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [ 2.336883] device-mapper: ioctl: 4.22.0-ioctl (2011-10-19) initialised: dm-m
    [ 2.348327] cpuidle: using governor ladder
    [ 2.353546] cpuidle: using governor menu
    [ 2.367431] usbcore: registered new interface driver usbhid
    [ 2.373504] usbhid: USB HID core driver
    [ 2.377716] thermal_get_slope:Getting slope is not supported for domain cpu
    [ 2.385559] thermal_get_offset:Getting offset is not supported for domain cpu
    [ 2.393676] omap_governor_init: domain cpu slope -22 const -22
    [ 2.400085] thermal_get_slope:Getting slope is not supported for domain gpu
    [ 2.407653] thermal_get_offset:Getting offset is not supported for domain gpu
    [ 2.415405] omap_governor_init: domain gpu slope -22 const -22
    [ 2.425079] rproc remoteproc0: ipu_c0 is available
    [ 2.430328] rproc remoteproc0: Note: remoteproc is still under development a.
    [ 2.440582] sr_classp5_calib_work: smartreflex_mpu: Calibration complete: Vo0
    [ 2.455322] rproc remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and b.
    [ 2.466918] usb 1-1: New USB device found, idVendor=0424, idProduct=9500
    [ 2.472747] OMAP HSI: HSI driver version 0.4.4
    [ 2.473297] Soc-core register codec tlv320aic325x-codec.0 0
    [ 2.473571] omap_mcbsp_dai registration ... ret 0
    [ 2.473602] omap_mcbsp_init ... 0
    [ 2.473602] SDP44xx_aic3256 SoC init
    [ 2.473602] Blaze Tablet SoC init
    [ 2.473754] soc_probe_dai_link cpu_dai omap-mcbsp-dai.1 probed
    [ 2.473815] driver_init: Allocated Major Number: 247
    [ 2.473815]
    [ 2.473846] driver_init: Registered cfw driver
    [ 2.518707] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    [ 2.528900] smsc95xx v1.0.4
    [ 2.606109] mmc0: new high speed MMC card at address 0001
    [ 2.612213] mmcblk0: mmc0:0001 HBG4e 29.1 GiB
    [ 2.617309] mmcblk0boot0: mmc0:0001 HBG4e partition 1 4.00 MiB
    [ 2.623931] mmcblk0boot1: mmc0:0001 HBG4e partition 2 4.00 MiB
    [ 2.632141] mmcblk0: unknown partition table
    [ 2.638610] smsc95xx 1-1:1.0: eth0: register 'smsc95xx' at usb-ehci-omap.0-1a
    [ 2.650909] mmcblk0boot1: unknown partition table
    [ 2.659118] mmcblk0boot0: unknown partition table
    [ 2.767486] mmc1: host does not support reading read-only switch. assuming w.
    [ 2.778656] mmc1: new high speed SD card at address 0002
    [ 2.784698] mmcblk1: mmc1:0002 00000 1.86 GiB
    [ 2.791229] mmcblk1: p1 p2

    Can we get some help on where the issue might be and suggestions on how to initialize the codec so that the registration and interface of driver with ALSA module gets through for playing the audio? 

    Thanks and regards

    Rajam