Skip to content

Commit bea1036

Browse files
paresh-bhagat12cshilwant
authored andcommitted
feat(linux): Add comprehensive AM62DX audio documentation
Add complete audio documentation for AM62DX including: - TAD52512 DAC and PCM6240 ADC codec support - McASP2 interface configuration with specific pin assignments - Multi-channel playback and recording capabilities - Kernel configuration paths for both codecs - Profile selection for PCM6240 I2C address switching - Example commands for playback, recording, and full-duplex operation - Hardware connector mapping (J1/J2 for recording, J3/J4 for playback) Remove outdated limitation note about static DAC configuration. Signed-off-by: Paresh Bhagat <[email protected]>
1 parent 4a90656 commit bea1036

File tree

1 file changed

+117
-7
lines changed
  • source/linux/Foundational_Components/Kernel/Kernel_Drivers

1 file changed

+117
-7
lines changed

source/linux/Foundational_Components/Kernel/Kernel_Drivers/Audio.rst

Lines changed: 117 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,6 @@ instances to a codec or an HDMI bridge.
3737

3838
Generic commands and instructions
3939
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
40-
.. ifconfig:: CONFIG_part_variant in ('AM62DX')
41-
42-
.. note::
43-
44-
Only Audio playback with static DAC confgiuration is supported.
45-
Recording feature is not supported.
46-
4740
Most of the boards have simple audio setup which means we have one
4841
sound card with one playback and one capture PCM.
4942
To list the available sound cards and PCMs for playback:
@@ -602,6 +595,112 @@ Board-specific instructions
602595
603596
To switch to using HDMI for playback you can refer to: :ref:`hdmi-audio`.
604597

598+
.. ifconfig:: CONFIG_part_variant in ('AM62DX')
599+
600+
The board uses four **TAD52512 DAC** and two **PCM6240 ADC** connected through
601+
**McASP2 [AXR0,1,3 and 4 for playback, AXR14 for Capture]** for audio.
602+
The board features eight TRS 3.5mm jack, that can be used for
603+
simultaneous 8 channel playback and 4 channel recording.
604+
605+
The AM62D2-EVM audio subsystem provides comprehensive playback and recording
606+
capabilities through dedicated DACs and ADCs. Use the following command to list
607+
available playback devices:
608+
609+
.. code-block:: console
610+
611+
root@am62dxx-evm:/opt/ltp# aplay -l
612+
**** List of PLAYBACK Hardware Devices ****
613+
card 0: AM62D2EVM [AM62D2-EVM], device 0: davinci-mcasp.0-pcmdevice-codec pcmdevice-codec-0 [davinci-mcasp.0-pcmdevice-codec pcmdevice-codec-0]
614+
Subdevices: 1/1
615+
Subdevice #0: subdevice #0
616+
card 0: AM62D2EVM [AM62D2-EVM], device 1: davinci-mcasp.0-tad5x1x-hifi-50 tad5x1x-hifi-50-1 [davinci-mcasp.0-tad5x1x-hifi-50 tad5x1x-hifi-50-1]
617+
Subdevices: 1/1
618+
Subdevice #0: subdevice #0
619+
card 0: AM62D2EVM [AM62D2-EVM], device 2: davinci-mcasp.0-tad5x1x-hifi-51 tad5x1x-hifi-51-2 [davinci-mcasp.0-tad5x1x-hifi-51 tad5x1x-hifi-51-2]
620+
Subdevices: 1/1
621+
Subdevice #0: subdevice #0
622+
card 0: AM62D2EVM [AM62D2-EVM], device 3: davinci-mcasp.0-tad5x1x-hifi-52 tad5x1x-hifi-52-3 [davinci-mcasp.0-tad5x1x-hifi-52 tad5x1x-hifi-52-3]
623+
Subdevices: 1/1
624+
Subdevice #0: subdevice #0
625+
card 0: AM62D2EVM [AM62D2-EVM], device 4: davinci-mcasp.0-tad5x1x-hifi-53 tad5x1x-hifi-53-4 [davinci-mcasp.0-tad5x1x-hifi-53 tad5x1x-hifi-53-4]
626+
Subdevices: 1/1
627+
Subdevice #0: subdevice #0
628+
629+
Audio playback is handled by four TAD5212 codec devices. These devices provide
630+
multi-channel audio output capabilities through the davinci-mcasp interface.
631+
Audio recording is managed by two PCM6240 ADC devices. Each PCM6240 ADC
632+
supports four channel audio input with configurable profiles for different
633+
I2C addresses.
634+
635+
**Playback Subsystem**
636+
637+
The TAD5212 driver is located in the kernel configuration at:
638+
639+
.. code-block:: text
640+
641+
-> Device Drivers
642+
-> Sound card support (SOUND [=y])
643+
-> Advanced Linux Sound Architecture (SND [=y])
644+
-> ALSA for SoC audio support (SND_SOC [=y])
645+
-> CODEC drivers
646+
-> Texas Instruments TAC5X1X family driver based on I2C (SND_SOC_TAC5X1X_I2C [=m])
647+
648+
To play audio on the AM62D2-EVM, use the aplay command.
649+
Audio playback is available through connectors J3 and J4.
650+
651+
Example playback command:
652+
653+
.. code-block:: console
654+
655+
root@am62dxx-evm:~# aplay audio_file.wav
656+
657+
**Recording Subsystem**
658+
659+
Audio recording is performed through connectors J1 and J2. The two PCM6240
660+
devices corresponding to different I2C addresses.
661+
662+
The PCM6240 driver is located in the kernel configuration at:
663+
664+
.. code-block:: text
665+
666+
-> Device Drivers
667+
-> Sound card support (SOUND [=y])
668+
-> Advanced Linux Sound Architecture (SND [=y])
669+
-> ALSA for SoC audio support (SND_SOC [=y])
670+
-> CODEC drivers
671+
-> Texas Instruments PCM6240 Family Audio chips based on I2C (SND_SOC_PCM6240 [=m])
672+
673+
Choose active device between two PCM6240 ADC devices:
674+
675+
.. code-block:: text
676+
677+
Device 0: PCM6240 at I2C address 0x48 (Connector-J2)
678+
Device 1: PCM6240 at I2C address 0x49 (Connector-J1)
679+
680+
To select Device 0 (I2C address 0x48) as an active device:
681+
682+
.. code-block:: console
683+
684+
root@am62dxx-evm:~# amixer cset name='pcm6240-2dev-reg PCM6240 i2c1 Profile id' 0
685+
numid=17,iface=MIXER,name='pcm6240-2dev-reg PCM6240 i2c1 Profile id'
686+
type=INTEGER,access=rw------,values=1,min=0,max=3,step=0
687+
values=0
688+
689+
To select Device 1 (I2C address 0x49) as an active device:
690+
691+
.. code-block:: console
692+
693+
root@am62dxx-evm:~# amixer cset name='pcm6240-2dev-reg PCM6240 i2c1 Profile id' 1
694+
numid=17,iface=MIXER,name='pcm6240-2dev-reg PCM6240 i2c1 Profile id'
695+
type=INTEGER,access=rw------,values=1,min=0,max=3,step=0
696+
values=1
697+
698+
To record 4-channel audio at 48kHz sample rate with 32-bit depth:
699+
700+
.. code-block:: console
701+
702+
root@am62dxx-evm:~# arecord -c 4 -r 48000 -f S32_LE test.wav
703+
605704
Potential issues
606705
^^^^^^^^^^^^^^^^
607706

@@ -621,6 +720,15 @@ Potential issues
621720
- Try to use application which uses threads for interacting with ALSA
622721
and with the filesystem
623722

723+
.. ifconfig:: CONFIG_part_variant in ('AM62DX')
724+
725+
Following additional issues were observed for AM62D2-EVM in this release:
726+
727+
- The device requires a restart if audio is missing or plays through
728+
only one channel during simultaneous playback and recording.
729+
- Starting playback while recording is active introduces a small glitch
730+
in the recording.
731+
624732
Additional Information
625733
^^^^^^^^^^^^^^^^^^^^^^
626734

@@ -676,3 +784,5 @@ Additional Information
676784

677785
#. `TAD52512 - High-performance stereo audio DAC
678786
<https://www.ti.com/lit/ds/symlink/tad5212.pdf>`__
787+
#. `PCM6240 - Automotive, 4-channel audio ADC
788+
<https://www.ti.com/lit/ds/symlink/pcm6240-q1.pdf>`__

0 commit comments

Comments
 (0)