Cannot access microphone with 4.4r3

瀏覽次數:302 次
跳到第一則未讀訊息

Deepak Mishra

未讀,
2015年8月16日 中午12:06:112015/8/16
收件者:Android-x86
Hello everyone ! I am new to this group, and hoping to learn some Android internals.

I built x86 4.4 r3 on Ubuntu 14.04 and tried loading image on my Macbook Pro and Dell Inspiron machines (not yet installed, over live USB) - camera worked on both machines, but not microphone. I even tried a USB camera, without success.

I wrote a quick Android app to test microphone availability, and the SDK says microphone is available. But when I record and replay, I hear no sound (I have made sure speakers are working fine).

I am very new to Android development - please pardon me if I skipped some basic research.

Miker1029

未讀,
2015年8月16日 下午1:10:102015/8/16
收件者:andro...@googlegroups.com

Try checking init.sh in etc system files. My mic was set to 3. And was all static. Had to set it to 2.

Mike

Sent with AquaMail for Android
http://www.aqua-mail.com

--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at http://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.

Deepak Mishra

未讀,
2015年9月1日 晚上10:12:312015/9/1
收件者:Android-x86
I have exhausted pretty much all options I could think of. I tried editing the /system/etc/init.sh files with community-wide suggested approaches. I also experimented with the alsa_aplay parameters. Nothing works. When I run my speech recording app, it crashes on MediaRecorder.start() saying start() failed.

Not only USB microphone, headphone microphone does not work either. Speakers are working fine though.
Here is my init.sh :
alsa_ctl init $c
                        alsa_amixer -c $c set Master on
                        alsa_amixer -c $c set Master 127
                        alsa_amixer -c $c set Headphone on
                        alsa_amixer -c $c set Headphone 127
                        alsa_amixer -c $c set Speaker 127
                        alsa_amixer -c $c set Capture 127
                        alsa_amixer -c $c set Capture 'Rear Mic'
                        alsa_amixer -c $c set Capture cap
                        alsa_amixer -c $c set PCM 100 unmute
                        alsa_amixer -c $c set 'Rear Mic Boost' 2
                        alsa_amixer -c $c set 'Rear Mic Boost' 2

For USB webcam, I have tried 'Mic' and 'Internal Mic', with no luck.

Here are the cards available (My USB webcam is interface #1 C920)

uid=0(root) gid=0(root)@x86:/ # cat /proc/asound/cards
  0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xfe6dc000 irq 34
 1 [C920           ]: USB-Audio - HD Pro Webcam C920
                      HD Pro Webcam C920 at usb-0000:00:1a.7-3, high speed
 2 [USB            ]: USB-Audio - DELL S2340T USB
                      DisplayLink DELL S2340T USB at usb-0000:00:1a.7-4.2, high speed


Can someone please help me use the headphone microphones ? I don't think USB is going to work - although the USB Audio Recorder app from Play Store seems to work, but it's of no use to me for my apps.

Thanks !

Chih-Wei Huang

未讀,
2015年9月3日 中午12:16:512015/9/3
收件者:Android-x86
2015-09-02 10:12 GMT+08:00 Deepak Mishra <dux.d...@gmail.com>:
> I have exhausted pretty much all options I could think of. I tried editing
> the /system/etc/init.sh files with community-wide suggested approaches. I
> also experimented with the alsa_aplay parameters. Nothing works. When I run
> my speech recording app, it crashes on MediaRecorder.start() saying start()
> failed.
>
...
>
> For USB webcam, I have tried 'Mic' and 'Internal Mic', with no luck.
>
> Here are the cards available (My USB webcam is interface #1 C920)
>
> uid=0(root) gid=0(root)@x86:/ # cat /proc/asound/cards
> 0 [Intel ]: HDA-Intel - HDA Intel
> HDA Intel at 0xfe6dc000 irq 34
> 1 [C920 ]: USB-Audio - HD Pro Webcam C920
> HD Pro Webcam C920 at usb-0000:00:1a.7-3, high speed
> 2 [USB ]: USB-Audio - DELL S2340T USB
> DisplayLink DELL S2340T USB at usb-0000:00:1a.7-4.2,
> high speed

Does it work in a normal linux distro like ubuntu or fedora?
If yes, you may try to save the audio state
and restore it on android-x86, say

alsactl store 0 -f audio.state

Copy audio.state to android-x86 and try

alsa_ctl -f audio.state restore 0

Deepak Mishra

未讀,
2015年9月4日 凌晨12:44:192015/9/4
收件者:Android-x86
Thanks for your reply !
I did what you suggested, and I am attaching the file which works on Ubuntu (14.04). When I restored the audio.state file on Android, I got the following error :

Found hardware: "HDA-Intel" "Analog Devices AD1984A" "HDA:11d4194a,10280420,00100400" "0x1028" "0x0420"
Hardware is initialized using a generic method
alsa_ctl: set_control:1267: failed to obtain info for control #29 (No such file or directory)
alsa_ctl: set_control:1267: failed to obtain info for control #30 (No such file or directory)

So I removed the controls #29 and #30.
Now, when I record anything, I just get noise (which varies with input amplitude). But I still don't hear the recorded sound. This is better, as until now I was unable to hear any sound output.
I am attaching the audio.state file.
BTW, for recording sound I am using the Messenger app and Skype. Please let me know if you think they are not reliable. I also coded an app to try with different AudioSources, but it crashes because MediaRecorder fails.

Thanks !
audio.state

Mike

未讀,
2015年9月4日 下午2:23:432015/9/4
收件者:andro...@googlegroups.com

Do you have an Internal mic???  This is my Intel Settings for ALSA, and if your getting errors "Starting" the RECORD it might just not be Compatible with X86, I've had that Issue Before,  Here's my ALSA, And note this is for RC2 (4.4), But I don't see that there should be much difference.....

case "$PRODUCT" in
VirtualBox*|Bochs*)
[ -d /proc/asound/card0 ] || modprobe snd-sb16 isapnp=0 irq=5
;;
*)
;;
esac
[ -d /proc/asound/card0 ] || modprobe snd-dummy

for c in $(grep '\[.*\]' /proc/asound/cards | awk '{print $1}'); do


alsa_ctl init $c
alsa_amixer -c $c set Master on
alsa_amixer -c $c set Master 127
alsa_amixer -c $c set Headphone on
alsa_amixer -c $c set Headphone 127
alsa_amixer -c $c set Speaker 127
alsa_amixer -c $c set Capture 127

alsa_amixer -c $c set Capture cap
alsa_amixer -c $c set PCM 100 unmute

alsa_amixer -c $c set 'Mic Boost' 2
alsa_amixer -c $c set 'Internal Mic Boost' 2
done
}

I noticed that in your ALSA Config You didn't have Internal Mic, On Mine Internal Is Build in, and "mic" is the Jack...

Mike (mic?) lol

Sent with AquaMail for Android
http://www.aqua-mail.com

Deepak Mishra

未讀,
2015年9月4日 下午6:50:022015/9/4
收件者:Android-x86
Thanks Mike... I do have an internal mic, not sure why is it not showing up. I tested on Ubuntu after plugging out the line mic and USB webcam, and I was able to record (albeit the recorded sound was super low, even after I had set mic volume and boost high).
On x86, the Messaging app refuses to record as soon as I begin recording. So looks like mic is not compatible with x86 as you suggested.

So taking Chih-Wei's suggestion, I dumped the audio state from Ubuntu (ubuntu_inbuilt_mic_audio_state.txt ), and tried restoring on x86 (x86_inbuilt_mic_audio_state.txt). Restoring gave me an error :
alsa_ctl: save_state: 1534: cannot find soundcard '0'...

I am also attaching cards, version, pcm and device information from both Ubuntu (ubuntu_asound_info.txt) and x86 (x86_asound_info.tx) for the same machine. 

Assuming my inbuilt mic is not compatible with x86, how do I check whether or not rest of the external microphones (line and USB) are compatible ? I had this presumption that alsa_mixer gives a list of all compatible interfaces. Would greatly appreciate if someone can point me towards some reading material.

Thanks !
ubuntu_asound_info.txt
ubuntu_inbuilt_mic_audio.state.txt
x86_asound_info.txt
x86_inbuilt_mic_audio.state.txt

محمد شہریار منور

未讀,
2015年10月15日 上午11:48:162015/10/15
收件者:Android-x86
Guys if you are not able to accees your microphone just open init.sh in /etc.Scroll down and just remove boost from Internal Mic Boost and reboot it will work In shaa Allah
回覆所有人
回覆作者
轉寄
0 則新訊息