User Tools

Site Tools


Translations of this page:

en:bpi-r2pro:alsa

ALSA

output / speaker

root@bpi-r2pro:~# aplay -l                                                                                                                                     
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDMI], device 0: fe400000.i2s-i2s-hifi i2s-hifi-0 [fe400000.i2s-i2s-hifi i2s-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Analog [Analog], device 0: fe410000.i2s-rk817-hifi rk817-hifi-0 [fe410000.i2s-rk817-hifi rk817-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
root@bpi-r2pro:~# aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
lavrate
    Rate Converter Plugin Using Libav/FFmpeg Library
samplerate
    Rate Converter Plugin Using Samplerate Library
speexrate
    Rate Converter Plugin Using Speex Resampler
jack
    JACK Audio Connection Kit
oss
    Open Sound System
pulse
    PulseAudio Sound Server
upmix
    Plugin for channel upmix (4,6,8)
vdownmix
    Plugin for channel downmix (stereo) with a simple spacialization
hw:CARD=HDMI,DEV=0
    HDMI, fe400000.i2s-i2s-hifi i2s-hifi-0
    Direct hardware device without any conversions
plughw:CARD=HDMI,DEV=0
    HDMI, fe400000.i2s-i2s-hifi i2s-hifi-0
    Hardware device with all software conversions
default:CARD=HDMI
    HDMI, fe400000.i2s-i2s-hifi i2s-hifi-0
    Default Audio Device
sysdefault:CARD=HDMI
    HDMI, fe400000.i2s-i2s-hifi i2s-hifi-0
    Default Audio Device
dmix:CARD=HDMI,DEV=0
    HDMI, fe400000.i2s-i2s-hifi i2s-hifi-0
    Direct sample mixing device
usbstream:CARD=HDMI
    HDMI
    USB Stream Output
hw:CARD=Analog,DEV=0
    Analog, fe410000.i2s-rk817-hifi rk817-hifi-0
    Direct hardware device without any conversions
plughw:CARD=Analog,DEV=0
    Analog, fe410000.i2s-rk817-hifi rk817-hifi-0
    Hardware device with all software conversions
default:CARD=Analog
    Analog, fe410000.i2s-rk817-hifi rk817-hifi-0
    Default Audio Device
sysdefault:CARD=Analog
    Analog, fe410000.i2s-rk817-hifi rk817-hifi-0
    Default Audio Device
dmix:CARD=Analog,DEV=0
    Analog, fe410000.i2s-rk817-hifi rk817-hifi-0
    Direct sample mixing device
usbstream:CARD=Analog
    Analog
    USB Stream Output
root@bpi-r2pro:~#

speaker-test -Dhw:CARD=HDMI,DEV=0 -c2 -t wav
speaker-test -Dhw:CARD=Analog,DEV=0 -c2 -t wav

input / microphone

not yet working

root@bpi-r2pro:~# arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: Analog [Analog], device 0: fe410000.i2s-rk817-hifi rk817-hifi-0 [fe410000.i2s-rk817-hifi rk817-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
root@bpi-r2pro:~# arecord -L
null
    Discard all samples (playback) or generate zero samples (capture)
lavrate
    Rate Converter Plugin Using Libav/FFmpeg Library
samplerate
    Rate Converter Plugin Using Samplerate Library
speexrate
    Rate Converter Plugin Using Speex Resampler
jack
    JACK Audio Connection Kit
oss
    Open Sound System
pulse
    PulseAudio Sound Server
upmix
    Plugin for channel upmix (4,6,8)
vdownmix
    Plugin for channel downmix (stereo) with a simple spacialization
usbstream:CARD=HDMI
    HDMI
    USB Stream Output
hw:CARD=Analog,DEV=0
    Analog, fe410000.i2s-rk817-hifi rk817-hifi-0
    Direct hardware device without any conversions
plughw:CARD=Analog,DEV=0
    Analog, fe410000.i2s-rk817-hifi rk817-hifi-0
    Hardware device with all software conversions
default:CARD=Analog
    Analog, fe410000.i2s-rk817-hifi rk817-hifi-0
    Default Audio Device
sysdefault:CARD=Analog
    Analog, fe410000.i2s-rk817-hifi rk817-hifi-0
    Default Audio Device
dsnoop:CARD=Analog,DEV=0
    Analog, fe410000.i2s-rk817-hifi rk817-hifi-0
    Direct sample snooping device
usbstream:CARD=Analog
    Analog
    USB Stream Output
root@bpi-r2pro:~#

root@bpi-r2pro:~# arecord -D hw:1,0 --dump-hw-params
Recording WAVE 'stdin' : Unsigned 8 bit, Rate 8000 Hz, Mono
HW Params of device "hw:1,0":
--------------------
ACCESS:  MMAP_INTERLEAVED RW_INTERLEAVED
FORMAT:  S16_LE S24_LE S32_LE
SUBFORMAT:  STD
SAMPLE_BITS: [16 32]
FRAME_BITS: [32 64]
CHANNELS: 2
RATE: [8000 96000]
PERIOD_TIME: (333 8192000]
PERIOD_SIZE: [32 65536]
PERIOD_BYTES: [256 524288]
PERIODS: [2 4096]
BUFFER_TIME: (666 16384000]
BUFFER_SIZE: [64 131072]
BUFFER_BYTES: [256 524288]
TICK_TIME: ALL
--------------------
arecord: set_params:1343: Sample format non available
Available formats:
- S16_LE
- S24_LE
- S32_LE

this way it records, but not from headset-microphone, only onboard:

arecord -D hw:CARD=Analog,DEV=0 -c2 test.wav

play wav-file:

aplay -D hw:CARD=Analog,DEV=0 test.wav
en/bpi-r2pro/alsa.txt · Last modified: 2023/06/08 17:06 by 127.0.0.1