kutysam 8 Posted July 15, 2017 Share Posted July 15, 2017 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! Link to post Share on other sites
kutysam 8 Posted July 15, 2017 Author Share Posted July 15, 2017 Just to addon, i am using the expansion board. The microphone works well in legacy kernel! Link to post Share on other sites
kutysam 8 Posted August 23, 2017 Author Share Posted August 23, 2017 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. 1 Link to post Share on other sites
VihangaA 2 Posted May 15, 2018 Share Posted May 15, 2018 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! Link to post Share on other sites
guidol 266 Posted May 15, 2018 Share Posted May 15, 2018 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 Link to post Share on other sites
VihangaA 2 Posted May 15, 2018 Share Posted May 15, 2018 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 Link to post Share on other sites
Recommended Posts