We worked on the following platform:
Android 4.0 +kernel Linux 3.0
CPU i.mx6 solo
Codec:WM8960
The situation:
Codec has been registered
Then I tested the codec using tinyplay or OMXplayer, no voice on speaker or headphone!
The attached file <control.txt> showed the status got by tinymix. And <i.mx6-5.27.log> is system log file .
If I use tinymix to set "Headphone Playback Volume " to 100 , "Right Output Mixer PCM Playback Switch " and "Left Output Mixer PCM Playback Switch" to on, then plaly wav type musci by tinyplay or OMXplayer , I can hear voice on headphone.
<asound.conf> is from the dir of source code , external/fsl_imx_omx/release.
Should I modify this file to set audio path?
But I checked the system running on i.mx6 solo board, there is not <asound.conf> in /system/etc dir.
Thanks in advance,
Fangming
Original Attachment has been moved to: control.txt.zip
Original Attachment has been moved to: i.mx6-5.27.log.zip
Original Attachment has been moved to: asound.conf.zip
Solved! Go to Solution.
Hi,
you can refer following files for your requirement.
kernel_imx\arch\arm\mach-mx6\board-mx6q_sabresd.c
static struct mxc_audio_platform_data wm8962_data = {
.ssi_num = 1,
.src_port = 2,
.ext_port = 3,
.hp_gpio = SABRESD_HEADPHONE_DET,
.hp_active_low = 1,
.mic_gpio = SABRESD_MICROPHONE_DET,
.mic_active_low = 1,
.init = mxc_wm8962_init,
.clock_enable = wm8962_clk_enable,
};
kernel_imx\sound\soc\codecs\wm8962.c
kernel_imx\sound\soc\imx\imx-wm8962.c
imx_hifi_hw_params()
imx_audmux_config().
Thanks,
Saurabh
Anyone can help?
Thanks and Best Regards,
Fangming
Hi,
you can refer following files for your requirement.
kernel_imx\arch\arm\mach-mx6\board-mx6q_sabresd.c
static struct mxc_audio_platform_data wm8962_data = {
.ssi_num = 1,
.src_port = 2,
.ext_port = 3,
.hp_gpio = SABRESD_HEADPHONE_DET,
.hp_active_low = 1,
.mic_gpio = SABRESD_MICROPHONE_DET,
.mic_active_low = 1,
.init = mxc_wm8962_init,
.clock_enable = wm8962_clk_enable,
};
kernel_imx\sound\soc\codecs\wm8962.c
kernel_imx\sound\soc\imx\imx-wm8962.c
imx_hifi_hw_params()
imx_audmux_config().
Thanks,
Saurabh
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?
can you share you source.my code can playback ,but not capture.thanks