Hi,
I need small information on Audio Codec(WM8960) drivers.I took sabresd reference for my project, in my board Audio Codec working fine( I can able to record & Listen audio),As per imx-wm8960(Machine drivers) routed Audio Codec(WM8960) to MIC(input1 ADC to store audio in Process) & Head_phone(Processor's DAC to output channel).
But As per my requirements i need to play Auxiliary audio stream which connected to 2nd input channel & FM in 3rd input channel(Like below pic).
So how i can route it in imx-wm8960.c file like below.
{ "Headphone Jack", NULL, "HP_L" },
{ "Headphone Jack", NULL, "HP_R" },
{ "Speaker_L", NULL, "SPK_LP" },
{ "Speaker_L", NULL, "SPK_LN" },
{ "Speaker_R", NULL, "SPK_RP" },
{ "Speaker_R", NULL, "SPK_RN" },
{ "LINPUT1", NULL, "MICB" },
{ "MICB", NULL, "Mic Jack" },
// { "LINPUT3", "LINPUT3 Switch", "HP_L" },
// { "RINPUT3", "RINPUT3 Switch", "HP_R" },
}
I am waiting for your reply. Thank you.
Solved! Go to Solution.
For your reference: WM8960 audio codec
Check the audio path and the name of the switches. Using amixer or alsamixer to switch on the corresponding switches.
For your reference: WM8960 audio codec
Check the audio path and the name of the switches. Using amixer or alsamixer to switch on the corresponding switches.
Thanks for your reply,
By using amixer/alsamixer(from user space) we can switch the channel, but in imx-wm8960.c file we are routing the input & output channels right? so as per my requirements, I had switched(routed) input channel3&2 to output mixer like below but not working, Pls check it once ,If wrong let me know.
static const struct snd_soc_dapm_route imx6_audio_map[] = {
{ "Headphone Jack", NULL, "HP_L" },
{ "Headphone Jack", NULL, "HP_R" },
{ "Speaker_L", NULL, "SPK_LP" },
{ "Speaker_L", NULL, "SPK_LN" },
{ "Speaker_R", NULL, "SPK_RP" },
{ "Speaker_R", NULL, "SPK_RN" },
{ "LINPUT1", NULL, "MICB" },
{ "MICB", NULL, "Mic Jack" },
{ "LINPUT3", "LINPUT3 Switch", "HP_L" }, //for AUX input Is this correct or not?
{ "RINPUT3", "RINPUT3 Switch", "HP_R" }, // Is this correct or not?
{ "LINPUT2", "LINPUT2 Switch", "HP_L" }, //for FM input Is this correct or not?
{ "RINPUT3", "RINPUT2 Switch", "HP_R" }, // Is this correct or not?
}
The path is from right to left , like : { “destination”, “switch”, “source” }.
I think you don't need to add the audio path in the machine driver (imx-wm8960.c) because the audio path had already existed in the codec driver (wm8960.c). You can double check the "static const struct snd_soc_dapm_route audio_paths[]" in codec driver. You can see something like :
{ "Left Boost Mixer", "LINPUT1 Switch", "LINPUT1" },
{ "Left Boost Mixer", "LINPUT2 Switch", "LINPUT2" },
{ "Left Boost Mixer", "LINPUT3 Switch", "LINPUT3" },
{ "Left Input Mixer", "Boost Switch", "Left Boost Mixer", },
{ "Left Input Mixer", NULL, "LINPUT1", }, /* Really Boost Switch */
{ "Left Input Mixer", NULL, "LINPUT2" },
{ "Left Input Mixer", NULL, "LINPUT3" },
{ "Right Boost Mixer", "RINPUT1 Switch", "RINPUT1" },
{ "Right Boost Mixer", "RINPUT2 Switch", "RINPUT2" },
{ "Right Boost Mixer", "RINPUT3 Switch", "RINPUT3" },
{ "Right Input Mixer", "Boost Switch", "Right Boost Mixer", },
{ "Right Input Mixer", NULL, "RINPUT1", }, /* Really Boost Switch */
{ "Right Input Mixer", NULL, "RINPUT2" },
{ "Right Input Mixer", NULL, "LINPUT3" },
{ "Left ADC", NULL, "Left Input Mixer" },
{ "Right ADC", NULL, "Right Input Mixer" },
{ "Left Output Mixer", "LINPUT3 Switch", "LINPUT3" },
{ "Left Output Mixer", "Boost Bypass Switch", "Left Boost Mixer"} ,
{ "Left Output Mixer", "PCM Playback Switch", "Left DAC" },
{ "Right Output Mixer", "RINPUT3 Switch", "RINPUT3" },
{ "Right Output Mixer", "Boost Bypass Switch", "Right Boost Mixer" } ,
{ "Right Output Mixer", "PCM Playback Switch", "Right DAC" },
{ "LOUT1 PGA", NULL, "Left Output Mixer" },
{ "ROUT1 PGA", NULL, "Right Output Mixer" },
{ "HP_L", NULL, "LOUT1 PGA" },
{ "HP_R", NULL, "ROUT1 PGA" },
{ "Left Speaker PGA", NULL, "Left Output Mixer" },
{ "Right Speaker PGA", NULL, "Right Output Mixer" },
{ "Left Speaker Output", NULL, "Left Speaker PGA" },
{ "Right Speaker Output", NULL, "Right Speaker PGA" },
{ "SPK_LN", NULL, "Left Speaker Output" },
{ "SPK_LP", NULL, "Left Speaker Output" },
{ "SPK_RN", NULL, "Right Speaker Output" },
{ "SPK_RP", NULL, "Right Speaker Output" },
};
For example, from LINPUT3 to HP_L, the path is LINPUT3 -> LI2LOVOL[2:0] -> LI2LO switch ->LOMIX -> LOUT1VOL [6:0] -> HP_L
so, please make sure the Volume and the Switch in between LINPUT3 and HP_L are turn on. (tune the volume and turn on the switch in alsamixer/amixer)
Actually i had try to install "alsamixer.apk" but it's asking Root Permission.So how i can handle this alsa/alsa mixer. Thanks In advance.
it is an Android apps installation/permission issue, please create a new post. Thanks.
Hi jimmychan,
I created new post & viewing the post in below link
One more information for your reference,
Ok, Thanks for your reply.Already i gone through the given link.
If you get any idea about the alsamixer documentation/ switching methodologies.