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.

Linux/AM5728: TLV320AIC304 audio codec configuration

Part Number: AM5728
Other Parts Discussed in Thread: TLV320AIC3104, , TMP102, ADS1015

Tool/software: Linux

Hi all,

I was hoping someone could point me in the right direction.  We have a custom board with AM5728 processor and TLV320AIC3104 audio codec and have had trouble getting the onboard soundcard to work.  audio through the HDMI port works and is setup as soundcard 1 and the TLV320AIC3104 is setup as souncard 0.  Our implementation is identical to the AM5728 EVM implementation using CLKOUT2 as MCLK, and swapping MCASP1 lines in our design compaired to the EVM MCASP3.  Some of the relevant sections of the device tree are below followed by the gstreamer command that we are trying to use to test it.  Any help would be greatly appreciated. We are using Processor SDK Linux RT 02.00.01 Kernel

aliases {
    sound0 = &sound0;
    sound1 = &hdmi;
};

/* On board audio */

sound0: sound@0 {

compatible = "simple-audio-card";

simple-audio-card,name = "117-002";
simple-audio-card,widgets =
"Line", "Line Out",
"Line", "Line In";
simple-audio-card,routing =
"Line Out", "LLOUT",
"Line Out", "RLOUT",
"MIC2L", "Line In",
"MIC2R", "Line In";
simple-audio-card,format = "dsp_b";
simple-audio-card,bitclock-master = <&sound0_master>;
simple-audio-card,frame-master = <&sound0_master>;
simple-audio-card,bitclock-inversion;

sound0_master: simple-audio-card,cpu {

sound-dai = <&mcasp1>;

};

simple-audio-card,codec {

sound-dai = <&tlv320aic3104>;
assigned-clocks = <&clkoutmux2_clk_mux>;
assigned-clock-parents = <&sys_clk2_dclk_div>;
clocks = <&clkout2_clk>;

};

};

mcasp1_default: mcasp1_pins_default {

pinctrl-single,pins = <

TDA2X_ABC_PAD_MCASP1_FSX (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp1_fsx.mcasp1_fsx */
TDA2X_ABC_PAD_MCASP1_FSR (PIN_INPUT | MUX_MODE15) /* mcasp1_fsr.mcasp1_fsr */
TDA2X_ABC_PAD_MCASP1_ACLKX (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp1_aclkx.mcasp1_aclkx */
TDA2X_ABC_PAD_MCASP1_ACLKR (PIN_INPUT | MUX_MODE15) /* mcasp1_aclkr.mcasp1_aclkr */
TDA2X_ABC_PAD_MCASP1_AXR0 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp1_axr0.mcasp1_axr0 */
TDA2X_ABC_PAD_MCASP1_AXR1 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcasp1_axr1.mcasp1_axr1 */

>;

};

&mcasp1 {

#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&mcasp1_default>;

assigned-clocks = <&mcasp1_ahclkx_mux>;
assigned-clock-parents = <&sys_clkin2>;

status = "okay";

op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <2>;
/* 4 serializers */
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
1 2 0 0
>;
tx-num-evt = <8>;
rx-num-evt = <8>;

};

&i2c1 {

tlv320aic3104: tlv320aic31xx@18 {

#sound-dai-cells = <0>;
compatible = "ti,tlv320aic3104";
reg = <0x18>;
adc-settle-ms = <40>;

ai31xx-micbias-vg = <1>; /* 2.0 V */

AVDD-supply = <&vdd_codec>;
IOVDD-supply = <&v3v3>;
DRVDD-supply = <&vdd_codec>;
DVDD-supply = <&v1v8>;

status = "okay";

};

};

gst-launch-1.0  audiotestsrc freq=1000 num-buffers=100 ! alsasink device="hw:0,0"

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstAudioSinkClock
[ 270.564433] omap-iommu 41502000.mmu: iommu fault: da 0x2ea50010 flags 0x0
[ 270.577019] remoteproc3: crash detected in 41000000.dsp: type mmufault
[ 270.583710] omap-iommu 41502000.mmu: 41502000.mmu: errs:0x00000002 da:0x2ea50010 pgd:0xec44cba8 *pgd:px00000000
[ 270.594147] remoteproc3: handling crash #1 in 41000000.dsp
[ 270.599843] remoteproc3: recovering 41000000.dsp
[ 270.634720] omap_hwmod: mmu1_dsp2: _wait_target_disable failed
[ 270.647489] omap_hwmod: mmu0_dsp2: _wait_target_disable failed
[ 270.653570] remoteproc3: stopped remote processor 41000000.dsp
[ 270.735361] remoteproc3: powering up 41000000.dsp
[ 270.740251] remoteproc3: Booting fw image dra7-dsp2-fw.xe66, size 21591344
[ 270.755352] omap_hwmod: mmu0_dsp2: _wait_target_disable failed
[ 270.761355] omap-iommu 41501000.mmu: 41501000.mmu: version 3.0
[ 270.767289] omap-iommu 41502000.mmu: 41502000.mmu: version 3.0
[ 270.783049] remoteproc3: RSC_INTMEM is deprecated. Please do not use this resource type to support loading into internal memories.
[ 270.800891] remoteproc3: remote processor 41000000.dsp is now up
[ 270.807079] omap-iommu 41502000.mmu: iommu fault: da 0x2ea50010 flags 0x0
[ 270.813900] remoteproc3: crash detected in 41000000.dsp: type mmufault
[ 270.820582] omap-iommu 41502000.mmu: 41502000.mmu: errs:0x00000002 da:0x2ea50010 pgd:0xd55f0ba8 *pgd:px00000000
[ 270.831294] virtio_rpmsg_bus virtio3: rpmsg host is online
[ 270.837558] remoteproc3: registered virtio3 (type 7)
[ 270.837886] lp8860 1-002d: Failed to get enable gpio: -517
[ 270.863422] remoteproc3: handling crash #2 in 41000000.dsp
[ 270.869100] remoteproc3: recovering 41000000.dsp
[ 270.892272] omap_hwmod: mmu1_dsp2: _wait_target_disable failed
[ 270.904904] omap_hwmod: mmu0_dsp2: _wait_target_disable failed
[ 270.910917] remoteproc3: stopped remote processor 41000000.dsp
[ 270.990184] remoteproc3: powering up 41000000.dsp
[ 270.995126] remoteproc3: Booting fw image dra7-dsp2-fw.xe66, size 21591344
[ 271.008930] omap_hwmod: mmu0_dsp2: _wait_target_disable failed
[ 271.014971] omap-iommu 41501000.mmu: 41501000.mmu: version 3.0
[ 271.020887] omap-iommu 41502000.mmu: 41502000.mmu: version 3.0
[ 271.038197] remoteproc3: RSC_INTMEM is deprecated. Please do not use this resource type to support loading into internal memories.
[ 271.056026] remoteproc3: remote processor 41000000.dsp is now up
[ 271.062174] omap-iommu 41502000.mmu: iommu fault: da 0x2ea50010 flags 0x0
[ 271.069026] remoteproc3: crash detected in 41000000.dsp: type mmufault
[ 271.075697] omap-iommu 41502000.mmu: 41502000.mmu: errs:0x00000002 da:0x2ea50010 pgd:0xec44cba8 *pgd:px00000000
[ 271.086409] virtio_rpmsg_bus virtio3: rpmsg host is online
[ 271.092013] remoteproc3: registered virtio3 (type 7)
[ 271.092290] lp8860 1-002d: Failed to get enable gpio: -517
[ 271.119123] remoteproc3: handling crash #3 in 41000000.dsp
[ 271.124727] remoteproc3: recovering 41000000.dsp
[ 271.147561] omap_hwmod: mmu1_dsp2: _wait_target_disable failed
[ 271.160199] omap_hwmod: mmu0_dsp2: _wait_target_disable failed
[ 271.166226] remoteproc3: stopped remote processor 41000000.dsp
[ 271.245865] remoteproc3: powering up 41000000.dsp
[ 271.250698] remoteproc3: Booting fw image dra7-dsp2-fw.xe66, size 21591344
[ 271.264543] omap_hwmod: mmu0_dsp2: _wait_target_disable failed
[ 271.270537] omap-iommu 41501000.mmu: 41501000.mmu: version 3.0
[ 271.276469] omap-iommu 41502000.mmu: 41502000.mmu: version 3.0
[ 271.292551] remoteproc3: RSC_INTMEM is deprecated. Please do not use this resource type to support loading into internal memories.
[ 271.310631] remoteproc3: remote processor 41000000.dsp is now up
[ 271.316815] omap-iommu 41502000.mmu: iommu fault: da 0x2ea50010 flags 0x0
[ 271.323634] remoteproc3: crash detected in 41000000.dsp: type mmufault
[ 271.330314] omap-iommu 41502000.mmu: 41502000.mmu: errs:0x00000002 da:0x2ea50010 pgd:0xd55f0ba8 *pgd:px00000000
[ 271.341008] virtio_rpmsg_bus virtio3: rpmsg host is online
[ 271.346654] remoteproc3: registered virtio3 (type 7)
[ 271.346952] lp8860 1-002d: Failed to get enable gpio: -517
[ 271.376675] remoteproc3: handling crash #4 in 41000000.dsp
[ 271.382277] remoteproc3: recovering 41000000.dsp
[ 271.406101] omap_hwmod: mmu1_dsp2: _wait_target_disable failed
[ 271.418736] omap_hwmod: mmu0_dsp2: _wait_target_disable failed
[ 271.424962] remoteproc3: stopped remote processor 41000000.dsp
[ 271.493091] remoteproc3: powering up 41000000.dsp
[ 271.498054] remoteproc3: Booting fw image dra7-dsp2-fw.xe66, size 21591344
[ 271.512997] omap_hwmod: mmu0_dsp2: _wait_target_disable failed
[ 271.519000] omap-iommu 41501000.mmu: 41501000.mmu: version 3.0
[ 271.524933] omap-iommu 41502000.mmu: 41502000.mmu: version 3.0
[ 271.540183] remoteproc3: RSC_INTMEM is deprecated. Please do not use this resource type to support loading into internal memories.
[ 271.558165] remoteproc3: remote processor 41000000.dsp is now up
[ 271.564315] omap-iommu 41502000.mmu: iommu fault: da 0x2ea50010 flags 0x0
[ 271.571170] remoteproc3: crash detected in 41000000.dsp: type mmufault
[ 271.577843] omap-iommu 41502000.mmu: 41502000.mmu: errs:0x00000002 da:0x2ea50010 pgd:0xec44cba8 *pgd:px00000000
[ 271.588656] remoteproc3: handling crash #5 in 41000000.dsp
[ 271.594258] remoteproc3: recovering 41000000.dsp
[ 271.599279] Unable to handle kernel NULL pointer dereference at virtual address 0000002c
[ 271.607475] pgd = c0004000
[ 271.610194] [0000002c] *pgd=00000000
[ 271.613796] Internal error: Oops: 17 [#1] PREEMPT SMP ARM
[ 271.619218] Modules linked in: bluetooth ipv6 gdbserverproxy(O) cryptodev(O) cmemk(O) xhci_plat_hcd xhci_hcd usbcore omapdrm_pvr(O) omapdrm syscopyarea sysfillrect sysimgblt snd_soc_davinci_mcasp fb_sys_fops snd_soc_edma drm_kms_helper snd_soc_omap_hdmi_audio snd_soc_omap snd_soc_simple_card snd_soc_tlv320aic3x rpmsg_rpc snd_soc_core ti_vip ti_vpe dwc3 snd_compress v4l2_mem2mem videobuf2_dma_contig snd_pcm_dmaengine usb_common videobuf2_memops m25p80 ti_vpdma spi_nor snd_pcm videobuf2_core virtio_rpmsg_bus v4l2_common omapdss videodev phy_omap_usb2 tmp102 connector_hdmi leds_gpio snd_timer ti_soc_thermal ads1015 omapdss_base thermal_sys snd spi_ti_qspi omap_wdt media dwc3_omap hwmon soundcore leds_lp8860 led_class apds9250als tas5421 extcon ti_fpd3_serdes rtc_ds3232 omap_rng rng_core debugss_kmodule(O) omap_remoteproc remoteproc virtio virtio_ring
[ 271.695204] CPU: 1 PID: 651 Comm: kworker/1:5 Tainted: G O 4.1.13-rt11-00084-g8666914-dirty #2
[ 271.704985] Hardware name: Generic DRA74X (Flattened Device Tree)
[ 271.711117] Workqueue: events rproc_crash_handler_work [remoteproc]
[ 271.717418] task: ec6953c0 ti: d57d2000 task.ti: d57d2000
[ 271.722844] PC is at klist_put+0x18/0x8c
[ 271.726786] LR is at device_del+0x4c/0x1e4
[ 271.730899] pc : [<c06617a4>] lr : [<c0441e08>] psr: a0030013
[ 271.730899] sp : d57d3e58 ip : 00000002 fp : 00000000
[ 271.742425] r10: ee54de00 r9 : c0a238d8 r8 : c0a22c9d
[ 271.747671] r7 : 00000001 r6 : ec1ac020 r5 : 00000000 r4 : d54588f0
[ 271.754224] r3 : 00000000 r2 : 0000000e r1 : 00000001 r0 : 00000000
[ 271.760780] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
[ 271.768119] Control: 10c5387d Table: ac83c06a DAC: 00000015
[ 271.773887] Process kworker/1:5 (pid: 651, stack limit = 0xd57d2218)
[ 271.780267] Stack: (0xd57d3e58 to 0xd57d4000)
[ 271.784642] 3e40: 00000000 ec87b438
[ 271.792855] 3e60: ec87b438 ec1ac020 d57d3ed0 c0441e08 d57d3ed0 ec1ac388 bf012b50 ec1ac000
[ 271.801068] 3e80: d57d3ed0 ec87b438 ec1ac31c ec1ac000 d57d3ed0 c0441fac 00000003 bf0081c8
[ 271.809280] 3ea0: ec1ac31c bf010414 ec1ac360 ec0da240 ee547b80 c005e460 00000001 00000000
[ 271.817492] 3ec0: c005e374 ee547b80 00000001 00000000 bf012b48 c0ba9648 00000000 bf011a38
[ 271.825705] 3ee0: 00000004 ee547b80 ee547bb0 c0a22c9d ec0da258 00000008 ec0da240 ee547b80
[ 271.833918] 3f00: 00000004 c005eccc ec6953c0 00000000 ec1b4500 ec0da240 c005eb50 00000000
[ 271.842129] 3f20: 00000000 00000000 00000000 c0064de0 00000000 00000000 00000000 ec0da240
[ 271.850341] 3f40: 00000000 00000000 dead4ead ffffffff ffffffff c0a2afd8 00000000 00000000
[ 271.858553] 3f60: c083e2cc d57d3f64 d57d3f64 00000000 00000000 dead4ead ffffffff ffffffff
[ 271.866765] 3f80: c0a2afd8 00000000 00000000 c083e2cc d57d3f90 d57d3f90 d57d3fac ec1b4500
[ 271.874977] 3fa0: c0064d14 00000000 00000000 c000f858 00000000 00000000 00000000 00000000
[ 271.883190] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 271.891402] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 e1a03005 e12fff3c
[ 271.899623] [<c06617a4>] (klist_put) from [<c0441e08>] (device_del+0x4c/0x1e4)
[ 271.906882] [<c0441e08>] (device_del) from [<c0441fac>] (device_unregister+0xc/0x18)
[ 271.914669] [<c0441fac>] (device_unregister) from [<bf0081c8>] (unregister_virtio_device+0xc/0x20 [virtio])
[ 271.924471] [<bf0081c8>] (unregister_virtio_device [virtio]) from [<bf010414>] (rproc_trigger_recovery+0x44/0x8c [remoteproc])
[ 271.935929] [<bf010414>] (rproc_trigger_recovery [remoteproc]) from [<c005e460>] (process_one_work+0x20c/0x8c8)
[ 271.946066] [<c005e460>] (process_one_work) from [<c005eccc>] (worker_thread+0x17c/0x4ac)
[ 271.954282] [<c005eccc>] (worker_thread) from [<c0064de0>] (kthread+0xcc/0xe4)
[ 271.961541] [<c0064de0>] (kthread) from [<c000f858>] (ret_from_fork+0x14/0x3c)
[ 271.968796] Code: e5905000 e1a04000 e3c55001 e1a00005 (e595602c)
[ 271.975030] ---[ end trace b2577419001da17e ]---
[ 271.979806] Unable to handle kernel paging request at virtual address ffffffd0
[ 271.987093] pgd = c0004000
[ 271.989810] [ffffffd0] *pgd=af7ae821, *pte=00000000, *ppte=00000000
[ 271.996152] Internal error: Oops: 17 [#2] PREEMPT SMP ARM
[ 272.001571] Modules linked in: bluetooth ipv6 gdbserverproxy(O) cryptodev(O) cmemk(O) xhci_plat_hcd xhci_hcd usbcore omapdrm_pvr(O) omapdrm syscopyarea sysfillrect sysimgblt snd_soc_davinci_mcasp fb_sys_fops snd_soc_edma drm_kms_helper snd_soc_omap_hdmi_audio snd_soc_omap snd_soc_simple_card snd_soc_tlv320aic3x rpmsg_rpc snd_soc_core ti_vip ti_vpe dwc3 snd_compress v4l2_mem2mem videobuf2_dma_contig snd_pcm_dmaengine usb_common videobuf2_memops m25p80 ti_vpdma spi_nor snd_pcm videobuf2_core virtio_rpmsg_bus v4l2_common omapdss videodev phy_omap_usb2 tmp102 connector_hdmi leds_gpio snd_timer ti_soc_thermal ads1015 omapdss_base thermal_sys snd spi_ti_qspi omap_wdt media dwc3_omap hwmon soundcore leds_lp8860 led_class apds9250als tas5421 extcon ti_fpd3_serdes rtc_ds3232 omap_rng rng_core debugss_kmodule(O) omap_remoteproc remoteproc virtio virtio_ring

  • The software team have been notified. They will respond here.
  • Hi George,

    1. Not sure how the following macro is defined:  TDA2X_ABC_PAD_MCASP1_ is defined, but if your sound card is detected upon boot, it should be fine.

    2. Use the following (I am referencing the am57xx-beagle-x15-common.dtsi:

                  simple-audio-card,cpu {

                       sound-dai = <&mcasp1>;

                  };

                  sound0_master: simple-audio-card,codec {

                                   sound-dai = <&tlv320aic3104>;

                                  clocks = <&clkout2_clk>;

                  };

    3. Enable the input on the clock pin:

       TDA2X_ABC_PAD_MCASP1_ACLKX (PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcasp1_aclkx.mcasp1_aclkx */  

    The above configures the pad as I/O allowing the execution of any loopback needed in the I/O cell.

    4. As I see from the kernel panic after you execute the gstreamer, the problem is some kind of memory fault:

    [ 270.564433] omap-iommu 41502000.mmu: iommu fault: da 0x2ea50010 flags 0x0

    And it is related to the DSP. In my opinion this is linked with the dai_fmt you use:

      simple-audio-card,format = "dsp_b";

    See the dependencies of SND_OMAP_SOC in the sound/soc/omap/Kconfig file:

       config SND_OMAP_SOC

       tristate "SoC Audio for the Texas Instruments OMAP chips"

       depends on (ARCH_OMAP && DMA_OMAP) || (ARM && COMPILE_TEST)

       select SND_DMAENGINE_PCM

    Make sure these are enabled in the kernel configuration (your defconfig file tisdk_am57xx-evm_defconfig).   

    As a last resort, try removing the 

       simple-audio-card,format = "dsp_b"; 

    Let the kernel use the its default. 

    Also when playing a file, try using aplay instead of gstreamer. What is the result? 

    Best Regards, 
    Yordan

  • Hi Yordan,

    Thank you for the quick response.  The audio card has been detecting fine, I did have the MUX for ACLKX as output so I made that change with no change in the results.  I also verified that all the kernel configs were set which they are and did try removing the audio-card format which seems like it must default to the dsp.  I have also tried to use aplay to play an audio file and it fails in a similar manner except with a different address.  Any suggestions on how to debug the dsp, the configuration looks identical to the EVM and loads the same firmware files.

    Thank You,

    George

    root@am57xx-evm:~# aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: D117002 [117-002], device 0: davinci-mcasp.0-tlv320aic3x-hifi tlv320aic3x-hifi-0 []
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 1: H58040000encode [HDMI 58040000.encoder], device 0: HDMI 58040000.encoder snd-soc-dummy-dai-0 []
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    root@am57xx-evm:~#

    root@am57xx-evm:~# speaker-test -Dsysdefault:D117002 -f1000

    speaker-test 1.0.28

    Playback device is sysdefault:D117002
    Stream parameters are 48000Hz, S16_LE, 1 channels
    Using 16 octaves of pink noise
    Rate set to 48000Hz (requested 48000Hz)
    Buffer size range from 256 to 32768
    Period size range from 128 to 16384
    Using max buffer size 32768
    Periods = 4
    was set period_size = 8192
    was set buffer_size = 32768
    0 - Front Left
    [ 5866.209431] omap-iommu 41502000.mmu: iommu fault: da 0x392cbce0 flags 0x0
    [ 5866.223650] remoteproc3: crash detected in 41000000.dsp: type mmufault
    [ 5866.230346] omap-iommu 41502000.mmu: 41502000.mmu: errs:0x00000002 da:0x392cbce0 pgd:0xec3e8e48 *pgd:px00000000
    [ 5866.240861] remoteproc3: handling crash #1 in 41000000.dsp
    [ 5866.246584] remoteproc3: recovering 41000000.dsp
    [ 5866.279154] omap_hwmod: mmu1_dsp2: _wait_target_disable failed
    [ 5866.291913] omap_hwmod: mmu0_dsp2: _wait_target_disable failed
    [ 5866.297890] ------------[ cut here ]------------
    [ 5866.302540] WARNING: CPU: 1 PID: 25 at drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x224/0x344()
    [ 5866.312001] 44000000.ocp:L3 Standard Error: MASTER DSP2_MDMA TARGET PCIE1 (Read): At Address: 0x0EA50010 : Data Access in Supervisor mode during Functional access
    [ 5866.326593] Modules linked in: bluetooth ipv6 gdbserverproxy(O) cryptodev(O) cmemk(O) xhci_plat_hcd xhci_hcd omapdrm_pvr(O) usbcore snd_soc_davinci_mcasp snd_soc_edma ti_vip snd_soc_omap_hdmi_audio snd_soc_omap omapdrm syscopyarea sysfillrect sysimgblt fb_sys_fops snd_soc_tlv320aic3x drm_kms_helper rpmsg_rpc ti_vpe snd_soc_simple_card snd_soc_core dwc3 m25p80 videobuf2_dma_contig usb_common ti_vpdma spi_nor ov490 virtio_rpmsg_bus videobuf2_memops v4l2_mem2mem videobuf2_core snd_compress snd_pcm_dmaengine v4l2_common omapdss snd_pcm dwc3_omap snd_timer leds_gpio omap_wdt spi_ti_qspi connector_hdmi videodev omapdss_base phy_omap_usb2 extcon leds_lp8860 snd tmp102 ti_fpd3_serdes ti_soc_thermal media led_class ads1015 soundcore thermal_sys apds9250als rtc_ds3232 tas5421 hwmon omap_rng rng_core debugss_kmodule(O) omap_remoteproc remoteproc virtio virtio_ring

  • Hi,

    Can you try and run the IPC examples, as described:
    processors.wiki.ti.com/.../DRA7xx_GLSDK_Software_Developers_Guide
    processors.wiki.ti.com/.../RPMsg_Kernel_Client_Application

    Also have a look at the following threads, that deal with iommu faults under different conditions:
    e2e.ti.com/.../2046535
    e2e.ti.com/.../503515
    The info could be of help in your case.

    Best Regards,
    Yordan
  • Hi,

    It looks like the IPC works, interesting enough with the messageq firmware loaded i don't see the page faults, gstreamer will just hang while trying to play the sound and I need to ctrl-c to stop the process. If i reload the opencl firmware, I do receive the page faults. Could the clock settings for my mcasp 1 device be wrong,

    I have the clocks set as follows:


    assigned-clocks = <&mcasp1_ahclkx_mux>;
    assigned-clock-parents = <&sys_clkin2>;




    IPC Test results:

    root@am57xx-evm:~# lad_dra7xx

    numProcessors = 5 id = 0 baseId = 0

    Spawned daemon: lad_dra7xx

    root@am57xx-evm:~# MessageQApp 15 2
    Using numLoops: 15; procId : 2
    Entered MessageQApp_execute
    Local MessageQId: 0x80
    Remote queueId [0x20080]
    Exchanging 15 messages with remote processor IPU1...
    MessageQ_get #1 Msg = 0xb6400468
    MessageQ_get #2 Msg = 0xb6400468
    MessageQ_get #3 Msg = 0xb6400468
    MessageQ_get #4 Msg = 0xb6400468
    MessageQ_get #5 Msg = 0xb6400468
    MessageQ_get #6 Msg = 0xb6400468
    MessageQ_get #7 Msg = 0xb6400468
    MessageQ_get #8 Msg = 0xb6400468
    MessageQ_get #9 Msg = 0xb6400468
    MessageQ_get #10 Msg = 0xb6400468
    MessageQ_get #11 Msg = 0xb6400468
    MessageQ_get #12 Msg = 0xb6400468
    MessageQ_get #13 Msg = 0xb6400468
    MessageQ_get #14 Msg = 0xb6400468
    MessageQ_get #15 Msg = 0xb6400468
    Exchanged 15 messages with remote processor IPU1
    Sample application successfully completed!
    Leaving MessageQApp_execute

    root@am57xx-evm:~# MessageQApp 15 1
    Using numLoops: 15; procId : 1
    Entered MessageQApp_execute
    Local MessageQId: 0x80
    Remote queueId [0x10080]
    Exchanging 15 messages with remote processor IPU2...
    MessageQ_get #1 Msg = 0xb6400468
    MessageQ_get #2 Msg = 0xb6400468
    MessageQ_get #3 Msg = 0xb6400468
    MessageQ_get #4 Msg = 0xb6400468
    MessageQ_get #5 Msg = 0xb6400468
    MessageQ_get #6 Msg = 0xb6400468
    MessageQ_get #7 Msg = 0xb6400468
    MessageQ_get #8 Msg = 0xb6400468
    MessageQ_get #9 Msg = 0xb6400468
    MessageQ_get #10 Msg = 0xb6400468
    MessageQ_get #11 Msg = 0xb6400468
    MessageQ_get #12 Msg = 0xb6400468
    MessageQ_get #13 Msg = 0xb6400468
    MessageQ_get #14 Msg = 0xb6400468
    MessageQ_get #15 Msg = 0xb6400468
    Exchanged 15 messages with remote processor IPU2
    Sample application successfully completed!
    Leaving MessageQApp_execute

    root@am57xx-evm:~# MessageQApp 15 3
    Using numLoops: 15; procId : 3
    Entered MessageQApp_execute
    Local MessageQId: 0x80
    Remote queueId [0x30080]
    Exchanging 15 messages with remote processor DSP2...
    MessageQ_get #1 Msg = 0xb6500468
    MessageQ_get #2 Msg = 0xb6500468
    MessageQ_get #3 Msg = 0xb6500468
    MessageQ_get #4 Msg = 0xb6500468
    MessageQ_get #5 Msg = 0xb6500468
    MessageQ_get #6 Msg = 0xb6500468
    MessageQ_get #7 Msg = 0xb6500468
    MessageQ_get #8 Msg = 0xb6500468
    MessageQ_get #9 Msg = 0xb6500468
    MessageQ_get #10 Msg = 0xb6500468
    MessageQ_get #11 Msg = 0xb6500468
    MessageQ_get #12 Msg = 0xb6500468
    MessageQ_get #13 Msg = 0xb6500468
    MessageQ_get #14 Msg = 0xb6500468
    MessageQ_get #15 Msg = 0xb6500468
    Exchanged 15 messages with remote processor DSP2
    Sample application successfully completed!
    Leaving MessageQApp_execute

    root@am57xx-evm:~# MessageQApp 15 4
    Using numLoops: 15; procId : 4
    Entered MessageQApp_execute
    Local MessageQId: 0x80
    Remote queueId [0x40080]
    Exchanging 15 messages with remote processor DSP1...
    MessageQ_get #1 Msg = 0xb6400468
    MessageQ_get #2 Msg = 0xb6400468
    MessageQ_get #3 Msg = 0xb6400468
    MessageQ_get #4 Msg = 0xb6400468
    MessageQ_get #5 Msg = 0xb6400468
    MessageQ_get #6 Msg = 0xb6400468
    MessageQ_get #7 Msg = 0xb6400468
    MessageQ_get #8 Msg = 0xb6400468
    MessageQ_get #9 Msg = 0xb6400468
    MessageQ_get #10 Msg = 0xb6400468
    MessageQ_get #11 Msg = 0xb6400468
    MessageQ_get #12 Msg = 0xb6400468
    MessageQ_get #13 Msg = 0xb6400468
    MessageQ_get #14 Msg = 0xb6400468
    MessageQ_get #15 Msg = 0xb6400468
    Exchanged 15 messages with remote processor DSP1
    Sample application successfully completed!
    Leaving MessageQApp_execute

    Thank You,
    George
  • Hi,
    I have encountered the same problem. Do you solve it now ?
  • I have yet to get this working, still trying to resolve the problem.

    - George
  • Hi George,

    Sorry for the late reply.

    I see that you use dsp_b as simple-audio-card,format. Can you verify that the dai link structure also uses dsp_b as .dai_fmt?

    Or can you try changing the simple-audio-card,format to "i2s" for example or any of the format options described in Documentation/devicetree/bindings/sound/simple-card.txt and see if you will overcome the mmu fault?

    Best Regards,
    Yordan
  • George,

    Can you provide the portion of your schematic that shows the connections between the AM5728 and the codec? I've added the connections from our AM5728 GP EVM below:

    I2C1 SCL and SDA are connected for codec configuration

    CLKOUT2 is provided from the AM5728 as an input to the codec to provide the master clock to generate the bit clock and frame sync clocks

    MCASP3_ACLKX is being used as the bit clock input FROM the codec TO the AM5728

    MCASP3_FSX is being used as the frame sync input FROM the codec TO the AM5728

    MCASP3 AXR0 and AXR1 are the transmit and receive audio signals

    Which device do you want to be the clock master? Our EVM shows the codec being the clock master but your original device tree seems to configure the AM5728 as the clock master.

    Are you able to put a scope or a logic analyzer on the four MCASP pins to see if the pins are toggling? Can you provide a screen shot?

    Jason Reeder

  • Hi Jason,

    Below is the schematic and the scope signals when trying to play audio.  AHCLKX and AXR1 have no signal when trying to play audio.  The configuration is using CKOUT2 is more than likely the issue.

    Thank you for the help.

    Schematic

    BCLK

    DIN

    WCLK

  • George,

    Yes, please make sure that pin D18 is using mux mode 9 (for clkout2 instead of ahclkx) and that you follow the sound0 device tree example from the AM572x GP EVM (found in the Processor SDK v3.2.0.5 in arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi).

    clkout2 should be a clock signal coming out of the AM5728 device that the codec will use as its master clock. From there, the codec can be the clock master and generate the bit clock and frame sync.

    Also, you do not need the aclkr or fsr pins so R391 and R393 can be left unpopulated. Both the transmit and receive functions will use the clocks provided by the codec on aclkx and fsx.

    Jason Reeder
  • Thank you for the response, the MCLK MUX was the solution, I still am seeing DSP kernel panics when I play audio. If the kernel just page faults and does not panic the audio does play fine. I believe this is a different issue than the codec issue I was having, but any pointers on where to check for the DSP issue would be welcomed.

    Thank You,
    George
  • George,

    Are you trying to use the DSPs in the device for anything or should they be idle?

    Jason Reeder

  • Hi Jason,

    I am not currently using the DSPs, they should be idle.

    Thank You,
    George
  • George,

    Can you try moving the 'libgstdsp66.so' library out of the '/usr/lib/gstreamer-1.0/' folder and see if the DSP problem persists?

    Jason Reeder
  • Hi Jason,

    It does not exist in the directory and the problem persists.

    Thank You,
    George Vigelette
  • Hi Jason,

    Further investigation shows that if i point the link dra7-dsp1-fw.xe66 to dra7-dsp1-fw.xe66.ipc-test-fw the problem does not exist

    Thank You,
    George Vigelette