Dear Saurabh,
Thank you for your attention!
Yes, We mainly modified these 3 files you mentioned. And I think the audio card has been registered successfully.
You can find the following information on log file
ALSA device list:
#0: wm8960-audio
In the file kernel_imx\sound\soc\imx\imx-wm8960.c, we changed widget and audio_map
/* imx card dapm widgets */
static const struct snd_soc_dapm_widget imx_dapm_widgets[] = {
SND_SOC_DAPM_HP("Headphone Jack", NULL),
SND_SOC_DAPM_SPK("Ext Spk_L", NULL),
SND_SOC_DAPM_SPK("Ext Spk_R", NULL),
SND_SOC_DAPM_MIC("AuxMIC", NULL),
SND_SOC_DAPM_MIC("MainMIC", NULL),
};
static const struct snd_soc_dapm_route audio_map[] = {
{ "Headphone Jack", NULL, "HP_L" },
{ "Headphone Jack", NULL, "HP_R" },
{ "Ext Spk_L", NULL, "SPK_LP" },
{ "Ext Spk_L", NULL, "SPK_LN" },
{ "Ext Spk_R", NULL, "SPK_RP" },
{ "Ext Spk_R", NULL, "SPK_RN" },
{ "MICB", NULL, "MainMIC" },
{ "LINPUT1", NULL, "MICB" },
{ "MICB", NULL, "AuxMIC" },
{ "LINPUT2", NULL, "MICB" },
};
Then in funtion imx_wm8960_init, enable speaker and main mic
static int imx_wm8960_init(struct snd_soc_pcm_runtime *rtd)
{
.....
snd_soc_dapm_enable_pin(&codec->dapm, "Ext Spk_L");
snd_soc_dapm_enable_pin(&codec->dapm, "Ext Spk_R");
snd_soc_dapm_enable_pin(&codec->dapm, "MainMIC");
......
}
But when playing whether by tinyplay or OMXPlayer, I need to mix the path by tinymix!
Why?