Skip to content

Commit 1e4db56

Browse files
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 7b360e9 commit 1e4db56

File tree

1 file changed

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

1 file changed

+130
-7
lines changed

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

Lines changed: 130 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,123 @@ 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+
704+
**Simultaneous Playback and Recording**
705+
706+
The AM62D2-EVM supports simultaneous 8 channel audio playback and 4 channel
707+
recording operations. This allows full-duplex audio processing where audio
708+
can be captured through J1/J2 connectors via two PCM6240 ADCs while simultaneously
709+
playing audio through J3/J4 connectors via four TAD5212 DACs.
710+
711+
.. code-block:: console
712+
713+
arecord -c 4 -r 48000 -f S32_LE - | aplay -
714+
605715
Potential issues
606716
^^^^^^^^^^^^^^^^
607717

@@ -621,6 +731,17 @@ Potential issues
621731
- Try to use application which uses threads for interacting with ALSA
622732
and with the filesystem
623733

734+
.. ifconfig:: CONFIG_part_variant in ('AM62DX')
735+
736+
Following additional issues were observed for AM62D2-EVM in this release:
737+
738+
- The device requires a restart if audio is missing or plays through
739+
only one channel during simultaneous playback and recording.
740+
- Simultaneous playback and recording at 48kHz sampling rate causes
741+
underrun issues, though 44.1kHz sampling rate works without problems.
742+
- Starting playback while recording is active introduces a small glitch
743+
in the recording.
744+
624745
Additional Information
625746
^^^^^^^^^^^^^^^^^^^^^^
626747

@@ -676,3 +797,5 @@ Additional Information
676797

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

0 commit comments

Comments
 (0)