DART-SD410 Debian Recording and Playing sound file

From Variscite Wiki
Revision as of 13:44, 23 February 2017 by Leonid (talk | contribs) (Created page with "= 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 use...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.

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

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

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