IMX6QP + WM8962 + IN1R/L = NOT WORKING

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX6QP + WM8962 + IN1R/L = NOT WORKING

1,629 Views
mayqueen
Contributor IV

OS: Android 6.0
Kernel: 4.1.15

Our hardware function is use IN1R and IN1L using wm8962, the flow as following:
hdmi input audio -> DAC chip -> wm8962 in1R/L

Our hardware guy is confirm the DAC chip output is normal audio signal, but wm8962 still no sound in Android, how can I do? I know IN1 is difference on WM8962, it has to enabling PGA relative functions first, I already change as below:

dts:
    sound {
        compatible = "fsl,imx6q-sabresd-wm8962", "fsl,imx-audio-wm8962";
        model = "wm8962-audio";
        cpu-dai = <&ssi2>;
        audio-codec = <&codec>;
        asrc-controller = <&asrc>;
        audio-routing =
            "Headphone Jack", "HPOUTL",
            "Headphone Jack", "HPOUTR",
            "Ext Spk", "SPKOUTL",
            "Ext Spk", "SPKOUTR",
            "AMIC", "MICBIAS",
            "IN1L", "AMIC",
            "IN1R", "AMIC",
            "DMIC", "MICBIAS",
            "DMICDAT", "DMIC",
            "CPU-Playback", "ASRC-Playback",
            "Playback", "CPU-Playback",
            "ASRC-Capture", "CPU-Capture",
            "CPU-Capture", "Capture";
        mux-int-port = <2>;
        mux-ext-port = <3>;
        hp-det-gpios = <&gpio4 10 1>;
    };

HAL : config_wm8962.h


#define MIXER_WM8962_INPGAL_IN1L_SWITCH             "INPGAL IN1L Switch"
#define MIXER_WM8962_MIXINL_PGA_SWITCH              "MIXINL PGA Switch"
#define MIXER_WM8962_MIXINL_PGA_VOLUME              "MIXINL PGA Volume"

#define MIXER_WM8962_INPGAR_IN1R_SWITCH             "INPGAR IN1R Switch"
#define MIXER_WM8962_MIXINR_PGA_SWITCH              "MIXINR PGA Switch"
#define MIXER_WM8962_MIXINR_PGA_VOLUME              "MIXINR PGA Volume"

static struct route_setting mm_main_mic_input_wm8962[] = {
    {
        .ctl_name = MIXER_WM8962_CAPTURE_SWITCH,
        .intval = 1,
    },
    {
        .ctl_name = MIXER_WM8962_CAPTURE_VOLUME,
        .intval = 63,
    },
    {
        .ctl_name = MIXER_WM8962_DIGITAL_CAPTURE_VOLUME,
        .intval = 127,
    },
    {
        .ctl_name = MIXER_WM8962_INPGAL_IN1L_SWITCH,
        .intval = 1,
    },
    {
        .ctl_name = MIXER_WM8962_MIXINL_PGA_SWITCH,
        .intval = 1,
    },
    {
        .ctl_name = MIXER_WM8962_MIXINL_PGA_VOLUME,
        .intval = 7,
    },
    {
        .ctl_name = MIXER_WM8962_INPGAR_IN1R_SWITCH,
        .intval = 1,
    },
    {
        .ctl_name = MIXER_WM8962_MIXINR_PGA_SWITCH,
        .intval = 1,
    },
    {
        .ctl_name = MIXER_WM8962_MIXINR_PGA_VOLUME,
        .intval = 7,
    },

    {
        .ctl_name = NULL,
    },
};

static struct route_setting mm_hs_mic_input_wm8962[] = {
    {
        .ctl_name = MIXER_WM8962_CAPTURE_SWITCH,
        .intval = 1,
    },
    {
        .ctl_name = MIXER_WM8962_CAPTURE_VOLUME,
        .intval = 63,
    },
    {
        .ctl_name = MIXER_WM8962_DIGITAL_CAPTURE_VOLUME,
        .intval = 127,
    },
    {
        .ctl_name = MIXER_WM8962_INPGAL_IN1L_SWITCH,
        .intval = 1,
    },
    {
        .ctl_name = MIXER_WM8962_MIXINL_PGA_SWITCH,
        .intval = 1,
    },
    {
        .ctl_name = MIXER_WM8962_MIXINL_PGA_VOLUME,
        .intval = 7,
    },
    {
        .ctl_name = MIXER_WM8962_INPGAR_IN1R_SWITCH,
        .intval = 1,
    },
    {
        .ctl_name = MIXER_WM8962_MIXINR_PGA_SWITCH,
        .intval = 1,
    },
    {
        .ctl_name = MIXER_WM8962_MIXINR_PGA_VOLUME,
        .intval = 7,
    },

    {
        .ctl_name = NULL,
    },
};



But still no receive any sound when I enabling the microphone app in Android, what stuff I miss? Hope give me some comments, thank you so much!

Labels (2)
0 Kudos
Reply
1 Reply

1,128 Views
igorpadykov
NXP Employee
NXP Employee

Hi May

is it working in linux imx-test package audio test (folder ..test/mxc_sound_test)

imx-test
www.nxp.com/lgfiles/NMG/MAD/YOCTO/imx-test-5.7.tar.gz

one can debug this and add necessary settings in wm8962 driver using

Table 28-1. Stereo Codec SoC Driver Files attached Linux Manual.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply