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.

Handsfree not working with TWL6040/OMAP4430 custom board on Linux 3.15 kernel with device tree support

Other Parts Discussed in Thread: TWL6040, TWL6030, WL1271, TLV320AIC3106

Hi,

I'm working on OMAP4430 custom board with linux kernel 3.15(with device tree support) bring up. I'm having a problem with handsfree (Ext Spk)  on TWL6040 audio codec, where Earphone, headset, haedset -mic, main-mic, and vibrator are working fine. When enabling handsfree  with "amixer" control commands and  play an audio file by means of "aplay" tool, I could hear only "pop" sound from handsfree. Could you please help me to resolve this issue?

Below are boot logs and commands used,

U-Boot 2015.01-rc1-gaa586d4 (Jun 18 2015 - 21:11:46)

CPU : OMAP4430 ES2.3
Board: OMAP4430 SDP
I2C: ready
DRAM: 1 GiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Battery Voltage: 3691 mV
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
reading uImage
5317080 bytes read in 260 ms (19.5 MiB/s)
reading omap4-sdp.dtb
59572 bytes read in 7 ms (8.1 MiB/s)
Booting from mmc0 ...
## Booting kernel from Legacy Image at 82000000 ...
Image Name: Linux-3.15.0-00023-g788068e
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 5317016 Bytes = 5.1 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Loading Kernel Image ... OK
Loading Device Tree to 8ffee000, end 8ffff8b3 ... OK

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 3.15.0-00023-g788068e (mvijaybabu@ubuntu) (gcc version 4.6.3 (Sourcery CodeBench Lite 2012.03-57) ) #1 SMP Sun Jun 21 18:13:57 IST 2015
[ 0.000000] CPU: ARMv7 Processor [411fc093] revision 3 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine model: TI OMAP4 SDP board
[ 0.000000] cma: CMA: reserved 16 MiB at ae800000
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] OMAP4430 ES2.3
[ 0.000000] PERCPU: Embedded 9 pages/cpu @edf95000 s14080 r8192 d14592 u36864
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260368
[ 0.000000] Kernel command line: console=ttyO2,115200n8 vram=16M root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait omapfb.mode=lcd:800x480MR-16@60 no_console_suspend
[ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Memory: 1005796K/1047552K available (6854K kernel code, 596K rwdata, 2528K rodata, 381K init, 5531K bss, 41756K reserved, 269312K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xf0000000 - 0xff000000 ( 240 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xef800000 ( 760 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0931cd0 (9384 kB)
[ 0.000000] .init : 0xc0932000 - 0xc0991700 ( 382 kB)
[ 0.000000] .data : 0xc0992000 - 0xc0a27180 ( 597 kB)
[ 0.000000] .bss : 0xc0a27180 - 0xc0f8e128 (5532 kB)
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] NR_IRQS:16 nr_irqs:16 16
[ 0.000000] ti_dt_clocks_register: failed to lookup clock node div_ts_ck
[ 0.000000] ti_dt_clocks_register: failed to lookup clock node bandgap_ts_fclk
[ 0.000000] OMAP clockevent source: timer1 at 32768 Hz
[ 0.000030] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 65536000000000ns
[ 0.000061] OMAP clocksource: 32k_counter at 32768 Hz
[ 0.000244] smp_twd: clock not found -2
[ 0.002838] Console: colour dummy device 80x30
[ 0.002929] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[ 0.002960] ... MAX_LOCKDEP_SUBCLASSES: 8
[ 0.002960] ... MAX_LOCK_DEPTH: 48
[ 0.002960] ... MAX_LOCKDEP_KEYS: 8191
[ 0.002990] ... CLASSHASH_SIZE: 4096
[ 0.002990] ... MAX_LOCKDEP_ENTRIES: 16384
[ 0.002990] ... MAX_LOCKDEP_CHAINS: 32768
[ 0.003021] ... CHAINHASH_SIZE: 16384
[ 0.003021] memory used by lock dependency info: 3695 kB
[ 0.003021] per task-struct memory footprint: 1152 bytes
[ 0.003112] Calibrating local timer... 297.34MHz.
[ 0.058135] Calibrating delay loop... 1185.38 BogoMIPS (lpj=5926912)
[ 0.137512] pid_max: default: 32768 minimum: 301
[ 0.138244] Security Framework initialized
[ 0.138549] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.138610] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.142578] CPU: Testing write buffer coherency: ok
[ 0.144622] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.144714] Setting up static identity map for 0x80684dd0 - 0x80684e40
[ 0.144897] L310 cache controller enabled
[ 0.144927] l2x0: 16 ways, CACHE_ID 0x410000c4, AUX_CTRL 0x7e470000, Cache size: 1024 kB
[ 0.154602] CPU1: Booted secondary processor
[ 0.186981] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[ 0.187713] Brought up 2 CPUs
[ 0.187744] SMP: Total of 2 processors activated.
[ 0.187774] CPU: All CPU(s) started in SVC mode.
[ 0.191131] devtmpfs: initialized
[ 0.201995] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[ 0.207946] omap_hwmod: l3_main_3 using broken dt data from ocp
[ 0.213134] omap_hwmod: l3_main_2 using broken dt data from ocp
[ 0.415008] pinctrl core: initialized pinctrl subsystem
[ 0.418182] regulator-dummy: no parameters
[ 0.480010] NET: Registered protocol family 16
[ 0.485198] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.575347] OMAP GPIO hardware version 0.1
[ 0.586120] omap-gpmc 50000000.gpmc: GPMC revision 6.0
[ 0.610076] platform 4b501000.aes: Cannot lookup hwmod 'aes'
[ 0.610595] platform 480a5000.des: Cannot lookup hwmod 'des'
[ 0.616394] error setting wl12xx data: -38
[ 0.619445] No ATAGs?
[ 0.619567] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[ 0.619567] hw-breakpoint: maximum watchpoint size is 4 bytes.
[ 0.622802] OMAP DMA hardware revision 0.0
[ 0.624664] ARM PMU: not yet supported on OMAP4430 due to missing CTI driver
[ 0.651824] edma-dma-engine edma-dma-engine.0: Can't allocate PaRAM dummy slot
[ 0.651916] edma-dma-engine: probe of edma-dma-engine.0 failed with error -5
[ 0.693359] omap-dma-engine 4a056000.dma-controller: OMAP DMA engine driver
[ 0.695312] VDD_ETH: 3300 mV
[ 0.696258] VBAT: 3750 mV
[ 0.696807] reg-fixed-voltage wl12xx_vmmc.12: could not find pctldev for node /ocp/pinmux@4a100040/pinmux_wl12xx_en_pins, deferring probe
[ 0.696838] platform wl12xx_vmmc.12: Driver reg-fixed-voltage requests probe deferral
[ 0.700653] SCSI subsystem initialized
[ 0.701538] usbcore: registered new interface driver usbfs
[ 0.701751] usbcore: registered new interface driver hub
[ 0.702087] usbcore: registered new device driver usb
[ 0.702880] hsusb1_phy.13 supply vcc not found, using dummy regulator
[ 0.706054] omap_i2c 48070000.i2c: could not find pctldev for node /ocp/pinmux@4a100040/pinmux_i2c1_pins, deferring probe
[ 0.706085] platform 48070000.i2c: Driver omap_i2c requests probe deferral
[ 0.706176] omap_i2c 48072000.i2c: could not find pctldev for node /ocp/pinmux@4a100040/pinmux_i2c2_pins, deferring probe
[ 0.706207] platform 48072000.i2c: Driver omap_i2c requests probe deferral
[ 0.706298] omap_i2c 48060000.i2c: could not find pctldev for node /ocp/pinmux@4a100040/pinmux_i2c3_pins, deferring probe
[ 0.706329] platform 48060000.i2c: Driver omap_i2c requests probe deferral
[ 0.706420] omap_i2c 48350000.i2c: could not find pctldev for node /ocp/pinmux@4a100040/pinmux_i2c4_pins, deferring probe
[ 0.706451] platform 48350000.i2c: Driver omap_i2c requests probe deferral
[ 0.707977] Advanced Linux Sound Architecture Driver Initialized.
[ 0.712097] Switched to clocksource 32k_counter
[ 0.871582] NET: Registered protocol family 2
[ 0.873962] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.874298] TCP bind hash table entries: 8192 (order: 6, 294912 bytes)
[ 0.877563] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.877868] TCP: reno registered
[ 0.877929] UDP hash table entries: 512 (order: 3, 40960 bytes)
[ 0.878356] UDP-Lite hash table entries: 512 (order: 3, 40960 bytes)
[ 0.879913] NET: Registered protocol family 1
[ 0.881530] RPC: Registered named UNIX socket transport module.
[ 0.881561] RPC: Registered udp transport module.
[ 0.881561] RPC: Registered tcp transport module.
[ 0.881591] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.892822] futex hash table entries: 512 (order: 3, 32768 bytes)
[ 1.104217] bounce pool size: 64 pages
[ 1.105377] VFS: Disk quotas dquot_6.5.2
[ 1.105529] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 1.108123] NFS: Registering the id_resolver key type
[ 1.108551] Key type id_resolver registered
[ 1.108581] Key type id_legacy registered
[ 1.108703] ntfs: driver 2.1.30 [Flags: R/W].
[ 1.108917] jffs2: version 2.2. (NAND) (SUMMARY) �© 2001-2006 Red Hat, Inc.
[ 1.109588] msgmni has been set to 1470
[ 1.114379] io scheduler noop registered
[ 1.114410] io scheduler deadline registered
[ 1.114501] io scheduler cfq registered (default)
[ 1.121185] pinctrl-single 4a100040.pinmux: 203 pins at pa fc100040 size 406
[ 1.121765] pinctrl-single 4a31e040.pinmux: 28 pins at pa fc31e040 size 56
[ 1.125030] backlight.10 supply power not found, using dummy regulator
[ 1.125488] pwm-backlight backlight.10: unable to request PWM, trying legacy API
[ 1.125488] pwm-backlight backlight.10: unable to request legacy PWM
[ 1.125915] platform backlight.10: Driver pwm-backlight requests probe deferral
[ 1.127532] OMAP DSS rev 4.0
[ 1.133270] panel-dsi-hh display.16: Probe Successful: LCD Panel HH
[ 1.136077] panel-dsi-hh display.16: Connect Display..
[ 1.136199] panel-dsi-hh display.16: Failed to connect to video source
[ 1.136230] omapfb omapfb: failed to connect default display
[ 1.136230] omapfb omapfb: failed to init overlay connections
[ 1.136230] panel-dsi-hh display.16: Disconnect Disconnect..
[ 1.139923] omapfb omapfb: failed to setup omapfb
[ 1.139984] platform omapfb: Driver omapfb requests probe deferral
[ 1.141357] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 1.147949] omap_uart 4806a000.serial: no wakeirq for uart0
[ 1.148986] 4806a000.serial: ttyO0 at MMIO 0x4806a000 (irq = 104, base_baud = 3000000) is a OMAP UART0
[ 1.151184] omap_uart 4806c000.serial: no wakeirq for uart0
[ 1.151702] 4806c000.serial: ttyO1 at MMIO 0x4806c000 (irq = 105, base_baud = 3000000) is a OMAP UART1
[ 1.153259] omap_uart 48020000.serial: no wakeirq for uart0
[ 1.153900] 48020000.serial: ttyO2 at MMIO 0x48020000 (irq = 106, base_baud = 3000000) is a OMAP UART2
[ 2.084350] console [ttyO2] enabled
[ 2.089874] omap_uart 4806e000.serial: no wakeirq for uart0
[ 2.097167] 4806e000.serial: ttyO3 at MMIO 0x4806e000 (irq = 102, base_baud = 3000000) is a OMAP UART3
[ 2.132141] brd: module loaded
[ 2.150024] loop: module loaded
[ 2.156677] mtdoops: mtd device (mtddev=name/number) must be supplied
[ 2.168243] PPP generic driver version 2.4.2
[ 2.173645] PPP BSD Compression module registered
[ 2.178588] PPP Deflate Compression module registered
[ 2.183990] PPP MPPE Compression module registered
[ 2.189025] NET: Registered protocol family 24
[ 2.193969] usbcore: registered new interface driver cdc_ether
[ 2.200347] usbcore: registered new interface driver cdc_ncm
[ 2.207183] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 2.214141] ehci-platform: EHCI generic platform driver
[ 2.220214] ehci-omap: OMAP-EHCI Host Controller driver
[ 2.246459] ehci-omap 4a064c00.ehci: EHCI Host Controller
[ 2.254547] ehci-omap 4a064c00.ehci: new USB bus registered, assigned bus number 1
[ 2.263580] ehci-omap 4a064c00.ehci: irq 109, io mem 0x4a064c00
[ 2.281951] ehci-omap 4a064c00.ehci: USB 2.0 started, EHCI 1.00
[ 2.290039] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 2.297210] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.304840] usb usb1: Product: EHCI Host Controller
[ 2.309967] usb usb1: Manufacturer: Linux 3.15.0-00023-g788068e ehci_hcd
[ 2.317047] usb usb1: SerialNumber: 4a064c00.ehci
[ 2.326263] hub 1-0:1.0: USB hub found
[ 2.330535] hub 1-0:1.0: 3 ports detected
[ 2.338714] usbcore: registered new interface driver cdc_acm
[ 2.344696] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 2.353393] usbcore: registered new interface driver usb-storage
[ 2.360076] usbcore: registered new interface driver usbserial
[ 2.366363] usbcore: registered new interface driver usbserial_generic
[ 2.373870] usbserial: USB Serial support registered for generic
[ 2.380340] usbcore: registered new interface driver option
[ 2.386383] usbserial: USB Serial support registered for GSM modem (1-port)
[ 2.394165] usbcore: registered new interface driver usbtest
[ 2.401611] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver
[ 2.408447] musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 2
[ 2.417327] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[ 2.424499] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.432525] usb usb2: Product: MUSB HDRC host driver
[ 2.437744] usb usb2: Manufacturer: Linux 3.15.0-00023-g788068e musb-hcd
[ 2.444824] usb usb2: SerialNumber: musb-hdrc.0.auto
[ 2.452728] hub 2-0:1.0: USB hub found
[ 2.456939] hub 2-0:1.0: 1 port detected
[ 2.495758] mousedev: PS/2 mouse device common for all mice
[ 2.504730] i2c /dev entries driver
[ 2.508483] Driver for 1-wire Dallas network protocol.
[ 2.523132] omap_wdt: OMAP Watchdog Timer Rev 0x00: initial timeout 60 sec
[ 2.533325] omap_hsmmc 4809c000.mmc: unable to get vmmc regulator -517
[ 2.540466] platform 4809c000.mmc: Driver omap_hsmmc requests probe deferral
[ 2.548553] omap_hsmmc 480b4000.mmc: unable to get vmmc regulator -517
[ 2.555603] platform 480b4000.mmc: Driver omap_hsmmc requests probe deferral
[ 2.563812] omap_hsmmc 480d5000.mmc: unable to get vmmc regulator -517
[ 2.570892] platform 480d5000.mmc: Driver omap_hsmmc requests probe deferral
[ 2.579345] usbcore: registered new interface driver usbhid
[ 2.585235] usbhid: USB HID core driver
[ 2.597778] omap-abe-twl6040 sound.11: ASoC: CODEC twl6040-codec not registered
[ 2.605682] omap-abe-twl6040 sound.11: snd_soc_register_card() failed: -517
[ 2.613891] platform sound.11: Driver omap-abe-twl6040 requests probe deferral
[ 2.622436] oprofile: no performance counters
[ 2.627777] oprofile: using timer interrupt.
[ 2.632904] TCP: cubic registered
[ 2.636413] Initializing XFRM netlink socket
[ 2.641021] NET: Registered protocol family 17
[ 2.645782] NET: Registered protocol family 15
[ 2.650848] Key type dns_resolver registered
[ 2.656768] Power Management for TI OMAP4+ devices.
[ 2.662017] Power Management for TI OMAP4.
[ 2.666320] OMAP4 PM: u-boot >= v2012.07 is required for full PM support
[ 2.673553] ThumbEE CPU extension supported.
[ 2.678131] Registering SWP/SWPB emulation handler
[ 2.687011] VBAT: disabling
[ 2.687011] VDD_ETH: disabling
[ 2.782073] vwl1271: 1800 mV
[ 2.792327] Skipping twl internal clock init and using bootloader value (unknown osc rate)
[ 2.806365] twl 0-0048: PIH (irq 39) nested IRQs
[ 2.814819] twl_rtc rtc.17: Enabling TWL-RTC
[ 2.824737] twl_rtc rtc.17: rtc core: registered rtc.17 as rtc0
[ 2.834350] VAUX1_6030: 1000 <--> 3000 mV at 2800 mV
[ 2.841979] VAUX2_6030: 1200 <--> 2800 mV at 1800 mV
[ 2.849456] VAUX3_6030: 1000 <--> 3000 mV at 1200 mV
[ 2.856994] VMMC: 1200 <--> 3000 mV at 3000 mV
[ 2.863891] VPP: 1800 <--> 2500 mV at 1900 mV
[ 2.870758] VUSIM: 1200 <--> 2900 mV at 1800 mV
[ 2.877563] VDAC: 1800 mV
[ 2.881927] VANA: 2100 mV
[ 2.886840] VCXIO: 1800 mV
[ 2.891326] VUSB: 3300 mV
[ 2.896179] V1V8: 1800 mV
[ 2.901062] V2V1: 2100 mV
[ 2.911041] twl6030_usb usb-comparator.31: Initialized TWL6030 USB module
[ 2.927062] twl6030_bci bci.35: twl6030_bci_battery_probe: Platform data not available, so populate from DT
[
[ 3.502624] twl6030_bci bci.35: Battery Voltage at Bootup is 3742 mV
[ 3.545959] twl6030_pwrbutton pwrbutton.36: twl6030_pwrbutton_probe: Platform data not available, so populate from DT
[ 3.557373] twl6030_pwrbutton_probe: Enter
[ 3.562683] input: twl6030_pwrbutton as /devices/44000000.ocp/48070000.i2c/i2c-0/0-0048/pwrbutton.36/input/input0
[ 3.590545] omap_i2c 48070000.i2c: bus 0 rev0.10 at 400 kHz
[ 3.601776] noa3301 1-0037: ALS Integration Time = 4
[ 3.607055] noa3301 1-0037: ALS Interval = 10
[ 3.611816] input: noa3301 as /devices/virtual/input/input1
[ 3.672607] noa3301 1-0037: noa3301_probe: NOA3301 probed successfully.
[ 3.672607] omap_i2c 48072000.i2c: bus 1 rev0.10 at 400 kHz
[ 3.690185] omap_i2c 48060000.i2c: bus 2 rev0.10 at 400 kHz
[ 3.792724] HX8526: Device ID = 85-26-01
[ 3.797515] HX8526: Version ID = 00
[ 3.944458] input: hx8526-touchscreen as /devices/44000000.ocp/48350000.i2c/i2c-3/3-004a/input/input2
[ 3.955810] omap_i2c 48350000.i2c: bus 3 rev0.10 at 100 kHz
[ 3.962738] backlight.10 supply power not found, using dummy regulator
[ 3.975494] panel-dsi-hh display.16: Connect Display..
[ 3.985015] omapfb omapfb: cannot parse default modes
[ 4.008941] Console: switching to colour frame buffer device 60x50
[ 4.023498] panel-dsi-hh display.16: Enable Display
[ 4.028961] panel-dsi-hh display.16: START : Power On Display ..
[ 4.481872] panel-dsi-hh display.16: Panel HH : Powered On
[ 4.488189] omapfb omapfb: using display 'lcd0' mode 480x800
[ 4.498992] omap_hsmmc 4809c000.mmc: pins are not configured from the driver
[ 4.554290] omap_hsmmc 480b4000.mmc: pins are not configured from the driver


[ 4.692962] omap-abe-twl6040 sound.11: twl6040-legacy <-> 40132000.mcpdm mapping ok
[ 4.702148] omap-abe-twl6040 sound.11: dmic-hifi <-> 4012e000.dmic mapping ok
[ 4.727783] input: SDP4430 Headset Jack as /devices/sound.11/sound/card0/input3


[ 4.736236] mmc0: host does not support reading read-only switch. assuming write-enable.
[ 4.748565] mmc0: new high speed SDHC card at address e624
[ 4.749847] input: gpio_keys.7 as /devices/gpio_keys.7/input/input4
[ 4.760986] twl_rtc rtc.17: setting system clock to 2015-05-12 14:27:05 UTC (1431440825)
[ 4.764587] mmcblk0: mmc0:e624 SU04G 3.69 GiB
[ 4.818145] ALSA device list:
[ 4.818695] #0: SDP4430
[ 4.833129] mmcblk0: p1 p2
[ 4.851654] kjournald starting. Commit interval 5 seconds
[ 4.859893] EXT3-fs (mmcblk0p2): using internal journal
[ 4.865600] EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
[ 4.872955] VFS: Mounted root (ext3 filesystem) on device 179:2.
[ 4.886016] devtmpfs: mounted
[ 4.886779] Freeing unused kernel memory: 380K (c0932000 - c0991000)
[ 4.932128] mmc1: new high speed MMC card at address 0001
[ 4.939758] mmcblk1: mmc1:0001 SEM04G 3.68 GiB
[ 4.945678] mmcblk1boot0: mmc1:0001 SEM04G partition 1 1.00 MiB
[ 4.952423] mmcblk1boot1: mmc1:0001 SEM04G partition 2 1.00 MiB
[ 4.964538] mmcblk1: p1 p2 p3
[ 4.976593] mmcblk1boot1: unknown partition table
[ 4.986968] mmcblk1boot0: unknown partition table
[ 4.997680] omap_hsmmc 480d5000.mmc: card claims to support voltages below defined range
[ 5.021240] mmc2: queuing unknown CIS tuple 0x91 (3 bytes)
[ 5.030029] mmc2: new SDIO card at address 0001
INIT: version 2.88 booting
Starting udev
[ 5.712249] udevd[969]: starting version 182
[ 7.192291] random: nonblocking pool is initialized
[ 8.080383] wl1271_sdio mmc2:0001:2: legacy platform data not found, trying device tree
bootlogd: cannot allocate pseudo tty: No such file or directory
[ 8.588287] cfg80211: Calling CRDA to update world regulatory domain
INIT: Entering runlevel: 5
Configuring network interfaces... ifconfig: SIOCGIFFLAGS: No such device
[ 9.787139] wlcore: loaded
Starting system message bus: dbus.
Starting syslogd/klogd: done
[ 10.137329] Number of LUNs=8
[ 10.143280] Mass Storage Function, version: 2009/09/11
[ 10.145477] LUN: removable file: (no medium)
[ 10.153411] Number of LUNs=1
[ 10.157684] LUN: removable file: /dev/mmcblk1p3
[ 10.162597] Number of LUNs=1
[ 10.167907] g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11
[ 10.175933] g_mass_storage gadget: userspace failed to provide iSerialNumber
[ 10.175933] g_mass_storage gadget: g_mass_storage ready

Poky (Yocto Project Reference Distro) 1.7.2 hh /dev/ttyO2

login:root

root@hh:~# amixer controls
numid=3,iface=MIXER,name='Aux FM Volume'
numid=1,iface=MIXER,name='Capture Preamplifier Volume'
numid=2,iface=MIXER,name='Capture Volume'
numid=10,iface=MIXER,name='AUXL Playback Switch'
numid=9,iface=MIXER,name='AUXR Playback Switch'
numid=19,iface=MIXER,name='Analog Left Capture Route'
numid=18,iface=MIXER,name='Analog Right Capture Route'
numid=11,iface=MIXER,name='Earphone Playback Switch'
numid=6,iface=MIXER,name='Earphone Playback Volume'
numid=17,iface=MIXER,name='Handsfree Left Playback'
numid=5,iface=MIXER,name='Handsfree Playback Volume'
numid=16,iface=MIXER,name='Handsfree Right Playback'
numid=15,iface=MIXER,name='Headset Left Playback'
numid=4,iface=MIXER,name='Headset Playback Volume'
numid=7,iface=MIXER,name='Headset Power Mode'
numid=14,iface=MIXER,name='Headset Right Playback'
numid=8,iface=MIXER,name='PLL Selection'
numid=13,iface=MIXER,name='Vibra Left Playback'
numid=12,iface=MIXER,name='Vibra Right Playback'

root@hh:~# aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: SDP4430 [SDP4430], device 0: TWL6040 twl6040-legacy-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0

root@hh:~# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: SDP4430 [SDP4430], device 0: TWL6040 twl6040-legacy-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: SDP4430 [SDP4430], device 1: DMIC Capture dmic-hifi-1 []
Subdevices: 1/1
Subdevice #0: subdevice #0

root@hh:~# amixer cset numid=8 1
numid=8,iface=MIXER,name='PLL Selection'
; type=ENUMERATED,access=rw------,values=1,items=2
; Item #0 'Low-Power'
; Item #1 'High-Performance'
: values=1


root@hh:~# amixer cset numid=17 1
numid=17,iface=MIXER,name='Handsfree Left Playback'
; type=ENUMERATED,access=rw------,values=1,items=3
; Item #0 'Off'
; Item #1 'HF DAC'
; Item #2 'Line-In amp'
: values=1

root@hh:~# amixer cset numid=16 1
numid=16,iface=MIXER,name='Handsfree Right Playback'
; type=ENUMERATED,access=rw------,values=1,items=3
; Item #0 'Off'
; Item #1 'HF DAC'
; Item #2 'Line-In amp'
: values=1

root@hh:~# amixer cset numid=5 29
numid=5,iface=MIXER,name='Handsfree Playback Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=29,step=0
: values=29,29
| dBscale-min=-52.00dB,step=2.00dB,mute=0

root@hh:~# aplay -v /opt/sound/test_play.wav
Playing WAVE '/opt/sound/test_play.wav' : Signed 24 bit Little Endian in 3bytes, Rate 11025 Hz, Mono
Plug PCM: Rate conversion PCM (96000, sformat=S32_LE)
Converter: linear-interpolation
Protocol version: 10002
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S24_3LE
subformat : STD
channels : 1
rate : 11025
exact rate : 11025 (11025/1)
msbits : 24
buffer_size : 3763
period_size : 940
period_time : 85333
tstamp_mode : NONE
period_step : 1
avail_min : 940
period_event : 0
start_threshold : 3763
stop_threshold : 3763
silence_threshold: 0
silence_size : 0
boundary : 123305984
Slave: Hardware PCM card 0 'SDP4430' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : MMAP_INTERLEAVED
format : S32_LE
subformat : STD
channels : 1
rate : 96000
exact rate : 96000 (96000/1)
msbits : 24
buffer_size : 32768
period_size : 8192
period_time : 85333
tstamp_mode : NONE
period_step : 1
avail_min : 8192
period_event : 0
start_threshold : 32768
stop_threshold : 32768
silence_threshold: 0
silence_size : 0
boundary : 1073741824
appl_ptr : 0
hw_ptr : 0

root@hh:~# cat /sys/kernel/debug/gpio
GPIOs 0-31, gpio:
gpio-2 (max8903-FLT ) in hi IRQ
gpio-3 (max8903-DOK ) in hi IRQ
gpio-13 (dsi en1 ) out hi
gpio-14 (dsi en2 ) out hi
gpio-16 (volumeup ) in hi IRQ
gpio-17 (next ) in hi IRQ
gpio-19 (? ) out lo
gpio-20 (main_mic_en ) out hi
gpio-25 (volumedown ) in hi IRQ
gpio-26 (play_pause ) in hi IRQ

GPIOs 32-63, gpio:
gpio-34 (vwl1271 ) out lo
gpio-35 (hsusb1_phy.13 ) out hi
gpio-48 (VDD_ETH ) out lo
gpio-49 (? ) out lo
gpio-62 (audio_vddhf_en ) out hi

GPIOs 64-95, gpio:

GPIOs 96-127, gpio:
gpio-104 (dsi reset ) out hi
gpio-127 (audpwron ) out hi

GPIOs 128-159, gpio:

GPIOs 160-191, gpio:
gpio-160 (? ) out lo
gpio-162 (? ) out lo
gpio-173 (? ) out hi

GPIOs 253-255, platform/twl6040-gpo, twl6040, can sleep:
root@hh:~#

I could hear only pop sounds during start and end of playing audio file. Am I missing anything? Could you please help me to fix it.

Thanks and Regards,

Vijaybabu.M

  • Hi,
    Use the following command for loopback.

    linux-host$ arecord -f CD | aplay

    Speak with mic and you would get your voice from speaker/head set

    Also, please make sure that you have done "unmute"

  • Hi Titus,
    Thanks for your response.
    I have enabled main mic and handsfree and I tried $ arecord -f CD | aplay command but couldn't get my voice from speaker.
    While when I tried with main mic and headset , I could get my voice.
    From external speaker(handsfree), I'm a getting only single pop noise.

    Thanks,
    VijayBabu.M
  • Hi,
    Please refer to the following TI wiki page, chapter "User space" for user space commands to tweak the audio controls.

    processors.wiki.ti.com/.../Linux_Core_Audio_User%27s_Guide
  • Hello Vijaybabu,

    Let's start with the description:
    The routing of the samples to TWL6040 is managed in the AE. There is no routing capability in TWL6040: the PDM-DL interface slots 0/1 are dedicated to earphone and headset drivers, slots 2/3 are dedicated to hands free driver, slot 5 and the control line are dedicated to Vibra/Haptics.

    abe_write_select_pdm_output
    Prototype : u32 abe_write_select_pdm_output (u32 path);
    Parameter :
    Path: 1 for output on handset, 2 for output on handsfree, 3 for output on headset and handsfree at the same time

    The Phoenix codec renders samples at 88.4 KHz and 96 KHz. Handsfree speakers and other paths can only work at 96 KHz, but heaphones has two modes of operation:
    Low power mode (88.4 KHz and 96 KHz). Consumes less power but the audio quality may be affected.
    High performance mode (96 KHz only). Good for applications in which quality of audio is desired.

    Please use menuconfig to enable the audio support options:
    Device Drivers --->
    Sound card support --->
    Advanced Linux Sound Architecture --->
    ALSA for SoC audio support --->
    <*> SoC Audio for the Texas Instruments OMAP chips
    <*> SoC Audio support for OMAP boards using ABE and twl6040 codec

    Could you try:
    amixer sset 'Analog Left' 'Headset Mic'
    amixer sset 'Analog Right' 'Headset Mic'

    Please check following patch:
    lists.infradead.org/.../081654.html

    Best regards,
    Yanko
  • Hi Titus,
    I have tried with commands which mentioned in processors.wiki.ti.com/.../Linux_Core_Audio_User%27s_Guide
    But except Handsfree all seems to be working fine.
  • Hi Yanko,

    Thanks for your reply.

    I'm enabling PLL selection as High performance  mode i.e) Phoenix sampling rate at 96KHz.

    But I'm not sure whether path selection is handling properly with omap-abe-twl6040  driver. I couldn't see abe_write_select_pdm_output function implementation at all. I have attached omap-abe-twl6040, twl6040 codec driver  for your reference.

    Below is my device tree entry to enable audio-routing,

    sound {
    compatible = "ti,abe-twl6040";
    ti,model = "SDP4430";

    ti,jack-detection = <1>;
    ti,mclk-freq = <38400000>;

    ti,mcpdm = <&mcpdm>;
    ti,dmic = <&dmic>;

    ti,twl6040 = <&twl6040>;

    /* Audio routing */
    ti,audio-routing =
    "Headset Stereophone", "HSOL",
    "Headset Stereophone", "HSOR",
    "Earphone Spk", "EP",
    "Ext Spk", "HFL",
    "Ext Spk", "HFR",
    "Line Out", "AUXL",
    "Line Out", "AUXR",
    "Vibrator", "VIBRAL",
    "Vibrator", "VIBRAR",
    "HSMIC", "Headset Mic",
    "Headset Mic", "Headset Mic Bias",
    "MAINMIC", "Main Handset Mic",
    "Main Handset Mic", "Main Mic Bias",
    "SUBMIC", "Sub Handset Mic",
    "Sub Handset Mic", "Main Mic Bias",
    "AFML", "Line In",
    "AFMR", "Line In",
    "DMic", "Digital Mic",
    "Digital Mic", "Digital Mic1 Bias";
    };

    5734.omap-abe-twl6040.c4276.twl6040.c

  • Hello Vijay,

    TI does not have official release of 3.15 Kernel for OMAP4. 

    Please refer to Linux kernel 3.14.31 in DRA7xx_GLSDK_7.00.00.04

    For example: Audio definition for DRA7xx:

    primary_sound: primary_sound {
    compatible = "ti,dra7xx-evm-audio";
    ti,model = "DRA7xx-EVM";
    ti,always-on;
    ti,audio-codec = <&tlv320aic3106>;
    ti,mcasp-controller = <&mcasp3>;
    ti,codec-clock-rate = <11289600>;
    clocks = <&atl_clkin2_ck>;
    clock-names = "mclk";
    ti,audio-routing =
    "Headphone Jack", "HPLOUT",
    "Headphone Jack", "HPROUT",
    "Line Out", "LLOUT",
    "Line Out", "RLOUT",
    "MIC3L", "Mic Jack",
    "MIC3R", "Mic Jack",
    "Mic Jack", "Mic Bias",
    "LINE1L", "Line In",
    "LINE1R", "Line In";
    };

    Best regards,

    Yanko