View: 9039|Reply: 5

Orange pi zero2 audio recording

[Copy link]

1

threads

3

posts

19

credits

Novice

Rank: 1

credits
19
Published in 2021-1-3 02:32:14 | Show all floors |Read mode
Hello.  I have an orange pi zero 2 running the ubuntu 18.04 (bionic) distribution from the orange pi web site.  I can play audio back with "aplay" using the built in audio codec and the expansion board that brings out the audio jack.  Unfortunately, I cannot record: running "arecord /tmp/foo" claims to be recording at 8 kHz mono but then just hangs, never generating any output into /tmp/foo other than gthe 44 byte header.  "arecord -d 5 /tmp/foo" (which should record for 5 seconds) just hangs.

Same behavior whether I am running as normal user or as root.

arecord -l output is below if it's helpful.

Thanks for any help you can provide!

Phil

phil@orangepizero2:~$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: audiocodec [audiocodec], device 0: SUNXI-CODEC sun50iw9-codec-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: sndahub [sndahub], device 0: Media Stream sunxi-ahub-aif1-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: sndahub [sndahub], device 1: System Stream sunxi-ahub-aif2-1 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: sndahub [sndahub], device 2: Accompany Stream sunxi-ahub-aif3-2 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0


1

threads

24

posts

105

credits

Registered member

Rank: 2

credits
105
Published in 2021-1-13 07:13:02 | Show all floors
Hello, what you have to do is enable the  line inputs and microphone from alsamixer.

Start  alsamixer from a terminal .
Press F4 for capture.
Use cursor keys and go left to Mic inputs.
Press space bar to enable them
Go to Mic control and adjust inputs.
Save and exit alsamixer.

Use this command to test:
  1. arecord -D plughw:0 -d 4   /dev/null
Copy code


If all goes well it will exit in 4 seconds. To record from microphone try

  1. arecord -D plughw:0  -d 5 -f cd test.wav
Copy code

1

threads

3

posts

19

credits

Novice

Rank: 1

credits
19
 Author| Published in 2021-1-15 02:56:20 | Show all floors
Thanks @hal8000b!  Unfortunately, when I use alxamixer (with card "audiocodec"), hitting F4 does not give me microphone as a choice.  The only choices listed are "FMIN to output mixer gain control", "LINEIN to output mixer gain control", "LINEOUT volume", "digital volume".  Space bar doesn't do anything on any of these.  This is true running as normal user or as root.  Thoughts?  Thank you!

1

threads

24

posts

105

credits

Registered member

Rank: 2

credits
105
Published in 2021-1-15 05:29:41 | Show all floors
Hi, I  just went over the specs for Orange Pi Zero2
http://www.orangepi.org/Orange%20Pi%20Zero2/

Unfortunately does not mention microphone.
So I checked the H616 datasheet:
https://linux-sunxi.org/images/3/30/H616_Datasheet_V1.0.pdf

In section 2.8 Audio Sybsystem, that chip has two ADC channels and one audio
output.

This means you are not going to be able to record sound.

With thr Orange Pi Zero, the externa expansion board contains a good microphone
and on Armbian, there is a menu utility that lets you load the  audio modules.

I dont think there is any way to record to Orange pi Zero2, sorry about that.

1

threads

3

posts

19

credits

Novice

Rank: 1

credits
19
 Author| Published in 2021-2-1 13:03:30 | Show all floors
Hi, @hal000b.  Thanks for your response. Bummer.  I can always use a USB audio interface, so not the end of the world.  Thank you for your help!  --phil

1

threads

6

posts

29

credits

Novice

Rank: 1

credits
29
Published in 2021-5-25 09:09:08 | Show all floors
When I had a trouble making a record, it didn't work first time.   I remember that I solve it using "volume control" at the top right corner from the GUI, keep changing the recording source for record until it works.
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list