Jump to content

Orange Pi Zero arecord input/output error


hal8k

Recommended Posts

Armbianmonitor:

I'm running  Armbian  Bionic on OPizero.

 

I have a problem using arecord on the mic input. Audio codecs have been enabled but when I run following command

to record  I get a pcm read error

 

 arecord -D plughw:0,0 -d5 -f cd test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
arecord: pcm_read:2103: read error: Input/output error

There is no recording and file is just 44 bytes.


pi@orangepizero:~$ ls -l test.wav
-rw-r--r-- 1 pi pi 44 Jan  6 20:44 test.wav

 

The output from this command never finishes after 3 seconds and I have to use ctrl+c to breakout:

 

arecord -vvvv -d 3 /dev/null
Recording WAVE '/dev/null' : Unsigned 8 bit, Rate 8000 Hz, Mono
Plug PCM: Linear conversion PCM (S16_LE)
Its setup is:
  stream       : CAPTURE
  access       : RW_INTERLEAVED
  format       : U8
  subformat    : STD
  channels     : 1
  rate         : 8000
  exact rate   : 8000 (8000/1)
  msbits       : 8
  buffer_size  : 4000
  period_size  : 1000
  period_time  : 125000
  tstamp_mode  : NONE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 1000
  period_event : 0
  start_threshold  : 1
  stop_threshold   : 4000
  silence_threshold: 0
  silence_size : 0
  boundary     : 2097152000
Slave: Hardware PCM card 0 'H3 Audio Codec' device 0 subdevice 0
Its setup is:
  stream       : CAPTURE
  access       : MMAP_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 1
  rate         : 8000
  exact rate   : 8000 (8000/1)
  msbits       : 16
  buffer_size  : 4000
  period_size  : 1000
  period_time  : 125000
  tstamp_mode  : NONE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 1000
  period_event : 0
  start_threshold  : 1
  stop_threshold   : 4000
  silence_threshold: 0
  silence_size : 0
  boundary     : 2097152000
  appl_ptr     : 0
  hw_ptr       : 0
^CAborted by signal Interrupt...
arecord: pcm_read:2103: read error: Interrupted system call

The commands work fine on Linux <Mint 19.3 (built on Ubuntu bionic). I first installed Armbian Buster but had same problem,

which is why I tried Armbian Bionic

After some digging I came up with this bug report:

https://bugzilla.redhat.com/show_bug.cgi?id=472469

 

I'm out of ideas now,.

I'm using OPiZero headless, no desktop and login via SSH.

 

ArmbianMonitor logs uploaded at:

https://bugzilla.redhat.com/show_bug.cgi?id=472469

 

Thanks in advance for any help with this.

Link to comment
Share on other sites

1 minute ago, hal8k said:

The commands work fine on Linux <Mint 19.3 (built on Ubuntu bionic)

 

I also use Linux Mint for my desktop, but on ARM SBC it is totally useless. Like most of other distros.

 

2 minutes ago, hal8k said:

I first installed Armbian Buster but had same problem,which is why I tried Armbian Bionic


The cheap component (common scripts and apps) obviously doesn't matter. https://docs.armbian.com/#what-is-armbian Sadly for the expensive part I don't have any direct answers how to fix since that require research. Don't know, never used audio input on modern kernel, but i think it should be supported. Which means its probably just a device / tree hw misconfiguration or ... Features that aren't wired on boards (board doesn't have audio in) are disabled by default. Now start searching on armbian - you will find answer here or within kernel source tree ... read error: Input/output error is way too generic error that you can catch up on to.

Link to comment
Share on other sites

Hi Igor,

Thanks I solved it. Turns out the pcm.read error occurs when you try to record (read) from an input that is disabled

in alsamixer.

I cant find the post I followed, but solution was  alsamixer F4 for capture and then space var on Microphone to enable

input.  For some reason I am limited to one post/day sorry for delay. Will try and append solved to title

Link to comment
Share on other sites

1 hour ago, hal8k said:

Thanks I solved it. Turns out the pcm.read error occurs when you try to record (read) from an input that is disabled

in alsamixer.


So something even more generic than I thought. Thanks for clarifying.

 

1 hour ago, hal8k said:

For some reason I am limited to one post/day sorry for delay. Will try and append solved to title


All new users are limited for up to one week. One is for limiting spam - robots are getting better and better and second that newcomers doesn't start to ask too many (repeated and personal) questions at once without doing a forum search and RTFM. Active creative community has to be protected from those "customers" (over)demands. This hopefully prevents forum downgrade into free technical support service ... with some collateral damages.

 

Anyway, you are no longer limited.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines