Open main menu

DAVE Developer's Wiki β

DESK-MX6-L/Pheripherals/Audio

< DESK-MX6-L
Revision as of 14:23, 16 July 2021 by U0009 (talk | contribs) (U0009 moved page AXEL Lite SOM/DESK-MX6-L/Pheripherals/Audio to DESK-MX6-L/Pheripherals/Audio: modifica gestione DESK come prodotto a se stante)

History
Version Issue Date Notes
1.0.0 Oct 2020 First DESK release


Contents

Peripheral AudioEdit

Access to the audio interface is provided by ALSA (Advanced Linux Sound Architecture), which consists in a kernel driver and a users space library for application developers. A set of standard tools (alsa-utils) can be used for simple management of the audio codec.

Device tree configurationEdit

Here below an example of device tree configuration used on standard DAVE's kit for the AXEL Lite SOM:

From imx6qdl-sbcx-revb-common.dtsi it is possible to find the codec SSI interface configuration:

    sound {
        compatible = "fsl,imx-audio-tlv320aic31xx";
        model = "sbcx-audio-tlv320aic3100";
        ssi-controller = <&ssi1>;
        audio-codec = <&codec>;
        audio-routing =
            "Speaker", "SPK",
            "Headphone Jack", "HPL",
            "Headphone Jack", "HPR",
            "MIC1LP", "Line In",
            "MIC1LM", "Line In",
            "MIC1RP", "Mic Jack",
            "Mic Jack", "MICBIAS";
        mux-int-port = <1>;
        mux-ext-port = <3>;
        status = "okay";
    };
...
...
&audmux {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_tlv320aic3x_1>;
    status = "okay";
};

&ssi1 {
    status = "okay";
};
...
...
&iomuxc {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_hog_sbcx>;
...
...
    tlv320aic3x {
        pinctrl_tlv320aic3x_1: tlv320aic3x_codecgrp-1{
            fsl,pins = <
                MX6QDL_PAD_CSI0_DAT5__AUD3_TXD 0x130b0
                MX6QDL_PAD_CSI0_DAT6__AUD3_TXFS 0x130b0
                MX6QDL_PAD_CSI0_DAT7__AUD3_RXD 0x130b0
                MX6QDL_PAD_CSI0_DAT4__AUD3_TXC 0x130b0
                MX6QDL_PAD_GPIO_3__XTALOSC_REF_CLK_24M 0x130b0

                MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x130b0
            >;
        };
    };

Accessing the peripheralEdit

Access to the audio interface is provided by ALSA (Advanced Linux Sound Architecture), which consists in a kernel driver and a users space library for application developers. A set of standard tools alsa-utils can be used for simple management of the audio codec.

Linux messages at boot timeEdit

...
...
[    4.497470] fsl-ssi-dai 2028000.ssi: No cache defaults, reading back from HW
[    4.507593] imx-tlv320aic31xx sound: tlv320aic31xx-hifi <-> 2028000.ssi mapping ok
...
...
[    4.843623] ALSA device list:
[    4.846599]   #0: sbcx-audio-tlv320aic3100

To list the audio sound cards just use the aplay utility:

root@desk-mx6:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sbcxaudiotlv320 [sbcx-audio-tlv320aic3100], device 0: HiFi tlv320aic31xx-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
root@desk-mx6:~# 

Usage alsa-utilsEdit

root@desk-mx6:~# aplay audio8k16S.wav 
Playing WAVE 'audio8k16S.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Stereo

Additional informationEdit

Information about alsa-utils can be found on ALSA project wiki pages