Skip to content

Commit 33467a0

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 a082056 commit 33467a0

File tree

1 file changed

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

1 file changed

+120
-7
lines changed

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

Lines changed: 120 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,124 @@ 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 **TAD52512 DAC** and **PCM6240 ADC** connected through
601+
**McASP2 [AXR0,1,3 and 4 for playback, AXR14 for Capture]** for audio.
602+
The board features eight TRRS 3.5mm jack, that can be used for
603+
simultaneous playback and recording.
604+
605+
The AM62D2-EVM audio subsystem provides comprehensive playback and recording
606+
capabilities through dedicated audio codecs. 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 codec devices. The PCM6240 family
632+
supports multi-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 with the appropriate device.
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 -D hw:0,1 audio_file.wav
656+
657+
**Recording Subsystem**
658+
659+
Audio recording is performed through connectors J1 and J2. The PCM6240 devices
660+
support multiple profiles 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+
The PCM6240 codec requires profile selection to choose between different
674+
I2C device addresses:
675+
676+
.. code-block:: text
677+
678+
Profile 0: PCM6240 at I2C address 0x48
679+
Profile 1: PCM6240 at I2C address 0x49
680+
681+
To select Profile 0 (I2C address 0x48):
682+
683+
.. code-block:: console
684+
685+
root@am62dxx-evm:~# amixer cset numid=17,iface=MIXER,name='pcm6240-2dev-reg PCM6240 i2c1 Profile id' 0
686+
numid=17,iface=MIXER,name='pcm6240-2dev-reg PCM6240 i2c1 Profile id'
687+
type=INTEGER,access=rw------,values=1,min=0,max=3,step=0
688+
values=0
689+
690+
To select Profile 1 (I2C address 0x49):
691+
692+
.. code-block:: console
693+
694+
root@am62dxx-evm:~# amixer cset numid=17,iface=MIXER,name='pcm6240-2dev-reg PCM6240 i2c1 Profile id' 1
695+
numid=17,iface=MIXER,name='pcm6240-2dev-reg PCM6240 i2c1 Profile id'
696+
type=INTEGER,access=rw------,values=1,min=0,max=3,step=0
697+
values=1
698+
699+
To record 4-channel audio at 48kHz sample rate with 16-bit depth:
700+
701+
.. code-block:: console
702+
703+
root@am62dxx-evm:~# arecord -c 4 -r 48000 -f S16_LE test.wav
704+
705+
**Simultaneous Playback and Recording**
706+
707+
The AM62D2-EVM supports simultaneous audio playback and recording operations.
708+
This allows full-duplex audio processing where audio can be captured through
709+
J1/J2 connectors via PCM6240 codecs while simultaneously playing audio through
710+
J3/J4 connectors via TAD5212 codecs.
711+
712+
.. code-block:: console
713+
714+
arecord -c 4 -r 48000 -f S16_LE - | aplay -
715+
605716
Potential issues
606717
^^^^^^^^^^^^^^^^
607718

@@ -676,3 +787,5 @@ Additional Information
676787

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

0 commit comments

Comments
 (0)