DESK-MX6-L/Pheripherals/Audio
History | |||
---|---|---|---|
ID# | Issue Date | Notes | |
14/07/2021 | First DESK release | ||
03/03/2022 | DESK 3.0.0 release |
Contents
Peripheral Audio[edit | edit source]
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 configuration[edit | edit source]
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 &pinctrl_hog_sbcx_one_piece>; ... ... 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 peripheral[edit | edit source]
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 time[edit | edit source]
... ... [ 5.071782] fsl-ssi-dai 2028000.ssi: No cache defaults, reading back from HW ... ... [ 5.624473] ALSA device list: [ 5.635031] #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 [HiFi tlv320aic31xx-hifi-0] Subdevices: 1/1 Subdevice #0: subdevice #0
Usage alsa-utils[edit | edit source]
root@desk-mx6:~# aplay /home/root/rootfs/unit_tests/ASRC/audio8k16S.wav Playing WAVE '/home/root/rootfs/unit_tests/ASRC/audio8k16S.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Stereo
In order to unmute the speaker the alsamixer
utility can be used.
Additional information[edit | edit source]
Information about alsa-utils can be found on ALSA project wiki pages