DART-SD410 Debian Recording and Playing sound file

From Variscite Wiki

1 Recording and Playing sound file

To record simple wav file from the headset use the following scenario:

  • Plug in standard cellphone headset into Headset Jack (J15) We used Samsung headset.

1.1 Playing to headset (J15)

# amixer -c 0 cset iface=MIXER,name='RX1 MIX1 INP1' 'RX1'
# amixer -c 0 cset iface=MIXER,name='RX2 MIX1 INP1' 'RX2'
# amixer -c 0 cset iface=MIXER,name='RDAC2 MUX' 'RX2'
# amixer -c 0 cset iface=MIXER,name='HPHL' 1
# amixer -c 0 cset iface=MIXER,name='HPHR' 1
# amixer -c 0 cset iface=MIXER,name='RX1 Digital Volume' 100
# amixer -c 0 cset iface=MIXER,name='RX2 Digital Volume' 100
# aplay /usr/share/sounds/alsa/Front_Center.wav

1.2 Playing to speaker (J19)

To test the sound any 4‎Ω or 8‎Ω speaker should be connected to J19. Rectangle Pad is Pad #1 and it is positive.

# amixer -c 0 cset iface=MIXER,name='RX3 MIX1 INP1' 'RX1'
# amixer -c 0 cset iface=MIXER,name='SPK DAC Switch' 1
# aplay /usr/share/sounds/alsa/Front_Center.wav

1.3 Recording from headset (J15)

# amixer -c 0 cset iface=MIXER,name='DEC1 MUX' 'ADC2'
# amixer -c 0 cset iface=MIXER,name='ADC2 Volume' 70
# amixer -c 0 cset iface=MIXER,name='ADC2 MUX' 'INP2'
# arecord -D plughw:0,1 -r 16000 -f S16_LE test.wav

You can play the text.wav file

# aplay test.wav