Fail to record sometimes, error message is :arecord: set_params:1403: Unable to install hw params:

sometimes, I found I can’t record by the respeaker with the command recommended by offical.
At the same time, I can’t record by Java program as well.

After I Unplug and plug into USB interface, everything is back to normal.

My OS is CentOS 7 x64, Here is the detail command display.

[root@dhcp logs]# arecord -D plughw:1,0 -f cd test.wav
Recording WAVE ‘test.wav’ : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
arecord: set_params:1403: Unable to install hw params:
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 44100
PERIOD_TIME: 125000
PERIOD_SIZE: (5512 5513)
PERIOD_BYTES: (22048 22052)
PERIODS: (3 5)
BUFFER_TIME: 500000
BUFFER_SIZE: 22050
BUFFER_BYTES: 88200
TICK_TIME: 0

[root@dhcp logs]# 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
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: 16000
PERIOD_TIME: [2000 16384000]
PERIOD_SIZE: [32 262144]
PERIOD_BYTES: [64 524288]
PERIODS: [2 1024]
BUFFER_TIME: [4000 32768000]
BUFFER_SIZE: [64 524288]
BUFFER_BYTES: [128 1048576]
TICK_TIME: ALL

arecord: set_params:1339: Sample format non available
Available formats:

  • S16_LE