Open main menu

DAVE Developer's Wiki β

Changes

DESK-MX8M-L/Peripherals/Audio

534 bytes added, 15 April
no edit summary
!colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History
|-
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|ID#
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Issue Date
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Notes
|-
! | style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |{{oldid|17551|2023/02/24}}| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |DESK-MX8M-L 2.0.0 release|-| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededededf8fb; padding:5px; color:#000000" |{{oldid|xxxx19165|xxxx2023/08/22}}| style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000" |DESK-MX8M-L 4.0.0 release|-! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |162024/0204/202311! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000" |DESK-MX8M-L 24.01.0 release
|-
|}
Here below an example of device tree configuration used on standard DAVE's kit for MITO 8M Mini:
From <code>imx8mm-mito8mmini-sbcx.dts</code> it is possible to find the codec SSI interface configuration:
<pre>
...
...
sound {
compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
};
};
 
...
...
&sai2 {
pinctrl-0 = <&pinctrl_sai2>;
pinctrl-1 = <&pinctrl_codec_en>;
clocks = <&clk IMX8MM_CLK_SAI2_ROOT>;
assigned-clocks = <&clk IMX8MM_CLK_SAI2>;
assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
status = "okay";
};
...
&iomuxc {
...
pinctrl_codec_en: codecen {
fsl,pins = <
MX8MM_IOMUXC_SAI3_RXFS_GPIO4_IO28 0x19
>;
};
...
...
</pre>
From <code>imx8mm-mito8mmini.dtsi</code>:
<pre>
...
...
&iomuxc {
...
... pinctrl_sai2: sai2grp {
fsl,pins = <
MX8MM_IOMUXC_SAI2_MCLK_SAI2_MCLK 0xd6
</pre>
===Accessing the peripheral in MITO 8M Mini=== 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====
...
...
[ 53.259739038735] debugfsALSA device list: Directory '30020000.sai' with parent 'SBCX_TLV320' already present![ 53.267980038739] asoc-simple-card sound #0: tlv320aic31xx-hifi <-> 30020000.sai mapping okSBCX_TLV320
...
...
[ 5.454902] ALSA device list:
[ 5.454906] #0: SBCX_TLV320
</pre>
root@desk-mx8mm:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: SBCXTLV320 [SBCX_TLV320], device 0: 30020000.sai-tlv320aic31xx-hifi tlv320aic31xx-hifi-0 [30020000.sai-tlv320aic31xx-hifi tlv320aic31xx-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
====Usage [https://alsa-project.org/wiki/Documentation alsa-utils] ====
In order to unmute the speaker the <code>amixer</code> utility can be used.
<pre class="workstation-terminal">
root@desk-mx8mm:~# amixer sset "Speaker" on
Playback channels: Mono
Mono: Playback [on]
root@desk-mx8mm:~# aplay sample_22_frames.mp3 Playing raw data 'sample_22_frames.mp3' : Unsigned 8 bit, Rate 8000 Hz, Mono</pre>In order to unmute the speaker  To perform a sound, execute the command:<codepre class="workstation-terminal">alsamixerroot@desk-mx8mm:~# speaker-test sim speaker-test 1.2.6 Playback device is defaultStream parameters are 48000Hz, S16_LE, 1 channelsUsing 16 octaves of pink noiseRate set to 48000Hz (requested 48000Hz)Buffer size range from 3840 to 5760Period size range from 1920 to 1920Using max buffer size 5760Periods = 4was set period_size = 1920was set buffer_size = 5760 0 - Front Left</codepre> utility can be used.
=== Additional information ===
----
[[Category:ORCA]] [[Category:MITO 8M Mini]]
dave_user
427
edits