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.

PROCESSOR-SDK-AM62X: HDMI audio using aplay error: [50.065492] davinci-mcasp 2b10000.mcasp: Sample-rate is off by 11776 PPM

Part Number: PROCESSOR-SDK-AM62X
Other Parts Discussed in Thread: SK-AM62

I want to test whether hdmi audio is normal on my board and the following error occurs. The operation method is as follows: copy k3-am625-sk-hdmi-audio.dtbo to file system /boot/ directory.

Then perform setenv name_overlays k3-am625-sk-hdmi-audio.dtbo, saveenv, and reset during the uboot phase.

root@am62xx-evm:~# aplay 01+Singalongsong.wav
Playing WAVE '01+Singalongsong.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
[ 50.065492] davinci-mcasp 2b10000.mcasp: Sample-rate is off by -11776 PPM
^CAborted by signal Interrupt...

[ 80.637685] ti-udma 485c0100.dma-controller: chan1 teardown timeout!
root@am62xx-evm:~#
root@am62xx-evm:~#
root@am62xx-evm:~#
root@am62xx-evm:~#

I tested the AM-62EVM using the same method and reported the same error and no sound

  • SK-HDMI-AUDIO.DTS:
    / {
        fragment@101 {
            target-path = "/";

            __overlay__ {
                hdmi_audio: sound-sii9022 {
                    compatible = "simple-audio-card";
                    simple-audio-card,name = "AM62x-Sil9022-HDMI";
                    simple-audio-card,format = "i2s";
                    simple-audio-card,bitclock-master = <&hdmi_dailink_master>;
                    simple-audio-card,frame-master = <&hdmi_dailink_master>;
                    simple-audio-card,mclk-fs = <2182>;

                    hdmi_dailink_master: simple-audio-card,cpu {
                        sound-dai = <&mcasp0>;
                        system-clock-frequency = <24000000>;
                        system-clock-direction-out;
                    };

                    simple-audio-card,codec {
                        sound-dai = <&sii9022>;
                    };
                };
            };
        };
    };

    &codec_audio {
        status = "disabled";
    };
  • sk-common.dtis:

    &mcasp0 {
        status = "okay";
        #sound-dai-cells = <0>;
        pinctrl-names = "default";
        pinctrl-0 = <&main_mcasp0_pins_default>;
       
        op-mode = <0>;          /* MCASP_IIS_MODE */
        tdm-slots = <2>;
        /* 16 serializers */
        serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
               2 1 0 0
               0 0 0 0
               0 0 0 0
               0 0 0 0
        >;
        tx-num-evt = <32>;
        rx-num-evt = <32>;
    };
        main_mcasp0_pins_default: main-mcasp0-pins-default {
            pinctrl-single,pins = <
                AM62X_IOPAD(0x01a4, PIN_INPUT, 0) /* (B20) MCASP0_ACLKX.MCASP0_ACLKX */
                AM62X_IOPAD(0x01a8, PIN_INPUT, 0) /* (D20) MCASP0_AFSX.MCASP0_AFSX */
                AM62X_IOPAD(0x01a0, PIN_INPUT, 0) /* (E18) MCASP0_AXR0.MCASP0_AXR0 */
                AM62X_IOPAD(0x019c, PIN_OUTPUT, 0) /* (B18) MCASP0_AXR1.MCASP0_AXR1 */  
            >;
        };
  • Hi Toby,

    I have assigned the query to our expert. He will get back to you.

    Regards,

    Prashant

  • Hi Toby,

    I tested with the latest SDK (08.06.00.42) image

    https://dr-download.ti.com/software-development/software-development-kit-sdk/MD-BDCgfEXHLk/08.06.00.42/tisdk-default-image-am62xx-evm.wic.xz

    and HDMI is working fine.

    All I did was stop at u-boot prompt and do:

    > setenv name_overlays k3-am625-sk-hdmi-audio.dtbo
    > savenv
    > boot

    In order to have the audio routed to HDMI, you also have to short J24 PINs on the SK board. I was able to hear the sine wav on my hdmi tv that was connected to SK board.

    root@am62xx-evm:~# aplay --list-devices
    **** List of PLAYBACK Hardware Devices ****
    card 0: AM62xSil9022HDM [AM62x-Sil9022-HDMI], device 0: davinci-mcasp.0-i2s-hifi i2s-hifi-0 [davinci-mcasp.0-i2s-hifi i2s-hifi-0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0

    root@am62xx-evm:~# speaker-test -t sine -f 1000

    speaker-test 1.2.1

    Playback device is default
    Stream parameters are 48000Hz, S16_LE, 1 channels
    Sine wave rate is 1000.0000Hz
    Rate set to 48000Hz (requested 48000Hz)
    Buffer size range from 139 to 142663
    Period size range from 69 to 17833
    Using max buffer size 142660
    Periods = 4
    [ 148.167100] davinci-mcasp 2b10000.mcasp: Sample-rate is off by -11776 PPM
    was set period_size = 2691
    was set buffer_size = 142660
    0 - Front Left
    ^CTime per period = 2.455762
    [ 151.641420] ti-udma 485c0100.dma-controller: chan1 teardown timeout!
    root@am62xx-evm:~# 

    Let me know if this helps.

    Best Regards

    Suren

  • Thank you. I will use your method to try again on evm and my own board. In addition, I found that your method of testing audio is different from mine, but there are errors in the sampling rate: davinci-mcasp 2b10000.mcasp: Sample-rate is off by -11776 PPM, will it affect anything?

  • speaker-test-t sine-f 1000 is this used to play sound? I tested it on my board like this,

    root@am62xx-evm:~# aplay --list-devices
    **** List of PLAYBACK Hardware Devices ****
    card 0: AM62xSil9022HDM [AM62x-Sil9022-HDMI], device 0: davinci-mcasp.0-i2s-hifi i2s-hifi-0 [davinci-mcasp.0-i2s-hifi i2s-hifi-0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    root@am62xx-evm:~# aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: AM62xSil9022HDM [AM62x-Sil9022-HDMI], device 0: davinci-mcasp.0-i2s-hifi i2s-hifi-0 [davinci-mcasp.0-i2s-hifi i2s-hifi-0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    root@am62xx-evm:~# speaker-test -t sine -f 1000

    speaker-test 1.2.1

    Playback device is default
    Stream parameters are 48000Hz, S16_LE, 1 channels
    Sine wave rate is 1000.0000Hz
    Rate set to 48000Hz (requested 48000Hz)
    Buffer size range from 139 to 142663
    Period size range from 69 [ 81.431722] davinci-mcasp 2b00000.mcasp: Sample-rate is off by -11776 PPM
    to 17833
    Using max buffer size 142660
    Periods = 4
    was set period_size = 2691
    was set buffer_size = 142660
    0 - Front Left
    Time per period = 3.038787
    0 - Front Left
    [ 84.525057] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.048067
    0 - Front Left
    [ 84.573178] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.048025
    0 - Front Left
    [ 84.621206] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.047922
    0 - Front Left
    [ 84.669219] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.047909
    0 - Front Left
    [ 84.717297] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.047960
    0 - Front Left
    [ 84.765337] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.047988
    0 - Front Left
    [ 84.813485] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.047984
    0 - Front Left
    [ 84.861526] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.048005
    0 - Front Left
    [ 84.909701] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.047950
    0 - Front Left
    [ 84.957618] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.047899
    0 - Front Left
    [ 85.005883] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.048134
    0 - Front Left
    [ 85.053931] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.047948
    0 - Front Left
    [ 85.102083] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.048061
    0 - Front Left
    [ 85.150091] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.047931
    0 - Front Left
    [ 85.198280] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.048104
    0 - Front Left
    [ 85.246364] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.047950
    0 - Front Left
    [ 85.294344] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.047934
    0 - Front Left
    [ 85.342381] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.047893
    0 - Front Left
    [ 85.390500] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.048088
    0 - Front Left
    [ 85.438546] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.047902
    0 - Front Left
    [ 85.486640] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.048084
    0 - Front Left
    [ 85.534722] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.047970
    0 - Front Left
    [ 85.582774] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.047921
    0 - Front Left
    [ 85.630953] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.048074
    0 - Front Left
    [ 85.678931] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.047894
    0 - Front Left
    [ 85.727052] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.048014
    0 - Front Left
    [ 85.774999] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.047855
    0 - Front Left
    [ 85.823112] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.048034
    0 - Front Left
    [ 85.871177] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.047955
    0 - Front Left
    [ 85.919199] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.047980
    0 - Front Left
    [ 85.967289] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.047999
    0 - Front Left
    [ 86.015398] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.048042
    0 - Front Left
    [ 86.063467] davinci-mcasp 2b00000.mcasp: Transmit buffer underflow
    Time per period = 0.047899

    I'm going to try thisI'm going to try this out later on the evm board in the same way out later on the evm board in the same way

  • I downloaded the image linked above, but it was strange that the image could not be started after it was burned. The SDK image of 08.05 I used could start the development board, but I still did not hear the sound after testing according to your method

  • Hi Toby,

    I am guessing you have a GP device.

    By default the SDK 8.6 boots AM62x HS-FS device, not GP device. Please follow the instruction below to modify the SD card to boot GP SK:

    Boot SD card on AM62x GP device

    The SD card flashed using one of the methods above will boot AM62x HS-FS, but not AM62x GP devices. AM62x HS-FS and AM62x GP use different tiboot3.bin binaries. The SD card first partition has both binaries but HS-FS tiboot3.bin is the default. Using the following procedure to make GP tiboot3.bin as the default will make the SD card to boot on SK-AM62.

    Plug the flashed SD card to Linux or Windows host. The SD card first partition should have the following files.

    tiboot3-am62x-gp-evm.bin   tiboot3.bin   u-boot.img
    tiboot3-am62x-hs-evm.bin   tispl.bin     uEnv.txt
    

    where tiboot3-am62x-gp-evm.bin is the GP tiboot3.bin binary, and tiboot3.bin is the HS-FS tiboot3.bin binary.

    Now rename tiboot3.bin to something else, for example, tiboot3-am62x-hsfs.bin, and rename tiboot3-am62x-gp-evm.bin to tiboot3.bin. Then unmount/eject the SD card. It is ready to boot SK-AM62 EVM now.

    Let me know if this helps

    Best Regards

    Suren

  • Now the image in the link does boot, but I still can't hear the sound, how can I get my HDMI to play the sound, j24 I have short

    root@am62xx-evm:~# aplay --list-devices
    **** List of PLAYBACK Hardware Devices ****
    card 0: AM62xSil9022HDM [AM62x-Sil9022-HDMI], device 0: davinci-mcasp.0-i2s-hifi i2s-hifi-0 [davinci-mcasp.0-i2s-hifi i2s-hifi-0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    root@am62xx-evm:~# speaker-test -t sine -f 1000

    speaker-test 1.2.1

    Playback device is default
    Stream parameters are 48000Hz, S16_LE, 1 channels
    Sine wave rate is 1000.0000Hz
    Rate set to 48000Hz (requested 48000Hz)
    Buffer size range from 139 to 142663
    Period size range from 69 to 17833
    Using max buffer size 142660
    Periods = 4
    [ 88.984468] davinci-mcasp 2b10000.mcasp: Sample-rate is off by -11776 PPM
    was set period_size = 2691
    was set buffer_size = 142660
    0 - Front Left
    Time per period = 3.042030
    0 - Front Left
    Time per period = 0.045294
    [ 92.083769] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    0 - Front Left
    Time per period = 0.045424
    0 - Front Left
    [ 92.129273] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    Time per period = 0.045323
    [ 92.174680] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    0 - Front Left
    [ 92.220786] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    Time per period = 0.046031
    0 - Front Left
    Time per period = 0.045399
    [ 92.272325] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    0 - Front Left
    Time per period = 0.045469
    0 - Front Left
    [ 92.317907] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    Time per period = 0.045477
    [ 92.363485] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    0 - Front Left
    [ 92.409031] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    Time per period = 0.045473
    0 - Front Left
    Time per period = 0.045352
    [ 92.460312] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    0 - Front Left
    Time per period = 0.045467
    0 - Front Left
    [ 92.505859] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    Time per period = 0.045470
    [ 92.551430] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    0 - Front Left
    [ 92.596921] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    Time per period = 0.045434
    0 - Front Left
    Time per period = 0.045352
    [ 92.648307] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    0 - Front Left
    Time per period = 0.045552
    0 - Front Left
    [ 92.693928] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    Time per period = 0.045516
    [ 92.739579] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    0 - Front Left
    [ 92.785042] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    Time per period = 0.045366
    0 - Front Left
    Time per period = 0.045303
    [ 92.836217] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    0 - Front Left
    Time per period = 0.045327
    0 - Front Left
    [ 92.881635] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    Time per period = 0.045276
    [ 92.927025] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    0 - Front Left
    Time per period = 0.045379
    [ 92.972493] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    0 - Front Left
    Time per period = 0.045342
    0 - Front Left
    [ 93.017924] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    Time per period = 0.045324
    [ 93.063329] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    0 - Front Left
    [ 93.108839] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    Time per period = 0.045428
    0 - Front Left
    Time per period = 0.045348
    [ 93.160268] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    0 - Front Left
    Time per period = 0.045401
    0 - Front Left
    [ 93.205762] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    Time per period = 0.045345
    [ 93.251202] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    0 - Front Left
    [ 93.296663] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    Time per period = 0.045394
    0 - Front Left
    Time per period = 0.045341
    [ 93.348444] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    0 - Front Left
    Time per period = 0.045393
    0 - Front Left
    [ 93.393940] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    Time per period = 0.045299
    [ 93.439309] davinci-mcasp 2b10000.mcasp: Transmit buffer underflow
    0 - Front Left

  • Hi Toby,

    Can you share the revision of board you are trying out this test on?

    Did you try to add this line in uEnv.txt that is on boot partition of your SD card

     name_overlays=k3-am625-sk-hdmi-audio.dtbo

    and reboot the system and try the test again?

    With this change you don't have to use u-boot prompt to setenv name_overlays k3-am625-sk-hdmi-audio.dtbo saveenv 

    Best Regards

    Suren

  • In fact, I used the AM-62 EVM test and did not change anything, there was no sound as I did above, and I AM sure the device tree overwrite was successful

  • Hi Toby,

    The SK AM62 board that I am testing with has this sticker: PROC114E2 which says I am using revision 2 board. Can you please specify what board you are using?

    Also Are you connecting to HDMI TV with Audio speakers?

    Best Regards

    Suren

  • I am also using the second version of the revision, PROC114E2, and I have connected the hdmi screen and speaker. Can you see if there is any abnormality in the log I sent above? Will there be any impact if the sampling rate is wrong? I will test it on other HDMI screens

  • Thank you very much for using other hdmi screen after normal.

  • Toby,

    Glad that you got it working with different HDMI Screen. Yes 48KHz sample rate is supported. Please don't hesitate to contact us for further assistance.

    Best Regards

    Suren