Help Seting Default Microphone

kalic

New member
VC
26
How can I set my Internal Mic(built-in laptop mic just to be clear) as my default recording device (input device), even when we headphones are plugged in.
I would like the answer related to changing the init.sh file. I can't edit using FX files (tells me to remount file as r/w). I am using darkmatter 4.7 beta-1. @HMTheBoy154
 
Last edited:

HMTheBoy154

Supreme
Moderator
Blog Author
How can I set my Internal Mic(built-in laptop mic just to be clear) as my default recording device (input device), even when we headphones are plugged in.
I would like the answer related to changing the init.sh file. I can't edit using FX files (tells me to remount file as r/w). I am using darkmatter 4.7 beta-1. @HMTheBoy154
On FX when you press System(Root), go into System and you will see a lock on the top right, press that to mount System as R/W.
Also I'd recommend alsamixer more because we can easily see your card configuration so that we can easily modify it instead of putting random commands on init.sh without knowing what they do

As you can see for example , Janguar00212 show you this command `alsa_amixer -c $c set 'Input Source',0 '*'` and saying replace the * with your desired source. But you might not even know your desired source name so you will need a tool to look for it. That's why we brought alsamixer to Darkmatter.
1617726046610.png
 

kalic

New member
VC
26
On FX when you press System(Root), go into System and you will see a lock on the top right, press that to mount System as R/W.
Also I'd recommend alsamixer more because we can easily see your card configuration so that we can easily modify it instead of putting random commands on init.sh without knowing what they do

As you can see for example , Janguar00212 show you this command `alsa_amixer -c $c set 'Input Source',0 '*'` and saying replace the * with your desired source. But you might not even know your desired source name so you will need a tool to look for it. That's why we brought alsamixer to Darkmatter.
Thank you So Much, I do personally know the overhead of messing with system files, but I feel there is no other options. but for some reason, My system detecting Earphone_Mic and Changes Alsa Setting accordingly. It happens over Reboot . I tried adjusting Alsa_mixer and The Input_source by default goes to earphone_mic when I plug in the earphones(I know it should do that), so unless I have a option in Alsa_Mixer to make my internal Mic default I can't do anything. Also Why this trouble. My Ear_phone mic doesn't work. (I am honestly ssuper broke.) So I gotta work my ass around problems :)
Thank you so much @HMTheBoy154 @Jaguar000212
I am putting a SS to give you an Idea of my Alsa_mixer setting..
Screenshot_20210409-085646.jpg
 

kalic

New member
VC
26
So I have created a Back up and ...
Screenshot_20210410-103613.jpg


at the end you can see what I have done. this doesn't feel right at all. I expected to see audio function but, it is not there. But Imma reboot now. Also I have created a Bak for safety.
 
So I have created a Back up and ...
View attachment 983

at the end you can see what I have done. this doesn't feel right at all. I expected to see audio function but, it is not there. But Imma reboot now. Also I have created a Bak for safety.
No mam! It should look like this....

[ -d /proc/asound/card0 ] || modprobe snd-dummy
for c in $(grep '\[.*\]' /proc/asound/cards | awk '{print $1}'); do
f=/system/etc/alsa/$(cat /proc/asound/card$c/id).state
if [ -e $f ]; then
alsa_ctl -f $f restore $c
alsa_amixer -c $c set Speaker 65%
else
alsa_ctl init $c
alsa_amixer -c $c set Master on
alsa_amixer -c $c set Master 100%
alsa_amixer -c $c set Headphone on
alsa_amixer -c $c set Headphone 100%
alsa_amixer -c $c set Speaker 100%
alsa_amixer -c $c set Capture 25%
alsa_amixer -c $c set Capture cap
alsa_amixer -c $c set PCM 100 unmute
alsa_amixer -c $c set SPO unmute
alsa_amixer -c $c set 'Mic Boost' 3
alsa_amixer -c $c set 'Internal Mic Boost' 3
alsa_amixer -c $c set 'Input Source',0 'Internal Mic'
fi
done

You have to use it with other alsa commands
Post automatically merged:

No mam! It should look like this....

[ -d /proc/asound/card0 ] || modprobe snd-dummy
for c in $(grep '\[.*\]' /proc/asound/cards | awk '{print $1}'); do
f=/system/etc/alsa/$(cat /proc/asound/card$c/id).state
if [ -e $f ]; then
alsa_ctl -f $f restore $c
alsa_amixer -c $c set Speaker 65%
else
alsa_ctl init $c
alsa_amixer -c $c set Master on
alsa_amixer -c $c set Master 100%
alsa_amixer -c $c set Headphone on
alsa_amixer -c $c set Headphone 100%
alsa_amixer -c $c set Speaker 100%
alsa_amixer -c $c set Capture 25%
alsa_amixer -c $c set Capture cap
alsa_amixer -c $c set PCM 100 unmute
alsa_amixer -c $c set SPO unmute
alsa_amixer -c $c set 'Mic Boost' 3
alsa_amixer -c $c set 'Internal Mic Boost' 3
alsa_amixer -c $c set 'Input Source',0 'Internal Mic'
fi
done

You have to use it with other alsa commands
Typo error 😅 man!
Post automatically merged:

Also don't change other commands unless required, just add that input source
 

kalic

New member
VC
26
No mam! It should look like this....

[ -d /proc/asound/card0 ] || modprobe snd-dummy
for c in $(grep '\[.*\]' /proc/asound/cards | awk '{print $1}'); do
f=/system/etc/alsa/$(cat /proc/asound/card$c/id).state
if [ -e $f ]; then
alsa_ctl -f $f restore $c
alsa_amixer -c $c set Speaker 65%
else
alsa_ctl init $c
alsa_amixer -c $c set Master on
alsa_amixer -c $c set Master 100%
alsa_amixer -c $c set Headphone on
alsa_amixer -c $c set Headphone 100%
alsa_amixer -c $c set Speaker 100%
alsa_amixer -c $c set Capture 25%
alsa_amixer -c $c set Capture cap
alsa_amixer -c $c set PCM 100 unmute
alsa_amixer -c $c set SPO unmute
alsa_amixer -c $c set 'Mic Boost' 3
alsa_amixer -c $c set 'Internal Mic Boost' 3
alsa_amixer -c $c set 'Input Source',0 'Internal Mic'
fi
done

You have to use it with other alsa commands
Post automatically merged:


Typo error 😅 man!
Post automatically merged:

Also don't change other commands unless required, just add that input source

It is alright. every one kept saying init.sh file. the one I showed is Init.sh file. and the one you are showing is alsa_preset.sh file. that's fine I kinda figured it outt buttt..

Screenshot_20210410-114158.jpg


Screenshot_20210410-114638.jpg



It says. There is no Identifier called Input source.
also what did you mean by other alsa command. ? @Jaguar000212 did you mean next time when am using alsa, I have do it in the same file alsa_preset.sh file ?
 
Just reboot and then check
Post automatically merged:

Try recording your voice using a recorder
Post automatically merged:

Also I just checked that alsa mixer, now I can help you with that too
Post automatically merged:

It is alright. every one kept saying init.sh file. the one I showed is Init.sh file. and the one you are showing is alsa_preset.sh file. that's fine I kinda figured it outt buttt..

View attachment 984

View attachment 985


It says. There is no Identifier called Input source.
also what did you mean by other alsa command. ? @Jaguar000212 did you mean next time when am using alsa, I have do it in the same file alsa_preset.sh file ?
For DarkMatter, its alsa_preset.sh and for PhoenixOS, its init.sh
 

kalic

New member
VC
26
Just reboot and then check
Post automatically merged:

Try recording your voice using a recorder
Post automatically merged:

Also I just checked that alsa mixer, now I can help you with that too
Post automatically merged:


For DarkMatter, its alsa_preset.sh and for PhoenixOS, its init.sh
So sadly, I have failed again. It doesn't work. when I pull out the earphones, Internal Mic is Up again, but earphones are plugged in. the input source is something else and There is no Voice. I tried both Alsa_mixer(GUI) and the command you gave . but neither works.
I
 

Similar threads

Similar threads

Get Connected

Discord Server

New Threads

Latest From Blog

Top