SPDIF out (SBC-i.MX51)

Aus BECOM Systems Support
Version vom 22. August 2023, 20:35 Uhr von en>Peter (1 Version importiert)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Zur Navigation springen Zur Suche springen

The i.MX51 is able to output audio signals via the SPDIF line.

See the Hardware User Manual for the location of the SPDIF signal.

Linux kernel configuration

Device Drivers  --->
  <*> Sound card support  --->
    <*>   Advanced Linux Sound Architecture  --->
      <*>   OSS Mixer API
      <*>   OSS PCM (digital audio) API
      [*]     OSS PCM (digital audio) API - Include plugin system
      [*]   Support old ALSA API
      [*]   Verbose procfs contents
      [*]   ARM sound devices  --->
        <M>   MXC SPDIF sound card spport

Test in Linux

  • Load the appropriate kernel module
root@sbc-imx51:~# modprobe snd-spdif
MXC spdif support initialized
root@sbc-imx51:~# 
  • List available sound cards and PCMs:
root@sbc-imx51:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: imx3stack [imx-3stack], device 0: SGTL5000 SGTL5000-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: TXRX [MXC SPDIF TX/RX], device 0: MXC_SPDIF [MXC_SPDIF]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
root@sbc-imx51:~# 

You can see that there is a second card "MXC SPDIF".

root@sbc-imx51:~# aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=imx3stack
    imx-3stack, 
    Default Audio Device
default:CARD=TXRX
    MXC SPDIF TX/RX, MXC_SPDIF
    Default Audio Device
root@sbc-imx51:~#
  • Play sound file on SPDIF:
root@sbc-imx51:~# aplay -D default:CARD=TXRX sample.wav
Playing WAVE 'sample.wav' : Unsigned 8 bit, Rate 8000 Hz, Stereo
root@sbc-imx51:~#