> For the complete documentation index, see [llms.txt](https://amobile-solutions.gitbook.io/yocto-developer-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://amobile-solutions.gitbook.io/yocto-developer-guide/test-and-use-the-interface/audio/audio-sd510.md).

# Audio - SD510

## Get information on the Sound Cards

Installed devices:

```
root@sd510:~# cat /proc/asound/cards
 0 [mt8370evk      ]: mt8370-evk - mt8370-evk
                      mt8370-evk
```

List device names for playback:

```
root@sd510:~# aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
sysdefault:CARD=mt8370evk
    mt8370-evk,
    Default Audio Device
```

## Audio Playback from speaker

Get speaker volume

```
amixer -c 0 cget name='Speaker Driver Playback Volume'
```

Set speaker volume, range : (Maximum) 0 - 255 (Minimum), default: 104

```
amixer -c 0 cset name='Speaker Driver Playback Volume' <Volume>
```

Play audio:

```
aplay /usr/share/sounds/alsa/Front_Center.wav
```

Example:

```
root@sd510:~# amixer -c 0 cset name='Speaker Driver Playback Volume' 90
numid=345,iface=MIXER,name='Speaker Driver Playback Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=255,step=0
  : values=90
  | dBscale-min=-103.50dB,step=0.50dB,mute=0

root@sd510:~# root@sd510:~# aplay /usr/share/sounds/alsa/Front_Center.wav
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
```

## Audio Record from DMIC

Record audio for 5 seconds into file sample.wav

```
arecord -r 48000 -f S32_LE -d 5 sample.wav
```

Play the recorded file

```
aplay sample.wav 
```

Example:

```
root@sd510:~# arecord -r 48000 -f S32_LE -d 5 sample.wav
Recording WAVE 'sample.wav' : Signed 32 bit Little Endian, Rate 48000 Hz, Mono
root@sd510:~# aplay sample.wav
Playing WAVE 'sample.wav' : Signed 32 bit Little Endian, Rate 48000 Hz, Mono
root@sd510:~#
```
