Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
resources:tools-software:linuxdsp:docs:quickstartguide:sharc-alsa-example [15 Oct 2021 12:29] – created Henrik Mauresources:tools-software:linuxdsp:docs:quickstartguide:sharc-alsa-example [02 Nov 2021 16:10] – Added photo of audio connection Henrik Mau
Line 10: Line 10:
  
 <code> <code>
-echo 2Channel-SC594.ldr  > /sys/class/remoteproc/remoteproc0/firmware +echo 2Channel-SC594.ldr  > /sys/class/remoteproc/remoteproc0/firmware 
-echo start > /sys/class/remoteproc/remoteproc0/state+echo start > /sys/class/remoteproc/remoteproc0/state
 </code> </code>
  
Line 18: Line 18:
 \\ \\
 ==== Playing Audio ==== ==== Playing Audio ====
-The audio from the SHARC is routed to DAC1/2. Connect a set of speakers to J17 also labelled as DAC1/2.+  * The audio from the SHARC is routed to DAC1/2. Connect a set of speakers to J17 also labelled as DAC1/2. 
 +{{:resources:tools-software:linuxdsp:docs:quickstartguide:adsp-sc594-som-ezkit-alsa-example.jpg?400|}} 
 Play back the audio sample file stored in /usr/share/sounds/alsa/ Play back the audio sample file stored in /usr/share/sounds/alsa/
  
 <code> <code>
-aplay /usr/share/sounds/alsa/2Ch_L440_R200_48kHz_16bit_6s.wav+aplay /usr/share/sounds/alsa/2Ch_L440_R200_48kHz_16bit_6s.wav
 </code> </code>
  
Line 32: Line 34:
  
 <code> <code>
-./rpmsg-bind-chardev -d virtio0.sharc-audioweaver.-1.201 -a 60+rpmsg-bind-chardev -d virtio0.sharc-audioweaver.-1.201 -a 60 
 +</code> 
 + 
 +Once the binding has been created a character device /dev/rpmsg0 is available and will accept commands with the syntax <channel> <frequency> To add a 800Hz tone to channel 0 (Left) enter the following at the command line: 
 +<code> 
 +# echo 0 800.0 > /dev/rpmsg0
 </code> </code>
  
 +Similarly to add a 500Hz tone to channel 1 (Right) enter the following command:
 <code> <code>
-echo 0 800.0 > /dev/rpmsg0+echo 1 500.0 > /dev/rpmsg0
 </code> </code>
  
 +When running aplay again you will hear a dual tone frequency on both channels.  Left channel will contain 440Hz + 800Hz whereas the right channel will contain 200Hz + 500Hz.
 <code> <code>
-echo 1 500.0 > /dev/rpmsg0+# aplay /usr/share/sounds/alsa/2Ch_L440_R200_48kHz_16bit_6s.wav
 </code> </code>
  
resources/tools-software/linuxdsp/docs/quickstartguide/sharc-alsa-example.txt · Last modified: 14 Sep 2023 10:12 by Vasileios Bimpikas