Jump to content

Recommended Posts

Posted

Hi,

Got OPiPC with legacy and Ubuntu desktop, build 5.33.

Gonna attach some external dynamic mic to OPiPC in place of the on-board condenser mic, replacing it.

How can we stop the mic bias voltage?

Can we do that from Alsa or Pulseaudio?

 

Christos

 

Posted

Thanks for looking.

Yes, I know that, yet what I'm after is a ad-hoc change, whenever I want to have the condenser mic and the bias enabled, or the dynamic and bias disabled, solder/desolder resistor is not exactly useful this way.

Is there any pulseaudio or alsa/mixer/something switch that enables/disables the bias in H3?

Posted

I doubt pulseaudio/alsa know any thing about the MicBias, since MicBias is an SoC related thing.

But looking at the AllWinner H3 datasheet, there is a register named MIC1G_MICBAIS_CTR which bit6 is MMICBIASEN described as "Master Microphone Bias enable".

Therefore, we need to look if the kernel driver is taking care of that using a DT setting.

 

EDIT : if not supported by DT binding, maybe a small C application could be written to switch this bit thru memory mapping of /dev/mem, like GPIO libs are doing.

Posted

DT is for mainline 4.x and not for legacy (3.x), right?

 

I've seen the kernel sources and the bits where mic bias is enabled/disabled https://github.com/armbian/linux/tree/sun8i/sound/soc/sunxi/audiocodec but I hoped that something easier like pulseaudio or alsa switch would suffice, it looks that I have to do it the hard way with an external application.

 

If you got some pointer for me to see any github or so, example for such an application I would be happy (have not done so far direct memory register manipulation from userspace app), I could modify it based on the register info seen on the sources above for mic bias register enable/disable bits.

 

Thanks anyway for all info.

 

EDIT: Think I found something useful, I'll give it a try the hard way with direct register setting with these: https://github.com/tomba/rwmem and https://github.com/pavel-a/devmemX

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines