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.

AM3358: TDM codec interface

Part Number: AM3358

I am trying to interface a voice codec from Silicon labs with AM3358 on my custom board based on beaglebone. I am using Sitara SDK 06.01.00.08 with kernel 4.19. I created a codec and compiled with kernel by following Audio DAC Example.

On SiLabs chip the PCLK needs to be one of the following: 512 kHz, 768 kHz, 1.024 MHz, 1.536 MHz, 1.544 MHz, 2.048 MHz, 4.096 MHz, or 8.192 MHz. How can I generate this from MCASP ACLK?

Can you please recommend what changes I need to make on my current device tree for this codec:

&am33xx_pinmux {
	mcasp0_pins: mcasp0_pins{
		pinctrl-single,pins= <
					AM33XX_IOPAD(0x990, PIN_INPUT_PULLDOWN | MUX_MODE0)	/* mcasp0_aclkx.mcasp0_aclkx */
					AM33XX_IOPAD(0x994, PIN_INPUT_PULLDOWN | MUX_MODE0)	/* mcasp0_fsx.mcasp0_fsx, INPUT */
					AM33XX_IOPAD(0x998, PIN_INPUT_PULLDOWN | MUX_MODE0)	/* mcasp0_axr0.mcasp0_axr0 */
					AM33XX_IOPAD(0x99c, PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mcasp0_ahclkr.mcasp0_axr2 */
		>;
	};
};

&mcasp0 {
			#sound-dai-cells = <0>;
			pinctrl-names = "default";
			pinctrl-0 = <&mcasp0_pins>;
			status = "okay";
			op-mode = <0>;	/* MCASP_IIS_MODE */
			tdm-slots = <2>;
			num-serializer = <4>;
			serial-dir = <	/* 0: INACTIVE, 1: TX, 2: RX */
					2 0 1 0
				>;
			tx-num-evt = <8>;
			rx-num-evt = <8>;
};

/{

si32178: si32178 {
				#sound-dai-cells = <0>;
				compatible = "silabs,si32178";
				status = "okay";
};

sound0: sound@0 {
				compatible = "simple-audio-card";
				simple-audio-card,name = "SI32178";
				simple-audio-card,widgets =
					"Speaker", "Speaker External",
					"Line", "Line In";
				simple-audio-card,routing =
					"Speaker External",       "LINE_OUT",
					"LINE1L",               "Line In",
					"LINE1R",               "Line In";
				simple-audio-card,format = "i2s";
				simple-audio-card,bitclock-master = <&sound_master>;
				simple-audio-card,frame-master = <&sound_master>;
				simple-audio-card,bitclock-inversion;

				simple-audio-card,cpu {
					sound-dai = <&mcasp0>;
				};

				sound_master: simple-audio-card,codec {
					#sound-dai-cells = <0>;
					sound-dai = <&si32178>;
					clocks = <&clk_mcasp0_fixed>;
					clock-names = "mclk";
				};
};

};

Thank you

  • Hi Samer,

    Samer Abbas said:
    On SiLabs chip the PCLK needs to be one of the following: 512 kHz, 768 kHz, 1.024 MHz, 1.536 MHz, 1.544 MHz, 2.048 MHz, 4.096 MHz, or 8.192 MHz. How can I generate this from MCASP ACLK?

    I am not familiar with si32178 chip. Could you please clarify if PCLK is bit clock (BCK) or master clock (MCLK)? You can refer to below user guide for details regarding audio codec bit clock and master clock:

    https://www.ti.com/lit/an/sprack0/sprack0.pdf

    Samer Abbas said:
    How can I generate this from MCASP ACLK?

    If you will use PCLK as a bit clock, and if you are planning to provide this clock from AM335x mcasp0_aclkx pin, the sound_master should be mcasp0, not codec. mcasp0_aclkx pin support up to 50MHz, and we have no min value, only max 50MHz. Refer to below user guide for DTS setup hints:

    https://www.ti.com/lit/an/sprac97/sprac97.pdf

    http://www.ti.com/lit/an/sprac09a/sprac09a.pdf

    Regards,
    Pavel

  • Pavel Botev said:

    Could you please clarify if PCLK is bit clock (BCK) or master clock (MCLK)? 

    Datasheet for Si32178 does not mention if PCLK is a bit clock or master clock. Basically Si32178 needs the external PCLK to generate internal clocks that are essential for proper functionality and synchronization of audio transmission as well.

    On Si32178, I have following 4 pins for PCM: PCLK, DRX, DTX, FSYNC. 

    PCLK needs to be in the range mentioned in my initial post. FSYNC needs to be 8kHz. 

    Here is a snapshot from Si32178 datasheet for PCM:

    Pavel Botev said:

    If you will use PCLK as a bit clock, and if you are planning to provide this clock from AM335x mcasp0_aclkx pin, the sound_master should be mcasp0, not codec. mcasp0_aclkx pin support up to 50MHz, and we have no min value, only max 50MHz. Refer to below user guide for DTS setup hints:

    https://www.ti.com/lit/an/sprac97/sprac97.pdf

    http://www.ti.com/lit/an/sprac09a/sprac09a.pdf

    I am not sure if I should connect AHCLK or ACLK.

    Also in both the documents you shared, I do not see a way to setup Fsync or AHCLK/ACLK clock values in DTS. How do I set 8KHz for FSYNC and 512KHz for AHCLK/ACLK (PCLK)?

    Thank you,

    Samer

  • Samer,

    Samer Abbas said:
    Basically Si32178 needs the external PCLK to generate internal clocks that are essential for proper functionality and synchronization of audio transmission as well.

    From this description and from Figure-14 that you shared, seems to me PCLK is bit clock.

    Samer Abbas said:
    I am not sure if I should connect AHCLK or ACLK.

    You need to connect mcasp0_aclkx pin (not ahclkx).

    Samer Abbas said:
    Also in both the documents you shared, I do not see a way to setup Fsync or AHCLK/ACLK clock values in DTS. How do I set 8KHz for FSYNC and 512KHz for AHCLK/ACLK (PCLK)?

    The FSYNC (frame rate, sample rate) value is passed as an argument to arecord/aplay user space tool or passed to record/playback user space application. Then PCLK is calculated based on FSYNC and other parameters.

    Regarding DTS file update, I would suggest you to explore and align to below DTS files, where McASP module is used as master, which means McASP module creates bit clock (aclkx) and frame sync (fsx).

    linux-kernel/arch/arm/boot/dts/am335x-boneblack-common.dtsi

    linux-kernel/arch/arm/boot/dts/am437x-gp-evm-hdmi.dts

    linux-kernel/arch/arm/boot/dts/am57xx-cl-som-am57x.dts

    linux-kernel/arch/arm/boot/dts/dra7-evm-common.dtsi

    You can also refer to below user guide:

    http://www.ti.com/lit/an/sprac09a/sprac09a.pdf

    Regarding bit clock calculations, refer to below user guides:

    https://www.ti.com/lit/an/sprac97/sprac97.pdf

    The bit clock frequency can be calculated by the following equation:
    –  For example, 2 channels 32-bit audio sampled at 16 KHz:
    1. BCLK = nChannels * nBitsPerChannel * samplerate
    2. BCLK = 2 * 32 * 16000= 10240000 or 1024 MHz

     

    http://www.ti.com/lit/an/sprack0/sprack0.pdf

    5.2 How Do I Generate a 48 kHz Frame Sync With McASP?

     

    Regards,
    Pavel

  • Pavel,

    Thanks for the response. I have made the change in my DTS where MCASP module is the master clock.

    Pavel Botev said:

    You can also refer to below user guide:

    http://www.ti.com/lit/an/sprac09a/sprac09a.pdf

    Regarding bit clock calculations, refer to below user guides:

    https://www.ti.com/lit/an/sprac97/sprac97.pdf

    The bit clock frequency can be calculated by the following equation:
    –  For example, 2 channels 32-bit audio sampled at 16 KHz:
    1. BCLK = nChannels * nBitsPerChannel * samplerate
    2. BCLK = 2 * 32 * 16000= 10240000 or 1024 MHz

     

    http://www.ti.com/lit/an/sprack0/sprack0.pdf

    5.2 How Do I Generate a 48 kHz Frame Sync With McASP?

    As I know I need FSYNC = 8KHz, and I also know the range of BCLK. So by following MCASP design guide, I need to provide an external clock AHCLKx = 1.024 MHz or 2.048 MHz or 4.096 MHz , and I have to use McASP’s integer dividers to generate the bit clock and frame sync. Is my understanding correct?

    Furthermore, there are two different formulas for calculating BCLK.

    The one you pointed is:

    BCLK = nChannels * nBitsPerChannel * sample rate

    But there is also one in MCASP Design guide on page 14:

    2 slots * 32 bits per slot * 48 kHz = 3.072 MHz bit clock

    So which equation do I use?

    Pavel Botev said:

    http://www.ti.com/lit/an/sprac09a/sprac09a.pdf

    In this guide, on page 10 it shows how to use MCASP's interger divider to generate bit clock. My question is, where do I put all this code? Do I add it in the codec file or do I add it in davinci-evm.c?

  • Samer Abbas said:

    Furthermore, there are two different formulas for calculating BCLK.

    The one you pointed is:

    BCLK = nChannels * nBitsPerChannel * sample rate

    But there is also one in MCASP Design guide on page 14:

    2 slots * 32 bits per slot * 48 kHz = 3.072 MHz bit clock

    So which equation do I use?

    Both are the same. For your usecase, depending on the sample size (16bit or 32bit) you will have for bit clock:

    BCLK = 2 * 16 * 8 = 256KHz (stereo two chanels mode, 16bits per sample, 8KHz sample rate)

    BCLK = 2 * 32 * 8 = 512KHz (stereo two chanels mode, 32bits per sample, 8KHz sample rate)



    Samer Abbas said:
    As I know I need FSYNC = 8KHz, and I also know the range of BCLK. So by following MCASP design guide, I need to provide an external clock AHCLKx = 1.024 MHz or 2.048 MHz or 4.096 MHz , and I have to use McASP’s integer dividers to generate the bit clock and frame sync. Is my understanding correct?

    You have 3 options:

    1. Check if using AUXCLK (McASP functional clock) sourced by OSC0 will be able to produce the desired McASP bit clock and frame sync values

    2. Of 1 is not possible, then yes, you need to provide external clock signal at McASP ahclkx pin, and produce bit clock and frame sync values based on that external clock

    Check also below e2e threads and user guide:

    http://www.ti.com/lit/an/sprac09a/sprac09a.pdf

    https://e2e.ti.com/support/processors/f/791/t/737714

    https://e2e.ti.com/support/processors/f/791/t/744326

    https://e2e.ti.com/support/processors/f/791/t/666069

    Samer Abbas said:
    In this guide, on page 10 it shows how to use MCASP's interger divider to generate bit clock. My question is, where do I put all this code? Do I add it in the codec file or do I add it in davinci-evm.c?

    You need to update only your DTS file, to adjust it for your HW specifics. Then sample rate value is passed in user space, check below user guide:

    http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Foundational_Components_Kernel_Drivers.html#audio

    Then bit clock is calculated and produced by the McASP driver:

    linux-kernel/sound/soc/ti/davinci-mcasp.c

    Regards,
    Pavel

  • Pavel,

    I appreciate the clarification on the equation. I will have to go with option two to produce the bit clock and fsync. 

    Pavel Botev said:

    You need to update only your DTS file, to adjust it for your HW specifics. Then sample rate value is passed in user space, check below user guide:

    http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Foundational_Components_Kernel_Drivers.html#audio

    Then bit clock is calculated and produced by the McASP driver:

    linux-kernel/sound/soc/ti/davinci-mcasp.c

    Since sample value is passed in user space and then bit clock is generated, so would I be able to detect the codec on boot up?

    How can I verify at boot up that codec is seen as a sound card?

    Thank you,

    Samer

  • Samer,

    Samer Abbas said:

    Since sample value is passed in user space and then bit clock is generated, so would I be able to detect the codec on boot up?

    How can I verify at boot up that codec is seen as a sound card?

    Yes, you will see some boot messages related to McASP and codec, but most of the work is done after kernel boot up. You can explore AM335x StarterKit boot log, we have some audio related messages, but these comes after rootfs starts, as codec driver (snd_soc_tlv320aic3x) is built as external kernel module.

    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 4.19.59-g5f8c1c6121 (oe-user@oe-host) (gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36))) #1 PREEMPT Sat Oct 19 17:17:25 UTC 2019
    [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] OF: fdt: Machine model: TI AM335x EVM-SK
    [    0.000000] Memory policy: Data cache writeback
    [    0.000000] efi: Getting EFI parameters from FDT:
    [    0.000000] efi: UEFI not found.
    [    0.000000] cma: Reserved 48 MiB at 0x8a800000
    [    0.000000] CPU: All CPU(s) started in SVC mode.
    [    0.000000] AM335X ES2.1 (sgx neon)
    [    0.000000] random: get_random_bytes called from start_kernel+0xa4/0x434 with crng_init=0
    [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64960
    [    0.000000] Kernel command line: console=ttyO0,115200n8 root=PARTUUID=8150b2b3-02 rw rootfstype=ext4 rootwait
    [    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
    [    0.000000] Memory: 196296K/262144K available (9216K kernel code, 309K rwdata, 2692K rodata, 1024K init, 253K bss, 16696K reserved, 49152K cma-reserved, 0K highmem)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    [    0.000000]     vmalloc : 0xd0800000 - 0xff800000   ( 752 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
    [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    [    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (10208 kB)
    [    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
    [    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 310 kB)
    [    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 254 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] rcu: Preemptible hierarchical RCU implementation.
    [    0.000000] 	Tasks RCU enabled.
    [    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
    [    0.000000] IRQ: Found an INTC at 0x(ptrval) (revision 5.0) with 128 interrupts
    [    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
    [    0.000015] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    [    0.000033] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [    0.000043] OMAP clocksource: timer1 at 24000000 Hz
    [    0.000206] timer_probe: no matching timers found
    [    0.000392] Console: colour dummy device 80x30
    [    0.000420] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [    0.000426] This ensures that you still see kernel messages. Please
    [    0.000431] update your kernel commandline.
    [    0.000486] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
    [    0.089174] pid_max: default: 32768 minimum: 301
    [    0.089361] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.089375] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.090177] CPU: Testing write buffer coherency: ok
    [    0.090245] CPU0: Spectre v2: using BPIALL workaround
    [    0.091115] Setting up static identity map for 0x80100000 - 0x80100060
    [    0.091255] rcu: Hierarchical SRCU implementation.
    [    0.091575] EFI services will not be available.
    [    0.092844] devtmpfs: initialized
    [    0.100483] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    0.100872] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.100898] futex hash table entries: 256 (order: -1, 3072 bytes)
    [    0.104536] pinctrl core: initialized pinctrl subsystem
    [    0.105317] DMI not present or invalid.
    [    0.105740] NET: Registered protocol family 16
    [    0.108012] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.126404] l4_wkup_cm:clk:0010:0: failed to disable
    [    0.178964] cpuidle: using governor ladder
    [    0.179001] cpuidle: using governor menu
    [    0.183793] OMAP GPIO hardware version 0.1
    [    0.193363] No ATAGs?
    [    0.193380] hw-breakpoint: debug architecture 0x4 unsupported.
    [    0.206408] edma 49000000.edma: TI EDMA DMA engine driver
    [    0.207962] v1_8d: supplied by vbat
    [    0.208241] v3_3d: supplied by vbat
    [    0.210906] SCSI subsystem initialized
    [    0.211377] media: Linux media interface: v0.10
    [    0.211429] videodev: Linux video capture interface: v2.00
    [    0.211518] pps_core: LinuxPPS API ver. 1 registered
    [    0.211526] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.211548] PTP clock support registered
    [    0.211583] EDAC MC: Ver: 3.0.0
    [    0.212665] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [    0.213319] Advanced Linux Sound Architecture Driver Initialized.
    [    0.214532] clocksource: Switched to clocksource timer1
    [    0.222430] NET: Registered protocol family 2
    [    0.223251] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
    [    0.223279] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.223304] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.223328] TCP: Hash tables configured (established 2048 bind 2048)
    [    0.223436] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.223456] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.223601] NET: Registered protocol family 1
    [    0.224197] RPC: Registered named UNIX socket transport module.
    [    0.224207] RPC: Registered udp transport module.
    [    0.224213] RPC: Registered tcp transport module.
    [    0.224219] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.225282] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [    0.226568] Initialise system trusted keyrings
    [    0.226953] workingset: timestamp_bits=14 max_order=16 bucket_order=2
    [    0.231201] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.231962] NFS: Registering the id_resolver key type
    [    0.232007] Key type id_resolver registered
    [    0.232014] Key type id_legacy registered
    [    0.232056] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.234235] Key type asymmetric registered
    [    0.234252] Asymmetric key parser 'x509' registered
    [    0.234334] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
    [    0.234347] io scheduler noop registered
    [    0.234354] io scheduler deadline registered
    [    0.234719] io scheduler cfq registered (default)
    [    0.234733] io scheduler mq-deadline registered
    [    0.234740] io scheduler kyber registered
    [    0.236545] pinctrl-single 44e10800.pinmux: 142 pins, size 568
    [    0.239929] pwm-backlight backlight: backlight supply power not found, using dummy regulator
    [    0.240030] pwm-backlight backlight: Linked as a consumer to regulator.0
    [    0.284745] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled
    [    0.288502] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 30, base_baud = 3000000) is a 8250
    [    0.927945] console [ttyS0] enabled
    [    0.933759] omap_rng 48310000.rng: Random Number Generator ver. 20
    [    0.940158] random: fast init done
    [    0.943791] random: crng init done
    [    0.948691] tilcdc-panel panel: found backlight
    [    0.953568] OF: graph: no port node found in /ocp/lcdc@4830e000
    [    0.960483] OF: graph: no port node found in /ocp/lcdc@4830e000
    [    0.966983] OF: graph: no port node found in /ocp/lcdc@4830e000
    [    0.972954] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [    0.979638] [drm] No driver support for vblank timestamp query.
    [    1.030543] Console: switching to colour frame buffer device 60x34
    [    1.054389] tilcdc 4830e000.lcdc: fb0: DRM emulated frame buffer device
    [    1.061652] [drm] Initialized tilcdc 1.0.0 20121205 for 4830e000.lcdc on minor 0
    [    1.081194] brd: module loaded
    [    1.091285] loop: module loaded
    [    1.097183] libphy: Fixed MDIO Bus: probed
    [    1.174585] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
    [    1.182288] davinci_mdio 4a101000.mdio: detected phy mask fffffffc
    [    1.190403] libphy: 4a101000.mdio: probed
    [    1.194449] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver Atheros 8031 ethernet
    [    1.203861] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driver Atheros 8031 ethernet
    [    1.214117] cpsw 4a100000.ethernet: Detected MACID = c8:a0:30:a1:ce:56
    [    1.220960] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
    [    1.227427] cpsw 4a100000.ethernet: ALE Table size 1024
    [    1.232720] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
    [    1.240752] cpsw 4a100000.ethernet: cpsw: Detected MACID = c8:a0:30:a1:ce:58
    [    1.249244] i2c /dev entries driver
    [    1.254815] cpuidle: enable-method property 'ti,am3352' found operations
    [    1.262037] sdhci: Secure Digital Host Controller Interface driver
    [    1.268297] sdhci: Copyright(c) Pierre Ossman
    [    1.273373] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
    [    1.282181] omap_hsmmc 48060000.mmc: Got CD GPIO
    [    1.288462] sdhci-pltfm: SDHCI platform and OF driver helper
    [    1.295966] ledtrig-cpu: registered to indicate activity on CPUs
    [    1.307285] NET: Registered protocol family 10
    [    1.313224] Segment Routing with IPv6
    [    1.317138] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    1.323784] NET: Registered protocol family 17
    [    1.328687] Key type dns_resolver registered
    [    1.333227] omap_voltage_late_init: Voltage driver support not added
    [    1.340573] Loading compiled-in X.509 certificates
    [    1.384758] tps65910 0-002d: No interrupt support, no core IRQ
    [    1.392599] vrtc: supplied by vbat
    [    1.399687] vio: supplied by vbat
    [    1.404446] vdd1: supplied by vbat
    [    1.409671] vdd2: supplied by vbat
    [    1.416221] vdig1: supplied by vbat
    [    1.421024] vdig2: supplied by vbat
    [    1.425834] vpll: supplied by vbat
    [    1.430513] vdac: supplied by vbat
    [    1.435208] vaux1: supplied by vbat
    [    1.439988] vaux2: supplied by vbat
    [    1.444779] vaux33: supplied by vbat
    [    1.449667] vmmc: supplied by vbat
    [    1.454353] vbb: supplied by vbat
    [    1.459353] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [    1.465357] cpu cpu0: Linked as a consumer to regulator.9
    [    1.470854] cpu cpu0: Dropping the link to regulator.9
    [    1.476340] cpu cpu0: Linked as a consumer to regulator.9
    [    1.483301] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
    [    1.492222] omap_hsmmc 48060000.mmc: Got CD GPIO
    [    1.497497] omap_hsmmc 48060000.mmc: Linked as a consumer to regulator.19
    [    1.533534] omap_hsmmc 481d8000.mmc: Linked as a consumer to regulator.6
    [    1.571885] mmc0: host does not support reading read-only switch, assuming write-enable
    [    1.581928] mmc0: new high speed SDHC card at address 0007
    [    1.588816] mmcblk0: mmc0:0007 SD8GB 7.42 GiB 
    [    1.595955]  mmcblk0: p1 p2
    [    1.653579] input: gpio_buttons0 as /devices/platform/gpio_buttons0/input/input0
    [    1.662356] hctosys: unable to open rtc device (rtc0)
    [    1.668953] lis3_reg: disabling
    [    1.672210] v1_8d: disabling
    [    1.675218] v3_3d: disabling
    [    1.678425] ALSA device list:
    [    1.681443] omap_hsmmc 481d8000.mmc: card claims to support voltages below defined range
    [    1.689654]   No soundcards found.
    [    1.707337] mmc1: new SDIO card at address 0001
    [    2.214740] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [    2.223078] VFS: Mounted root (ext4 filesystem) on device 179:2.
    [    2.243200] devtmpfs: mounted
    [    2.248950] Freeing unused kernel memory: 1024K
    [    2.254258] Run /sbin/init as init process
    [    2.860736] systemd[1]: System time before build time, advancing clock.
    [    2.924209] systemd[1]: systemd 239 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN2 -IDN -PCRE2 default-hierarchy=hybrid)
    [    2.946610] systemd[1]: Detected architecture arm.
    
    Welcome to Arago 2019.07!
    
    [    2.996520] systemd[1]: Set hostname to <am335x-evm>.
    [    3.022783] systemd[1]: Initializing machine ID from random generator.
    [    3.590156] systemd[1]: File /lib/systemd/system/systemd-journald.service:36 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling.
    [    3.607585] systemd[1]: Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.)
    [    3.701669] systemd[1]: /lib/systemd/system/gadget-init.service:15: Unknown lvalue 'ExecStopPre' in section 'Service'
    [    4.105647] systemd[1]: Listening on Network Service Netlink Socket.
    [  OK  ] Listening on Network Service Netlink Socket.
    [    4.156469] systemd[1]: Created slice system-getty.slice.
    [  OK  ] Created slice system-getty.slice.
    [    4.269075] systemd[1]: Listening on udev Kernel Socket.
    [  OK  ] Listening on udev Kernel Socket.
    [  OK  ] Created slice system-serial\x2dgetty.slice.
    [  OK  ] Reached target Swap.
    [  OK  ] Listening on Journal Socket (/dev/log).
    [  OK  ] Listening on udev Control Socket.
    [  OK  ] Started Dispatch Password Requests to Console Directory Watch.
    [  OK  ] Reached target Remote File Systems.
    [  OK  ] Listening on initctl Compatibility Named Pipe.
    [  OK  ] Started Forward Password Requests to Wall Directory Watch.
    [  OK  ] Reached target Paths.
    [  OK  ] Listening on Process Core Dump Socket.
    [  OK  ] Created slice User and Session Slice.
    [  OK  ] Reached target Slices.
    [  OK  ] Listening on Journal Socket.
             Mounting Kernel Debug File System...
             Mounting Temporary Directory (/tmp)...
             Starting Create list of required st…ce nodes for the current kernel...
             Starting Remount Root and Kernel File Systems...
             Starting Load Kernel Modules...
    [    4.955257] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
             Starting Journal Service...
             Starting udev Coldplug all Devices...
    [    5.035163] cryptodev: loading out-of-tree module taints kernel.
             Mounting POSIX Message Queue File System...
    [    5.099101] cryptodev: driver 1.9 loaded.
    [  OK  ] Started Hardware RNG Entropy Gatherer Daemon.
    [  OK  ] Mounted Kernel Debug File System.
    [    5.209273] usbcore: registered new interface driver usbfs
    [  OK  ] Mounted Temporary Directory (/tmp).
    [  OK  ] Started Create list of required sta…vice nodes for the current kernel.
    [    5.245742] usbcore: registered new interface driver hub
    [    5.255317] usbcore: registered new device driver usb
    [  OK  ] Started Remount Root and Kernel File Systems.
    [  OK  ] Mounted POSIX Message Queue File System.
    [    5.311390] usbcore: registered new interface driver ftdi_sio
             Starting Create System Users...
    [    5.351356] usbserial: USB Serial support registered for FTDI USB Serial Device
             Starting Rebuild Hardware Database...
    [  OK  ] Started Load Kernel Modules.
             Mounting Kernel Configuration File System...
             Starting Apply Kernel Variables...
    [  OK  ] Mounted Kernel Configuration File System.
    [  OK  ] Started Create System Users.
    [  OK  ] Started Journal Service.
    [  OK  ] Started Apply Kernel Variables.
             Starting Flush Journal to Persistent Storage...
             Starting Create Static Device Nodes in /dev...
    [    6.085221] systemd-journald[79]: Received request to flush runtime journal from PID 1
    [  OK  ] Started Create Static Device Nodes in /dev.
    [  OK  ] Reached target Local File Systems (Pre).
             Mounting /media/ram...
    [  OK  ] Reached target Containers.
             Mounting /var/volatile...
    [  OK  ] Started Flush Journal to Persistent Storage.
    [  OK  ] Mounted /media/ram.
    [  OK  ] Mounted /var/volatile.
             Starting Load/Save Random Seed...
    [  OK  ] Reached target Local File Systems.
             Starting Rebuild Journal Catalog...
             Starting Rebuild Dynamic Linker Cache...
             Starting Create Volatile Files and Directories...
    [  OK  ] Started Load/Save Random Seed.
    [  OK  ] Started Rebuild Journal Catalog.
    [  OK  ] Started Create Volatile Files and Directories.
             Starting Update UTMP about System Boot/Shutdown...
             Starting Run pending postinsts...
             Starting Network Time Synchronization...
    [  OK  ] Started Update UTMP about System Boot/Shutdown.
    [  OK  ] Started Network Time Synchronization.
    [  OK  ] Reached target System Time Synchronized.
    [  OK  ] Started udev Coldplug all Devices.
    [  OK  ] Started Rebuild Hardware Database.
             Starting udev Kernel Device Manager...
    [  OK  ] Started udev Kernel Device Manager.
             Starting Network Service...
    [  OK  ] Started Network Service.
             Starting Wait for Network to be Configured...
             Starting Network Name Resolution...
    [  OK  ] Started Network Name Resolution.
    [  OK  ] Reached target Host and Network Name Lookups.
    [  OK  ] Reached target Network.
    [   17.285110] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [  OK  ] Created slice system-systemd\x2dbacklight.slice.
    [   17.331681] omap_rtc 44e3e000.rtc: registered as rtc0
             Starting Load/Save Screen Backlight…ightness of backlight:backlight...
    [   17.700922] tlv320aic3x-codec 0-001b: Linked as a consumer to regulator.5
    [   17.873571] tlv320aic3x-codec 0-001b: Linked as a consumer to regulator.4
    [  OK  ] Found device /dev/ttyS0.
    [  OK  ] Started Load/Save Screen Backlight Brightness of backlight:backlight.
    [   18.828226] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
    [   18.882505] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
    [   18.981970] omap-aes 53500000.aes: will run requests pump with realtime priority
    [   19.068272] [drm] Initialized pvr 1.17.4948957 20110701 for 56000000.sgx on minor 1
    [   19.078021] remoteproc remoteproc0: wkup_m3 is available
    [  OK  ] Started Rebuild Dynamic Linker Cache.
    [   19.525666] remoteproc remoteproc0: powering up wkup_m3
    [   19.556219] PM: Cannot get wkup_m3_ipc handle
             Starting Update is Completed...
    [   19.640730] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 242896
    [   19.759975] remoteproc remoteproc0: remote processor wkup_m3 is now up
    [   19.760007] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x192
    [   19.960407] asoc-simple-card sound: tlv320aic3x-hifi <-> 4803c000.mcasp mapping ok
    [   20.073689] asoc-simple-card sound: ASoC: no DMI vendor name!
    [   20.173841] PM: bootloader does not support rtc-only!
    [  OK  ] Started Update is Completed.
    [   20.875343] net eth0: initializing cpsw version 1.12 (0)
    [   21.086408] Atheros 8031 ethernet 4a101000.mdio:00: attached PHY driver [Atheros 8031 ethernet] (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
    [   21.318765] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [  OK  ] Found device /dev/ttyS3.
    [   21.771554] net eth1: initializing cpsw version 1.12 (0)
    [   22.006385] Atheros 8031 ethernet 4a101000.mdio:01: attached PHY driver [Atheros 8031 ethernet] (mii_bus:phy_addr=4a101000.mdio:01, irq=POLL)
    [   22.171262] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
    [   26.314038] TI-am335x-tsc TI-am335x-tsc.0.auto: ti,charge-delay not specified
    [   26.433649] input: ti-tsc as /devices/platform/ocp/44e0d000.tscadc/TI-am335x-tsc.0.auto/input/input1
    [   26.486463] am335x-phy-driver 47401300.usb-phy: 47401300.usb-phy supply vcc not found, using dummy regulator
    [***   ] (1 of 4) A start job is running for dev-ttyGS0.device (22s / 1min 30s)[   26.630846] am335x-phy-driver 47401300.usb-phy: Linked as a consumer to regulator.0
    [   26.691821] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
    [   26.703316] am335x-phy-driver 47401b00.usb-phy: 47401b00.usb-phy supply vcc not found, using dummy regulator
    [   26.803901] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
    [   26.887291] am335x-phy-driver 47401b00.usb-phy: Linked as a consumer to regulator.0
    [   26.910014] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
    [   26.974780] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [   27.058242] usb usb1: Product: MUSB HDRC host driver
    [   27.063255] usb usb1: Manufacturer: Linux 4.19.59-g5f8c1c6121 musb-hcd
    [   27.190919] usb usb1: SerialNumber: musb-hdrc.0
    [   27.241684] hub 1-0:1.0: USB hub found
    [   27.275623] hub 1-0:1.0: 1 port detected
    [   27.328689] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
    [   27.422853] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2
    [ ***  ] (2 of 4) A start job is running for…-mmcblk0p1.device (23s / 1min 30s)[   27.554938] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
    [   27.563262] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [   27.653170] remoteproc remoteproc1: 4a334000.pru is available
    [   27.755012] pru-rproc 4a334000.pru: PRU rproc node pru@4a334000 probed successfully
    [   27.767880] usb usb2: Product: MUSB HDRC host driver
    [   27.772888] usb usb2: Manufacturer: Linux 4.19.59-g5f8c1c6121 musb-hcd
    [   27.805940] remoteproc remoteproc2: 4a338000.pru is available
    [   27.811846] pru-rproc 4a338000.pru: PRU rproc node pru@4a338000 probed successfully
    [   27.845213] usb usb2: SerialNumber: musb-hdrc.1
    [   27.884926] hub 2-0:1.0: USB hub found
    [   27.910440] hub 2-0:1.0: 1 port detected
    [  OK  ] Started Run pending postinsts.
    [  OK  ] Found device /dev/mmcblk0p1.
             Starting Run pending postinsts...
    [  OK  ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
    [  OK  ] Created slice system-systemd\x2dfsck.slice.
             Starting File System Check on /dev/mmcblk0p1...
    [  OK  ] Started File System Check on /dev/mmcblk0p1.
             Mounting /run/media/mmcblk0p1...
    [  OK  ] Mounted /run/media/mmcblk0p1.
    [  OK  ] Started Run pending postinsts.
    [  OK  ] Reached target System Initialization.
    [  OK  ] Listening on dropbear.socket.
    [  OK  ] Listening on D-Bus System Message Bus Socket.
             Starting Reboot and dump vmcore via kexec...
    [  OK  ] Listening on RPCbind Server Activation Socket.
    [  OK  ] Started Daily Cleanup of Temporary Directories.
    [  OK  ] Started Daily rotation of log files.
    [  OK  ] Reached target Timers.
    [  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
    [  OK  ] Reached target Sockets.
    [  OK  ] Reached target Basic System.
             Starting Save/Restore Sound Card State...
    [  OK  ] Started Periodic Command Scheduler.
             Starting Start USB gadget...
    [  OK  ] Started D-Bus System Message Bus.
             Starting Login Service...
             Starting Enable and configure wl18xx bluetooth stack...
    [   50.258943] using random self ethernet address
    [   50.263436] using random host ethernet address
    [  OK  ] Started Redis In-Memory Data Store.
    [   50.300600] using host ethernet address: C8:A0:30:A1:CE:58
    [   50.300673] using random self ethernet address
             Starting Lightning Fast Webserver With Light System Requirements...
    [   50.386030] using random host ethernet address
    [   50.386056] using host ethernet address: C8:A0:30:A1:CE:58
    [   50.407967] usb0: HOST MAC c8:a0:30:a1:ce:58
    [   50.409249] usb0: MAC 46:f3:41:0a:22:fc
             Starting uim-sysfs.service...
    [   50.583097] Mass Storage Function, version: 2009/09/11
             Starting Print notice about GPLv3 packages...
    [   50.630300] LUN: removable file: (no medium)
    [   50.708462] LUN: removable read only file: /dev/mmcblk0p1
    [   50.713909] Number of LUNs=1
             Starting Simple Network Management Protocol (SNMP) Daemon....
    [   50.831820] g_multi gadget: Multifunction Composite Gadget
             Starting Avahi mDNS/DNS-SD Stack...
    [   50.886167] g_multi gadget: g_multi ready
             Starting RPC Bind Service...
             Starting Permit User Sessions...
    [  OK  ] Started Job spooling tools.
    [   51.237709] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready
    [  OK  ] Started Reboot and dump vmcore via kexec.
    [  OK  ] Started Save/Restore Sound Card State.
    [  OK  ] Started Lightning Fast Webserver With Light System Requirements.
    [  OK  ] Started RPC Bind Servic[   51.432115] g_multi gadget: high-speed config #2: Multifunction with CDC ECM
    e.
    [   51.440369] IPv6: ADDRCONF(NETDEV_CHANGE): usb0: link becomes ready
    [  OK  ] Started Permit User Sessions.
    [  OK  ] Found device /dev/ttyGS0.
    [  OK  ] Started Serial Getty on ttyS0.
    [  OK  ] Started Serial Getty on ttyS3.
    [  OK  ] Started Getty on tty1.
    [  OK  ] Started NFS status monitor for NFSv2/3 locking..
    [  OK  ] Reached target Sound Card.
    [  OK  ] Started uim-sysfs.service.
             Starting rc.pvr.service...
    [  OK  ] Started Login Service.
    [  OK  ] Started Avahi mDNS/DNS-SD Stack.
    [  OK  ] Started Enable and configure wl18xx bluetooth stack.
    [  OK  ] Started Start USB gadget.
    [  OK  ] Started Serial Getty on ttyGS0.
    [  OK  ] Reached target Login Prompts.
    [   53.530164] PVR_K: UM DDK-(4948957) and KM DDK-(4948957) match. [ OK ]
             Starting Synchronize System and HW clocks...
    [  OK  ] Started rc.pvr.service.
             Starting weston.service...
    [  OK  ] Started Synchronize System and HW clocks.
    [  OK  ] Started Simple Network Management Protocol (SNMP) Daemon..
    
     _____                    ___[   57.886113] hrtimer: interrupt took 218750 ns
    __           _         _   
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_ 
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
                  |___|                    |___|            
    
    Arago Project http://arago-project.org am335x-evm ttyS0
    
    Arago 2019.07 am335x-evm ttyS0
    
    am335x-evm login: ***************************************************************
    ***************************************************************
    NOTICE: This file system contains the following GPLv3 packages:
    	autoconf
    	bash-dev
    	bash
    	bc
    	binutils
    	cifs-utils
    	cpio
    	cpp-symlinks
    	cpp
    	dosfstools
    	elfutils
    	findutils
    	g++-symlinks
    	g++
    	gawk
    	gcc-symlinks
    	gcc
    	gdb
    	gdbserver
    	gettext
    	glmark2
    	gstreamer1.0-libav
    	gzip
    	hidapi
    	libbfd
    	libdw1
    	libelf1
    	libgdbm-compat4
    	libgdbm-dev
    	libgdbm6
    	libgettextlib
    	libgettextsrc
    	libgmp10
    	libidn2-0
    	libmavconn
    	libmpc3
    	libmpfr6
    	libreadline-dev
    	libreadline7
    	libunistring2
    	m4-dev
    	m4
    	make
    	mavlink
    	mavros-extras
    	mavros-msgs
    	mavros
    	nettle
    	pdm-anomaly-detection
    	socketcan-interface
    	which
    
    If you do not wish to distribute GPLv3 components please remove
    the above packages prior to distribution.  This can be done using
    the opkg remove command.  i.e.:
        opkg remove <package>
    Where <package> is the name printed in the list above
    
    NOTE: If the package is a dependency of another package you
          will be notified of the dependent packages.  You should
          use the --force-removal-of-dependent-packages option to
          also remove the dependent packages as well
    ***************************************************************
    ***************************************************************
    
     _____                    _____           _         _   
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_ 
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
                  |___|                    |___|            
    
    Arago Project http://arago-project.org am335x-evm ttyS0
    
    Arago 2019.07 am335x-evm ttyS0
    
    am335x-evm login: root
    root@am335x-evm:~# [  137.150523] NET: Registered protocol family 15
    
    root@am335x-evm:~# [  149.400056] Initializing XFRM netlink socket
    
    root@am335x-evm:~# lsmdod
    -sh: lsmdod: command not found
    root@am335x-evm:~# lsmod
    Module                  Size  Used by
    xfrm_user              32768  2
    xfrm4_tunnel           16384  0
    ipcomp                 16384  0
    xfrm_ipcomp            16384  1 ipcomp
    esp4                   20480  0
    ah4                    16384  0
    af_key                 36864  0
    xfrm_algo              16384  5 xfrm_user,esp4,ah4,af_key,xfrm_ipcomp
    usb_f_acm              16384  1
    u_serial               20480  3 usb_f_acm
    usb_f_ecm              16384  1
    g_multi                16384  0
    usb_f_mass_storage     45056  2 g_multi
    usb_f_rndis            28672  2 g_multi
    u_ether                20480  3 usb_f_ecm,g_multi,usb_f_rndis
    libcomposite           53248  5 usb_f_ecm,usb_f_acm,usb_f_mass_storage,g_multi,usb_f_rndis
    pru_rproc              20480  0
    irq_pruss_intc         16384  1 pru_rproc
    pruss                  16384  1 pru_rproc
    musb_dsps              20480  0
    phy_am335x             16384  2
    phy_generic            16384  1 phy_am335x
    musb_hdrc             106496  1 musb_dsps
    udc_core               28672  8 usb_f_ecm,usb_f_acm,usb_f_mass_storage,u_serial,musb_hdrc,u_ether,usb_f_rndis,libcomposite
    phy_am335x_control     16384  1 phy_am335x
    ti_am335x_tsc          16384  0
    snd_soc_simple_card    16384  0
    snd_soc_simple_card_utils    16384  1 snd_soc_simple_card
    pm33xx                 16384  0
    wkup_m3_ipc            16384  1 pm33xx
    wkup_m3_rproc          16384  1
    remoteproc             49152  3 pru_rproc,wkup_m3_rproc,wkup_m3_ipc
    pvrsrvkm              397312  4
    omap_aes_driver        24576  0
    crypto_engine          16384  1 omap_aes_driver
    omap_sham              28672  0
    omap_crypto            16384  1 omap_aes_driver
    ti_emif_sram           16384  1 pm33xx
    pruss_soc_bus          16384  0
    wlcore_sdio            16384  0
    snd_soc_tlv320aic3x    57344  1
    rtc_omap               20480  2
    musb_am335x            16384  0
    omap_wdt               16384  0
    ti_am335x_tscadc       16384  1 ti_am335x_tsc
    sch_fq_codel           20480  4
    uio_module_drv         16384  0
    uio                    20480  1 uio_module_drv
    ftdi_sio               45056  0
    usbserial              36864  1 ftdi_sio
    usbcore               217088  3 ftdi_sio,musb_hdrc,usbserial
    usb_common             16384  6 phy_am335x,udc_core,musb_hdrc,libcomposite,musb_dsps,usbcore
    cryptodev              49152  0
    root@am335x-evm:~# 
    
    

    [   17.700922] tlv320aic3x-codec 0-001b: Linked as a consumer to regulator.5
    [   17.873571] tlv320aic3x-codec 0-001b: Linked as a consumer to regulator.4

    [   19.960407] asoc-simple-card sound: tlv320aic3x-hifi <-> 4803c000.mcasp mapping ok


    For better understanding of the boot process, you can also enable debug messages in McASP driver (davinci-mcasp.c) and your codec driver.


    Regards,
    Pavel

  • Pavel Botev said:

    [   17.700922] tlv320aic3x-codec 0-001b: Linked as a consumer to regulator.5
    [   17.873571] tlv320aic3x-codec 0-001b: Linked as a consumer to regulator.4

    [   19.960407] asoc-simple-card sound: tlv320aic3x-hifi <-> 4803c000.mcasp mapping ok

    I am not getting any of these messages for my codec. Where in device tree can I add Bit clock value? I added mclk-fs, but that only defines multiplication factor of Fsync with respect to Mclk. I have made some changes to my device tree. Can you please review it, since its not working.

    &am33xx_pinmux {
    	mcasp0_pins: mcasp0_pins{
    		pinctrl-single,pins= <
    					AM33XX_IOPAD(0x990, PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* mcasp0_aclkx.mcasp0_aclkx */
    					AM33XX_IOPAD(0x994, PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* mcasp0_fsx.mcasp0_fsx, OUTPUT */
    					AM33XX_IOPAD(0x998, PIN_INPUT_PULLDOWN | MUX_MODE0)	/* mcasp0_axr0 */
    					AM33XX_IOPAD(0x99c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* mcasp0_axr2 */
    					AM33XX_IOPAD(0x9ac, PIN_INPUT_PULLUP | MUX_MODE0)	/* MCASP0_AHCLKX */
    					AM33XX_IOPAD(0x878, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_ben1.GPIO1_28 */
    		>;
    	};
    };
    
    &mcasp0 {
    			#sound-dai-cells = <0>;
    			pinctrl-names = "default";
    			pinctrl-0 = <&bone_audio_cape_audio_pins>;
    			status = "okay";
    			op-mode = <0>;	/* MCASP_IIS_MODE */
    			tdm-slots = <8>;
    			num-serializer = <4>;
    			serial-dir = <	/* 0: INACTIVE, 1: TX, 2: RX */
    					2 0 1 0
    				>;
    			tx-num-evt = <8>;
    			rx-num-evt = <8>;
    };
    
    /{
    
    si32178: si32178 {
    				#sound-dai-cells = <0>;
    				compatible = "silabs,si32178";
    				status = "okay";
    };
    
    clk_mcasp0_fixed: clk_mcasp0_fixed {
    				#clock-cells = <0>;
    				compatible = "fixed-clock";
    				clock-frequency = <4096000>;
    			};
    
    clk_mcasp0: clk_mcasp0 {
    				#clock-cells = <0>;
    				compatible = "gpio-gate-clock";
    				clocks = <&clk_mcasp0_fixed>;
    				enable-gpios = <&gpio1 28 0>;
    			};
    
    sound0: sound@0 {
    				compatible = "simple-audio-card";
    				simple-audio-card,name = "SI32178";
    				simple-audio-card,widgets =
    					"Speaker", "Speaker External",
    					"Line", "Line In";
    				simple-audio-card,routing =
    					"Speaker External",       "LINE_OUT",
    					"LINE1L",               "Line In";
    				simple-audio-card,format = "i2s";
    				simple-audio-card,bitclock-master = <&dailink0_master>;
    				simple-audio-card,frame-master = <&dailink0_master>;
    				simple-audio-card,mclk-fs = <512>;
    
    				simple-audio-card,codec {
    					sound-dai = <&si32178>;
    				};
    
    				dailink0_master: simple-audio-card,cpu {
    					sound-dai = <&mcasp0>;
    					clocks = <&clk_mcasp0>;
    				};
    };
    
    };

    Pavel Botev said:

    For better understanding of the boot process, you can also enable debug messages in McASP driver (davinci-mcasp.c) and your codec driver.

    Also, how can I enable debug messages?

    Thank you

    Samer

  • Pavel,

    Actually I just got this device tree to work. I didn't have si32178 node in my running device tree, but now I am getting following logs:

    [    2.417416] asoc-simple-card sound: si32178 <-> 48038000.mcasp mapping ok
    [    2.424421] asoc-simple-card sound: ASoC: no source widget found for LINE_OUT
    [    2.431637] asoc-simple-card sound: ASoC: Failed to add route LINE_OUT -> dir
    ect -> Speaker External
    [    2.440857] asoc-simple-card sound: ASoC: no sink widget found for LINE1L
    [    2.447731] asoc-simple-card sound: ASoC: Failed to add route Line In -> dire
    ct -> LINE1L
    [    2.455994] asoc-simple-card sound: ASoC: no DMI vendor name!
    

    Do I have to add routing in my codec file?

    Thank you,

    Samer

  • Samer,

    You can setup audio routing from user space with amixer command. Refer to below user guide for details:

    http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Foundational_Components_Kernel_Drivers.html#audio

    Check also below txt files for audio routing settings in DTS file:

    linux-kernel/Documentation/devicetree/bindings/sound/davinci-evm-audio.txt

    linux-kernel/Documentation/devicetree/bindings/sound/widgets.txt

    linux-kernel/Documentation/devicetree/bindings/sound/simple-card.txt


    Check also below e2e threads:

    https://e2e.ti.com/support/processors/f/791/p/852177/3153324#3153324

    https://e2e.ti.com/support/processors/f/791/t/704340

    https://e2e.ti.com/support/processors/f/791/t/717125

    Regards,
    Pavel

  • Pavel,

    From all these threads and documents you mentioned, it seems like I will have to define my audio route and widgets in codec file first and then mention that in dts.

    Silicon Labs voice chip that I am using needs BCLK and FSYNC all the time once the chip is powered on. How can I have BCLK and FSYNC going on all the time through MCASP? Is it possible?

    Because right now I only see BCLK and FSYNC when I execute aplay or arecord commands.

    Thank you,

    Samer

  • Samer,

    Samer Abbas said:

    Silicon Labs voice chip that I am using needs BCLK and FSYNC all the time once the chip is powered on. How can I have BCLK and FSYNC going on all the time through MCASP? Is it possible?

    Because right now I only see BCLK and FSYNC when I execute aplay or arecord commands.

    I am not sure if that is possible.

    I would suggest you to open new e2e thread regarding your last question.

    Regards,
    Pavel