Power & Source of Big Ideas

How to use Headset Microphone?

Moderators: chensy, FATechsupport

Hello All

I am new to Audio driver.

I used NanoPC-T4 and Android 8.1 running (20190718 baseline cloned from gitlab oreo).
My team made a custom RK3399 board based on NanoPC-T4.
Differences are only from eMMC and Microphone. The original T4 boards does not support Headset Microphone.
But we connected headset microphone as well as Internal Mic on our own board.

My test result is the recording does not work. However The headset's button click seems be input according to sound level floating in voice recording android app after I changed 5651 initial reg value regarding Rec Mixer mut/unmute register. I manually unmute the Bst3's path with increased gain value. headphone mic jack is connected to IN3P.

My test scenario is below.
1. When headset is connected, The headset microphone is used.
2. When headset is disconnected, The internal microphone is used.

I tried to change DTS and RT5651.c code. But could not figure out the solution.
Does anyone have the answer about Headset Microphone Recording use case?

How to modify rt5651 routing or control ?

Please give your kind comments. I focused on this few days. But could not find answer.

thanks.
Regards, JK
Hi Shaneo
We don't use the internal microphone. and then I could record the sound using Headset Mic by modifying rt5651.c and rt5651_config.h as below.

@rt5651.c
static const struct snd_kcontrol_new rt5651_snd_controls[] = {
...
/* IN1/IN2 Control */
//SOC_SINGLE_TLV("IN1 Boost", RT5651_IN1_IN2,
// RT5651_BST_SFT1, 8, 0, bst_tlv),
//SOC_SINGLE_TLV("IN2 Boost", RT5651_IN1_IN2,
// RT5651_BST_SFT2, 8, 0, bst_tlv),
SOC_SINGLE_TLV("IN3 Boost", RT5651_IN3,
RT5651_BST_SFT1, 8, 0, bst_tlv),
....

@rt5651_config.h
const struct config_control rt5651_main_mic_capture_controls[] = {
{
.ctl_name = "RECMIXL BST3 Switch",
.int_val = {on},
},
{
.ctl_name = "RECMIXR BST3 Switch",
.int_val = {on},
},
{
.ctl_name = "Stereo1 ADC L1 Mux",
.str_val = "ADC",
},
{
.ctl_name = "Stereo1 ADC R1 Mux",
.str_val = "ADC",
},
{
.ctl_name = "Stereo1 ADC MIXL ADC1 Switch",
.int_val = {on},
},
{
.ctl_name = "Stereo1 ADC MIXR ADC1 Switch",
.int_val = {on},
},
{
.ctl_name = "IN3 Boost",
.int_val = {1},
},
{
.ctl_name = "ADC Capture Switch",
.int_val = {on, on},
},
{
.ctl_name = "ADC Capture Volume",
.int_val = {47, 47},
.....

by putting headset microphone as main mic.
I suppose more modification is required to use hand-free mic_capture control. maybe from simple-card driver.
The audio driver is so complex to me yet. Thx.
Also you can increase the volume value of the path what you selected.

Who is online

In total there are 46 users online :: 0 registered, 0 hidden and 46 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 46 guests