Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How do I make arecord work in Mainline (Opi Zero)

Featured Replies

I've already enabled audio-codec in the overlays section

I've checked https://linux-sunxi.org/Linux_mainlining_effort#Status_Matrix and saw that audio-codec is supported for h3 since 4.10

Required Information: Linux orangepizero 4.11.9-sun8i #3 SMP Sat Jul 15 00:20:53 CEST 2017 armv7l armv7l armv7l GNU/Linux

 

-->arecord -l shows this

pi@orangepizero:~$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: Codec [H3 Audio Codec], device 0: CDC PCM Codec-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
 

--> running the following command will just hang all the way till ctrl+c is entered

pi@orangepizero:~$ arecord -d 5 /tmp/test-mic.wav
Recording WAVE '/tmp/test-mic.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono

 

--> This will ask me to put in some formats

pi@orangepizero:~$ arecord -D hw:0,0 -d 10 /tmp/test-mic.wav
Recording WAVE '/tmp/test-mic.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
arecord: set_params:1233: Sample format non available
Available formats:
- S16_LE
- S32_LE
 

--> The following will result in an error

pi@orangepizero:~$ arecord -f S16_LE -D hw:0,0 -d 10 /tmp/test-mic.wav
Recording WAVE '/tmp/test-mic.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
arecord: pcm_read:2032: read error: Input/output error

 

Any one managed to enable arecord in mainline??

 

Thanks!

  • Author

Just to addon, i am using the expansion board.

The microphone works well in legacy kernel!

  • Author

Problem solved.

 

For Mainline, do this

1) alsamixer

2) press TAB (Make sure it falls to F4: CAPTURE)

3) Move to Mic1 (Use arrow keys)

4) Press SPACE and (L R Capture will appear)

Quit and you are good to go.

On 8/23/2017 at 9:33 PM, kutysam said:

Problem solved.

 

For Mainline, do this

 1) alsamixer

2) press TAB (Make sure it falls to F4: CAPTURE)

3) Move to Mic1 (Use arrow keys)

4) Press SPACE and (L R Capture will appear)

Quit and you are good to go.

Hi! Earlier I had arecord: pcm_read:2032: read error: Input/output error when I'm trying to record. After I did some modifications which you mentioned above, it worked! :) (gives no error and terminates after times up when I set a time duration). But when I'm trying to play that audio using aplay test2.wav I got an error saying that test2.wav: No such file or directory. But the file already exists. So how can I sort it out? :( Thanks! :) 

13 minutes ago, VihangaA said:

But when I'm trying to play that audio using aplay test2.wav I got an error saying that test2.wav: No such file or directory. But the file already exists. So how can I sort it out? :( Thanks! :) 

Sometimes you have to have to add ./ befor the filename even when you are in the actual directory of the file.

 

So if you did a arecord with the filename ./test2.wav then you also should use the same filename for aplay e.g.

aplay ./test2.wav

or you could give a complete path to the arecord and aplay like /temp/test2.wav

Just now, guidol said:

Sometimes you have to have to add ./ befor the filename even when you are in the actual directory of the file.

 

So if you did a arecord with the filename ./test2.wav then you also should use the same filename for aplay e.g.

aplay ./test2.wav

or you could give a complete path to the arecord and aplay like /temp/test2.wav

I tried! But it didnt work! :( But when I execute dir, it shows the file

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.