Please select To the mobile version | Continue to access the desktop computer version

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
View: 936|Reply: 4

Orange pi zero2 audio recording

[Copy link]

1

Threads

3

Posts

19

Credits

Novice

Rank: 1

Credits
19
Post time 2021-1-3 02:32:14 | Show all posts |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

20

Posts

87

Credits

Registered member

Rank: 2

Credits
87
Post time 2021-1-13 07:13:02 | Show all posts
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 the 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 the Code

1

Threads

3

Posts

19

Credits

Novice

Rank: 1

Credits
19
 Author| Post time 2021-1-15 02:56:20 | Show all posts
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

20

Posts

87

Credits

Registered member

Rank: 2

Credits
87
Post time 2021-1-15 05:29:41 | Show all posts
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| Post time 2021-2-1 13:03:30 | Show all posts
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
You have to log in before you can reply Login | Register

Points Rules

Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

2021-4-22 01:18 GMT+8 , Processed in 0.028061 second(s), 22 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list