This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
resources:tools-software:linuxdsp:docs:quickstartguide:sharc-alsa-example [15 Oct 2021 12:29] – created Henrik Mau | resources:tools-software:linuxdsp:docs:quickstartguide:sharc-alsa-example [02 Nov 2021 16:10] – Added photo of audio connection Henrik Mau | ||
---|---|---|---|
Line 10: | Line 10: | ||
< | < | ||
- | echo 2Channel-SC594.ldr | + | # echo 2Channel-SC594.ldr |
- | echo start > / | + | # echo start > / |
</ | </ | ||
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. |
+ | {{: | ||
Play back the audio sample file stored in / | Play back the audio sample file stored in / | ||
< | < | ||
- | aplay / | + | # aplay / |
</ | </ | ||
Line 32: | Line 34: | ||
< | < | ||
- | ./rpmsg-bind-chardev -d virtio0.sharc-audioweaver.-1.201 -a 60 | + | # rpmsg-bind-chardev -d virtio0.sharc-audioweaver.-1.201 -a 60 |
+ | </ | ||
+ | |||
+ | Once the binding has been created a character device /dev/rpmsg0 is available and will accept commands with the syntax < | ||
+ | < | ||
+ | # echo 0 800.0 > /dev/rpmsg0 | ||
</ | </ | ||
+ | Similarly to add a 500Hz tone to channel 1 (Right) enter the following command: | ||
< | < | ||
- | echo 0 800.0 > /dev/rpmsg0 | + | # echo 1 500.0 > /dev/rpmsg0 |
</ | </ | ||
+ | When running aplay again you will hear a dual tone frequency on both channels. | ||
< | < | ||
- | echo 1 500.0 > /dev/rpmsg0 | + | # aplay /usr/share/ |
</ | </ | ||