WM8960 audio codec

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

WM8960 audio codec

WM8960 audio codec

pastedImage_10.png

Introduction

This is a sharing of my experience about porting the audio codec WM8960 in Linux BSP. I know this driver is not the perfect one.  If you find any place is not good in the driver, please let me know.

This driver is modified base on the wm8960.c in L3.0.35 Linux BSP. This document is talking about how to modify the codec driver. The Audio Codec driver is located in linux/sound/soc/codec/wm8960.c.

ALSA

The Audio Codec driver is based on ALSA to setup up all the things. For details, please see :

AlsaProject

Advanced Linux Sound Architecture - Wikipedia, the free encyclopedia.

kcontrols are defined in linux/include/sound/soc.h and soc-dapm.h.

Audio controls and path in WM8960

Left and Right Input signal path

pastedImage_11.pngpastedImage_12.png

Output signal path

pastedImage_17.png

Base on the input and output signal diagrams, we can setup all the controls that we want in the driver. Such as switches, volume controls, PGA controls and so on. All the controls below can be used in the alsamixer.

static const struct snd_kcontrol_new wm8960_snd_controls[] = {

SOC_DOUBLE_R_TLV("PCM DAC Playback Volume", WM8960_LDAC, WM8960_RDAC, 0, 255, 0, dac_tlv), //LDACVOL , RDACVOL

SOC_DOUBLE_R_TLV("PCM ADC Capture Volume", WM8960_LADC, WM8960_RADC, 0, 255, 0, adc_tlv), //LADCVOL, RADCVOL

SOC_DOUBLE_R_TLV("Headphone Volume", WM8960_LOUT1, WM8960_ROUT1, 0, 127, 0, out_tlv),

SOC_DOUBLE_R("Headphone ZC Switch", WM8960_LOUT1, WM8960_ROUT1,    7, 1, 0),

SOC_DOUBLE_R_TLV("Speaker Volume", WM8960_LOUT2, WM8960_ROUT2, 0, 127, 0, out_tlv),

SOC_DOUBLE_R("Speaker ZC Switch", WM8960_LOUT2, WM8960_ROUT2, 7, 1, 0),

SOC_DOUBLE_R("Capture Volume ZC Switch", WM8960_LINVOL, WM8960_RINVOL, 6, 1, 0),

SOC_SINGLE_TLV("Input Volume of LINPUT1", WM8960_LINVOL, 0, 63, 0, in_tlv),  //LINVOL

SOC_SINGLE_TLV("Input Volume of RINPUT1", WM8960_RINVOL, 0, 63, 0, in_tlv),  //RINVOL

SOC_SINGLE_TLV("Input Boost Volume LINPUT3", WM8960_INBMIX1, 4, 7, 0, boost_tlv),    //RIN3BOOST

SOC_SINGLE_TLV("Input Boost Volume LINPUT2", WM8960_INBMIX1, 1, 7, 0, boost_tlv),    //RIN2BOOST

SOC_SINGLE_TLV("Input Boost Volume RINPUT3", WM8960_INBMIX2, 4, 7, 0, boost_tlv),    //LIN3BOOST

SOC_SINGLE_TLV("Input Boost Volume RINPUT2", WM8960_INBMIX2, 1, 7, 0, boost_tlv),    //LIN2BOOST

SOC_SINGLE_TLV("PGA LB2LOVOL-Bypass from Left Boost", WM8960_BYPASS1, 4, 7, 1, bypass_tlv),    //LB2LOVOL

SOC_SINGLE_TLV("PGA LI2LOVOL-Bypass from LINPUT3", WM8960_LOUTMIX, 4, 7, 1, bypass_tlv),    //LI2LOVOL

SOC_SINGLE_TLV("PGA RB2ROVOL-Bypass from Right Boost", WM8960_BYPASS2, 4, 7, 1, bypass_tlv),    //RB2ROVOL

SOC_SINGLE_TLV("PGA RI2ROVOL-Bypass from RINPUT3", WM8960_ROUTMIX, 4, 7, 1, bypass_tlv),    //RI2ROVOL

SOC_SINGLE("Capture Mute (Left)", WM8960_LINVOL, 7, 1, 0), // LINMUTE

SOC_SINGLE("Capture Mute (Right)", WM8960_RINVOL, 7, 1, 0), // RINMUTE

SOC_SINGLE("PCM Playback -6dB Switch", WM8960_DACCTL1, 7, 1, 0),

SOC_SINGLE("Speaker DC gain", WM8960_CLASSD3, 3, 5, 0),

SOC_SINGLE("Speaker AC gain", WM8960_CLASSD3, 0, 5, 0),

SOC_ENUM("ADC Polarity", wm8960_enum[0]),

SOC_SINGLE("ADC High Pass Filter Switch", WM8960_DACCTL1, 0, 1, 0),

SOC_ENUM("DAC Polarity", wm8960_enum[2]),

SOC_SINGLE_BOOL_EXT("DAC Deemphasis Switch", 0, wm8960_get_deemph, wm8960_put_deemph),

SOC_ENUM("3D Filter Upper Cut-Off", wm8960_enum[2]),

SOC_ENUM("3D Filter Lower Cut-Off", wm8960_enum[3]),

SOC_SINGLE("3D Depth", WM8960_3D, 1, 15, 0),

SOC_SINGLE("3D", WM8960_3D, 0, 1, 0),

SOC_ENUM("ALC Function", wm8960_enum[4]),

SOC_SINGLE("ALC Max Gain", WM8960_ALC1, 4, 7, 0),

SOC_SINGLE("ALC Target", WM8960_ALC1, 0, 15, 1),

SOC_SINGLE("ALC Min Gain", WM8960_ALC2, 4, 7, 0),

SOC_SINGLE("ALC Hold Time", WM8960_ALC2, 0, 15, 0),

SOC_ENUM("ALC Mode", wm8960_enum[5]),

SOC_SINGLE("ALC Decay", WM8960_ALC3, 4, 15, 0),

SOC_SINGLE("ALC Attack", WM8960_ALC3, 0, 15, 0),

SOC_SINGLE("Noise Gate Threshold", WM8960_NOISEG, 3, 31, 0),

SOC_SINGLE("Noise Gate Switch", WM8960_NOISEG, 0, 1, 0),

SOC_ENUM("Capture Left Boost", wm8960_enum[6]), //LMICBOOST

SOC_ENUM("Capture Right Boost", wm8960_enum[7]), //RMICBOOT

};

1. SOC_SINGLE(xname, reg, shift, max, invert)

To setup a simple switch, we can use SOC_SINGLE.

pastedImage_64.png

e.g

SOC_SINGLE("PCM Playback -6dB Switch", WM8960_DACCTL1, 7, 1, 0),

- The name of this control is “PCM Playback -6dB Switch”.

- The register in WM8960 is WM8960_DACCTL1 . (the register address is 0x5, defined in wm8960.h)

- ‘7’ : The 7th bit in DACCTL1 register is used to enable/disable the DAC 6dB Attenuate.

- ‘1’ : Only one enable or disable option.

- ‘0’ : the value you set is not inverted.

2. SOC_SINGLE_TLV(xname, reg, shift, max, invert, tlv_array)

To setup a switch with levels, we can use SOC_SINGLE_TLV.

e.g.

pastedImage_27.png

In this example, the left input volume control is from 000000(-17.25dB) to 111111(+30dB). Each step is 0.75dB. Total is 63 steps.

SOC_SINGLE_TLV("Input Volume of LINPUT1", WM8960_LINVOL, 0, 63, 0, in_tlv),

The scale of in_tlv declare like this:

static const DECLARE_TLV_DB_SCALE(in_tlv, -1725, 75, 0);

in_tlv : the name of the scale.

-1725 : start from -17.25dB

75: each step is 0.75dB

0: the step is start from 0. For some volume control case the first step is "mute", then the step is start from 1 so change this number to 1.

for example: The 0000 0000 of the DAC volume control is digital mute.

pastedImage_62.png

static const DECLARE_TLV_DB_SCALE(dac_tlv, -12700, 50, 1);

3. SOC_DOUBLE_R(xname, reg_left, reg_right, xshift, xmax, xinvert)

SOC_DOUBLE_R is a stereo version of SOC_SINGLE. You can control the left and right channel at the same time.

e.g.

SOC_DOUBLE_R("Headphone ZC Switch", WM8960_LOUT1, WM8960_ROUT1, 7, 1, 0),

4. SOC_DOUBLE_R_TLV(xname, reg_left, reg_right, xshift, xmax, xinvert, tlv_array)

SOC_DOUBLE_R_TLV is the stereo version of SOC_SINGLE_TLV.

e.g.

SOC_DOUBLE_R_TLV("PCM DAC Playback Volume", WM8960_LDAC, WM8960_RDAC, 0, 255, 0, dac_tlv),

5. SOC_ENUM_SINGLE(xreg, xshift, xmax, xtexts)

When the control option are some texts, we can use SOC_ENUM to enum the options.

e.g. MIC boost

pastedImage_63.png

5.1. setup the array for the texts.

static const char *wm8960_micboost[] = {"0dB","+13dB","+20dB","+29dB"};

5.2. use the SOC_ENUM_SINGLE.

static const struct soc_enum wm8960_enum[] = {

     SOC_ENUM_SINGLE(WM8960_DACCTL1, 5, 4, wm8960_polarity),

     SOC_ENUM_SINGLE(WM8960_DACCTL2, 5, 4, wm8960_polarity),

     SOC_ENUM_SINGLE(WM8960_3D, 6, 2, wm8960_3d_upper_cutoff),

     SOC_ENUM_SINGLE(WM8960_3D, 5, 2, wm8960_3d_lower_cutoff),

     SOC_ENUM_SINGLE(WM8960_ALC1, 7, 4, wm8960_alcfunc),

     SOC_ENUM_SINGLE(WM8960_ALC3, 8, 2, wm8960_alcmode),

     SOC_ENUM_SINGLE(WM8960_LINPATH, 4, 4, wm8960_micboost),

     SOC_ENUM_SINGLE(WM8960_RINPATH, 4, 4, wm8960_micboost),

};

5.3.  use SOC_ENUM to add the controls for MIC boost.

SOC_ENUM("Capture Left Boost", wm8960_enum[6]),

SOC_ENUM("Capture Right Boost", wm8960_enum[7]),

After created all the controls, we can start to create the switches.

The following switches created base on the input and output diagrams. I used the same name from datasheet of each switch. It will more easy to find out the proper switch in alsamixer.

static const struct snd_kcontrol_new wm8960_lin[] = {

SOC_DAPM_SINGLE("<- LMP2", WM8960_LINPATH, 6, 1, 0), //LMP2

SOC_DAPM_SINGLE("<- LMP3", WM8960_LINPATH, 7, 1, 0), //LMP3

SOC_DAPM_SINGLE("<- LMN1", WM8960_LINPATH, 8, 1, 0), //LMN1

};

static const struct snd_kcontrol_new wm8960_lin_boost[] = {

SOC_DAPM_SINGLE("<- LMIC2B", WM8960_LINPATH, 3, 1, 0), //LMIC2B

};

static const struct snd_kcontrol_new wm8960_rin[] = {

SOC_DAPM_SINGLE("<- RMP2", WM8960_RINPATH, 6, 1, 0), //RMP2

SOC_DAPM_SINGLE("<- RMP3", WM8960_RINPATH, 7, 1, 0), //RMP3

SOC_DAPM_SINGLE("<- RMN1", WM8960_RINPATH, 8, 1, 0), //RMN1

};

static const struct snd_kcontrol_new wm8960_rin_boost[] = {

SOC_DAPM_SINGLE("<- RMIC2B", WM8960_RINPATH, 3, 1, 0), //RMIC2B

};

static const struct snd_kcontrol_new wm8960_loutput_mixer[] = {

SOC_DAPM_SINGLE("<- LD2LO", WM8960_LOUTMIX, 8, 1, 0), //LD2LO

SOC_DAPM_SINGLE("<- LI2LO", WM8960_LOUTMIX, 7, 1, 0), //LI2LO

SOC_DAPM_SINGLE("<- LB2LO", WM8960_BYPASS1, 7, 1, 0), //LB2LO

};

static const struct snd_kcontrol_new wm8960_routput_mixer[] = {

SOC_DAPM_SINGLE("<- RD2RO", WM8960_ROUTMIX, 8, 1, 0), //RD2RO

SOC_DAPM_SINGLE("<- RI2RO", WM8960_ROUTMIX, 7, 1, 0), //RI2RO

SOC_DAPM_SINGLE("<- RB2RO", WM8960_BYPASS2, 7, 1, 0), //RB2RO

};

static const struct snd_kcontrol_new wm8960_mono_out[] = {

SOC_DAPM_SINGLE("<- L2MO", WM8960_MONOMIX1, 7, 1, 0), //L2MO

SOC_DAPM_SINGLE("<- R2MO", WM8960_MONOMIX2, 7, 1, 0), //R2MO

};

Then, create the inputs, ADC, DAC, mixers, PGA and outputs.

static const struct snd_soc_dapm_widget wm8960_dapm_widgets[] = {

SND_SOC_DAPM_INPUT("LINPUT1"),

SND_SOC_DAPM_INPUT("RINPUT1"),

SND_SOC_DAPM_INPUT("LINPUT2"),

SND_SOC_DAPM_INPUT("RINPUT2"),

SND_SOC_DAPM_INPUT("LINPUT3"),

SND_SOC_DAPM_INPUT("RINPUT3"),

SND_SOC_DAPM_MICBIAS("MICB", WM8960_POWER1, 1, 0),

SND_SOC_DAPM_MIXER("Left Boost Mixer", WM8960_POWER1, 5, 0, wm8960_lin_boost, ARRAY_SIZE(wm8960_lin_boost)),

SND_SOC_DAPM_MIXER("Right Boost Mixer", WM8960_POWER1, 4, 0, wm8960_rin_boost, ARRAY_SIZE(wm8960_rin_boost)),

SND_SOC_DAPM_MIXER("Left Input PGA", WM8960_POWER3, 5, 0, wm8960_lin, ARRAY_SIZE(wm8960_lin)),

SND_SOC_DAPM_MIXER("Right Input PGA", WM8960_POWER3, 4, 0, wm8960_rin, ARRAY_SIZE(wm8960_rin)),

SND_SOC_DAPM_ADC("Left ADC", "Capture", WM8960_POWER1, 3, 0),

SND_SOC_DAPM_ADC("Right ADC", "Capture", WM8960_POWER1, 2, 0),

SND_SOC_DAPM_DAC("Left DAC", "Playback", WM8960_POWER2, 8, 0),

SND_SOC_DAPM_DAC("Right DAC", "Playback", WM8960_POWER2, 7, 0),

SND_SOC_DAPM_MIXER("Left Output Mixer", WM8960_POWER3, 3, 0, wm8960_loutput_mixer, ARRAY_SIZE(wm8960_loutput_mixer)),

SND_SOC_DAPM_MIXER("Right Output Mixer", WM8960_POWER3, 2, 0, wm8960_routput_mixer, ARRAY_SIZE(wm8960_routput_mixer)),

SND_SOC_DAPM_PGA("Left HP PGA", WM8960_POWER2, 6, 0, NULL, 0),

SND_SOC_DAPM_PGA("Right HP PGA", WM8960_POWER2, 5, 0, NULL, 0),

SND_SOC_DAPM_PGA("Left Speaker PGA", WM8960_POWER2, 4, 0, NULL, 0),

SND_SOC_DAPM_PGA("Right Speaker PGA", WM8960_POWER2, 3, 0, NULL, 0),

SND_SOC_DAPM_PGA("Right Speaker Output", WM8960_CLASSD1, 7, 0, NULL, 0), //SPK_OP_EN

SND_SOC_DAPM_PGA("Left Speaker Output", WM8960_CLASSD1, 6, 0, NULL, 0),

SND_SOC_DAPM_OUTPUT("SPK_LP"),

SND_SOC_DAPM_OUTPUT("SPK_LN"),

SND_SOC_DAPM_OUTPUT("HP_L"),

SND_SOC_DAPM_OUTPUT("HP_R"),

SND_SOC_DAPM_OUTPUT("SPK_RP"),

SND_SOC_DAPM_OUTPUT("SPK_RN"),

SND_SOC_DAPM_OUTPUT("OUT3"),

};

Now, we can start to route the audio path.

The path is from right to left , like : { “destination”, “switch”, “source” }

So, lets take the LINPUT1 to ADC as an example:

pastedImage_59.png

{ "Left Input PGA", "<- LMN1", "LINPUT1" },

{ "Left Boost Mixer", "<- LMIC2B", "Left Input PGA" },

{ "Left ADC", NULL, "Left Boost Mixer" },

Another example is DAC to Headphone.

pastedImage_61.png

                { "Left Output Mixer", "<- LD2LO", "Left DAC" },

                { "Right Output Mixer", "<- RD2RO", "Right DAC" },

                { "Left HP PGA", NULL, "Left Output Mixer" },

                { "Right HP PGA", NULL, "Right Output Mixer" },

                { "HP_L", NULL, "Left HP PGA" },

                { "HP_R", NULL, "Right HP PGA" },

In linux, you can run "alsamixer" to turn on/off the switches and adjust the volumes.

pastedImage_66.png

(this picture is an example of alsamixer of other codec, not for wm8960)

In alsamixer, use 'M' to turn the switch on/off,  use arrow keys to control the volumes.

wm8960_dai_ops is another important part in the driver.

Here is the ops of the wm8960_dai.

static struct snd_soc_dai_ops wm8960_dai_ops = {

                .hw_params = wm8960_hw_params,

                .digital_mute = wm8960_mute,

                .set_fmt = wm8960_set_dai_fmt,

                .set_clkdiv = wm8960_set_dai_clkdiv,

                .set_pll = wm8960_set_dai_pll,

};

wm8960_hw_params : used to set the PCM format (16bit/24bit), set the deemph, alc_rates and etc.

wm8960_mute:  used to mute the output

wm8960_set_dai_fmt : used to set the Master/Slave mode, set the interface format (I2S, DSP, Left justified and Right justified) and set the clock inversion.

wm8960_set_dai_clkdiv: used to set the CLK divider such as DACDIV, ADCDIV, BCLKDIV and so on.

wm8960_set_dai_pll: used to calculate the proper PLL values.

In the wm8960_set_dai_pll, we need to calculate the proper PLL values.

pastedImage_68.png

Base on the table, if the MCLK >14.4, the sysclk prescale divider is 2. So, set the sysclk pre-divider to 2 before finding pll_factors.

if (freq_in > 15000000 ) {

                                /* update sysclk div */

                                reg = snd_soc_read(codec, WM8960_CLOCK1) & 0x1f9;

                                snd_soc_write(codec, WM8960_CLOCK1, reg | 0x4);

                                clk_in = clk_in/2;

                                }

                if (freq_in && freq_out) {

                                ret = pll_factors(clk_in, freq_out, &pll_div);

                                if (ret != 0)

                                                return ret;

                }

In the driver, there are two names are important. One is the name of codec dai. The name is “wm8960”. Make sure this codec dai name is the same codec dai name used in the imx-wm8960.c.

static struct snd_soc_dai_driver wm8960_dai = {

                .name = "wm8960",

                .playback = {

                                .stream_name = "Playback",

                                .channels_min = 1,

                                .channels_max = 2,

                                .rates = WM8960_RATES,

                                .formats = WM8960_FORMATS,},

                .capture = {

                                .stream_name = "Capture",

                                .channels_min = 1,

                                .channels_max = 2,

                                .rates = WM8960_RATES,

                                .formats = WM8960_FORMATS,},

                .ops = &wm8960_dai_ops,

                .symmetric_rates = 1,

};

Another name is the I2C device id. Make sure the I2C name is same as the name used in your_board.c file.

static const struct i2c_device_id wm8960_i2c_id[] = {

                { "wm8960", 0 },

                { }

};

MODULE_DEVICE_TABLE(i2c, wm8960_i2c_id);

static struct i2c_driver wm8960_i2c_driver = {

                .driver = {

                                .name = "wm8960",

                                .owner = THIS_MODULE,

                },

                .probe =    wm8960_i2c_probe,

                .remove =   __devexit_p(wm8960_i2c_remove),

                .id_table = wm8960_i2c_id,

};

Here is the name used in your_board.c

static struct i2c_board_info mxc_i2c0_board_info[] __initdata = {

    {

        I2C_BOARD_INFO("wm8960", 0x1a),

    },

}

Machine driver imx-wm8960.c

Basically, the machine driver is the connection between wm8960.c and the i.MX.

It is modified base on the imx-wm8962.c. I didn't add the HP and MIC detection in this driver. If you need the HP and MIC detection, please take the imx-wm8962.c for reference.

Here is an example of my_board.c. The following platform data pass to the machine driver from my board.

static struct platform_device audio_wm8960_device = {

    .name = "imx-wm8960",

};

static struct mxc_audio_platform_data wm8960_pdata;

static int wm8960_clk_enable(int enable)

{

    if (enable)

        clk_enable(clko);

    else

        clk_disable(clko);

    return 0;

}

static int mxc_wm8960_init(void)

{

    int rate;

    clko = clk_get(NULL, "clko_clk");

    if (IS_ERR(clko)) {

        pr_err("can't get CLKO clock.\n");

        return PTR_ERR(clko);

    }

    /* both audio codec and comera use CLKO clk*/

    rate = clk_round_rate(clko, 24000000);

    clk_set_rate(clko, rate);

    wm8960_pdata.sysclk = rate;

    return 0;

}

static struct mxc_audio_platform_data wm8960_pdata = {

    .ssi_num = 1,

    .src_port = 2,

    .ext_port = 3,

    .init = mxc_wm8960_init,

    .clock_enable = wm8960_clk_enable,

};

I attach the driver and the machine driver here. I hope this document is useful for you.

Tags (2)
Attachments
Comments

Hi Jimmy,

Very good document. But for a external reference I´d rather point to a different link like the Linux Documentation or maybe AlsaProject

Very good point. I added your suggestion to my document. thanks.

Thanks jimmychan,

    Worthy Document.Really useful for Developers.

Hi all!

Thanks jimmychan​ for this document!

Please tell me, can I route audio paths in this codec accordingly to this scheme:

Mic1 (LINPUT1/2) directly to OUT3,

Line In (LINPUT3) directly to SPK_R,

Mic2 (RINPUT1/2) to CPU,

CPU to SPK_L.

"directly" means that sound passes through the codec with no help of CPU.

Is this configuration feasible?

Now I am able only to capture Mic1/2 with CPU and play captured sound.

%3CLINGO-SUB%20id%3D%22lingo-sub-1119101%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EWM8960%20audio%20codec%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1119101%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_10.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_10.png%22%20style%3D%22width%3A%20882px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111164i329DDA6AF68F98C7%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_10.png%22%20alt%3D%22pastedImage_10.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%233334ca%3B%20text-decoration%3A%20underline%3B%22%3E%3CSTRONG%3EIntroduction%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EThis%20is%20a%20sharing%20of%20my%20experience%20about%20porting%20the%20audio%20codec%20WM8960%20in%20Linux%20BSP.%20I%20know%20this%20driver%20is%20not%20the%20perfect%20one.%26nbsp%3B%20If%20you%20find%20any%20place%20is%20not%20good%20in%20the%20driver%2C%20please%20let%20me%20know.%3C%2FP%3E%3CP%3EThis%20driver%20is%20modified%20base%20on%20the%20wm8960.c%20in%20L3.0.35%20Linux%20BSP.%20This%20document%20is%20talking%20about%20how%20to%20modify%20the%20codec%20driver.%20The%20Audio%20Codec%20driver%20is%20located%20in%20%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%20font-family%3A%20'Calibri'%2C'sans-serif'%3B%22%3Elinux%2Fsound%2Fsoc%2Fcodec%2Fwm8960.c.%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%233334ca%3B%20text-decoration%3A%20underline%3B%20font-size%3A%2011pt%3B%20font-family%3A%20'Calibri'%2C'sans-serif'%3B%22%3E%3CSTRONG%3EALSA%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%20font-family%3A%20'Calibri'%2C'sans-serif'%3B%22%3EThe%20Audio%20Codec%20driver%20is%20based%20on%20ALSA%20to%20setup%20up%20all%20the%20things.%20For%20details%2C%20please%20see%20%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%20font-family%3A%20'Calibri'%2C'sans-serif'%3B%22%3E%3CA%20href%3D%22http%3A%2F%2Fwww.alsa-project.org%2Fmain%2Findex.php%2FMain_Page%22%20title%3D%22http%3A%2F%2Fwww.alsa-project.org%2Fmain%2Findex.php%2FMain_Page%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3EAlsaProject%3C%2FA%3E%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%20font-family%3A%20'Calibri'%2C'sans-serif'%3B%22%3E%20%3CA%20href%3D%22https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FAdvanced_Linux_Sound_Architecture%22%20title%3D%22https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FAdvanced_Linux_Sound_Architecture%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3EAdvanced%20Linux%20Sound%20Architecture%20-%20Wikipedia%2C%20the%20free%20encyclopedia%3C%2FA%3E.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%20font-family%3A%20'Calibri'%2C'sans-serif'%3B%22%3E%20kcontrols%20are%20defined%20in%20%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%20font-family%3A%20'Courier%20New'%3B%22%3Elinux%2Finclude%2Fsound%2Fsoc.h%20and%20soc-dapm.h.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%233334ca%3B%20text-decoration%3A%20underline%3B%20font-size%3A%2011pt%3B%20font-family%3A%20'Calibri'%2C'sans-serif'%3B%22%3E%3CSTRONG%3EAudio%20controls%20and%20path%20in%20WM8960%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%20style%3D%22text-align%3A%20left%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22text-align%3A%20left%3B%22%3E%3CSPAN%20style%3D%22%3B%20text-decoration%3A%20underline%3B%20font-size%3A%2011pt%3B%20font-family%3A%20'Calibri'%2C'sans-serif'%3B%22%3E%3CSTRONG%3ELeft%20and%20Right%20Input%20signal%20path%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%20font-family%3A%20'Calibri'%2C'sans-serif'%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_11.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_11.png%22%20style%3D%22width%3A%20857px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111165i0B9EFDA185396037%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_11.png%22%20alt%3D%22pastedImage_11.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_12.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_12.png%22%20style%3D%22width%3A%20849px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F29700i18B0E22C1E595402%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_12.png%22%20alt%3D%22pastedImage_12.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%20style%3D%22text-align%3A%20left%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22text-align%3A%20left%3B%22%3E%3CSPAN%20style%3D%22text-decoration%3A%20underline%3B%22%3E%3CSTRONG%3EOutput%20signal%20path%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_17.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_17.png%22%20style%3D%22width%3A%20831px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111166iC1663F0A4AD010CD%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_17.png%22%20alt%3D%22pastedImage_17.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%20font-family%3A%20'Calibri'%2C'sans-serif'%3B%22%3E%3CSTRONG%3EBase%20on%20the%20input%20and%20output%20signal%20diagrams%2C%20we%20can%20setup%20all%20the%20controls%20that%20we%20want%20in%20the%20driver.%20Such%20as%20switches%2C%20volume%20controls%2C%20PGA%20controls%20and%20so%20on.%20All%20the%20controls%20below%20can%20be%20used%20in%20the%20alsamixer.%3C%2FSTRONG%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3Estatic%20const%20struct%20snd_kcontrol_new%20wm8960_snd_controls%5B%5D%20%3D%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_DOUBLE_R_TLV(%22PCM%20DAC%20Playback%20Volume%22%2C%20WM8960_LDAC%2C%20WM8960_RDAC%2C%200%2C%20255%2C%200%2C%20dac_tlv)%2C%20%2F%2FLDACVOL%20%2C%20RDACVOL%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_DOUBLE_R_TLV(%22PCM%20ADC%20Capture%20Volume%22%2C%20WM8960_LADC%2C%20WM8960_RADC%2C%200%2C%20255%2C%200%2C%20adc_tlv)%2C%20%2F%2FLADCVOL%2C%20RADCVOL%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_DOUBLE_R_TLV(%22Headphone%20Volume%22%2C%20WM8960_LOUT1%2C%20WM8960_ROUT1%2C%200%2C%20127%2C%200%2C%20out_tlv)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_DOUBLE_R(%22Headphone%20ZC%20Switch%22%2C%20WM8960_LOUT1%2C%20WM8960_ROUT1%2C%26nbsp%3B%26nbsp%3B%26nbsp%3B%207%2C%201%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_DOUBLE_R_TLV(%22Speaker%20Volume%22%2C%20WM8960_LOUT2%2C%20WM8960_ROUT2%2C%200%2C%20127%2C%200%2C%20out_tlv)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_DOUBLE_R(%22Speaker%20ZC%20Switch%22%2C%20WM8960_LOUT2%2C%20WM8960_ROUT2%2C%207%2C%201%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_DOUBLE_R(%22Capture%20Volume%20ZC%20Switch%22%2C%20WM8960_LINVOL%2C%20WM8960_RINVOL%2C%206%2C%201%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_SINGLE_TLV(%22Input%20Volume%20of%20LINPUT1%22%2C%20WM8960_LINVOL%2C%200%2C%2063%2C%200%2C%20in_tlv)%2C%26nbsp%3B%20%2F%2FLINVOL%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_SINGLE_TLV(%22Input%20Volume%20of%20RINPUT1%22%2C%20WM8960_RINVOL%2C%200%2C%2063%2C%200%2C%20in_tlv)%2C%26nbsp%3B%20%2F%2FRINVOL%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_SINGLE_TLV(%22Input%20Boost%20Volume%20LINPUT3%22%2C%20WM8960_INBMIX1%2C%204%2C%207%2C%200%2C%20boost_tlv)%2C%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F%2FRIN3BOOST%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_SINGLE_TLV(%22Input%20Boost%20Volume%20LINPUT2%22%2C%20WM8960_INBMIX1%2C%201%2C%207%2C%200%2C%20boost_tlv)%2C%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F%2FRIN2BOOST%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_SINGLE_TLV(%22Input%20Boost%20Volume%20RINPUT3%22%2C%20WM8960_INBMIX2%2C%204%2C%207%2C%200%2C%20boost_tlv)%2C%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F%2FLIN3BOOST%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_SINGLE_TLV(%22Input%20Boost%20Volume%20RINPUT2%22%2C%20WM8960_INBMIX2%2C%201%2C%207%2C%200%2C%20boost_tlv)%2C%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F%2FLIN2BOOST%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_SINGLE_TLV(%22PGA%20LB2LOVOL-Bypass%20from%20Left%20Boost%22%2C%20WM8960_BYPASS1%2C%204%2C%207%2C%201%2C%20bypass_tlv)%2C%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F%2FLB2LOVOL%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_SINGLE_TLV(%22PGA%20LI2LOVOL-Bypass%20from%20LINPUT3%22%2C%20WM8960_LOUTMIX%2C%204%2C%207%2C%201%2C%20bypass_tlv)%2C%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F%2FLI2LOVOL%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_SINGLE_TLV(%22PGA%20RB2ROVOL-Bypass%20from%20Right%20Boost%22%2C%20WM8960_BYPASS2%2C%204%2C%207%2C%201%2C%20bypass_tlv)%2C%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F%2FRB2ROVOL%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_SINGLE_TLV(%22PGA%20RI2ROVOL-Bypass%20from%20RINPUT3%22%2C%20WM8960_ROUTMIX%2C%204%2C%207%2C%201%2C%20bypass_tlv)%2C%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F%2FRI2ROVOL%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_SINGLE(%22Capture%20Mute%20(Left)%22%2C%20WM8960_LINVOL%2C%207%2C%201%2C%200)%2C%20%2F%2F%20LINMUTE%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_SINGLE(%22Capture%20Mute%20(Right)%22%2C%20WM8960_RINVOL%2C%207%2C%201%2C%200)%2C%20%2F%2F%20RINMUTE%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_SINGLE(%22PCM%20Playback%20-6dB%20Switch%22%2C%20WM8960_DACCTL1%2C%207%2C%201%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_SINGLE(%22Speaker%20DC%20gain%22%2C%20WM8960_CLASSD3%2C%203%2C%205%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_SINGLE(%22Speaker%20AC%20gain%22%2C%20WM8960_CLASSD3%2C%200%2C%205%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_ENUM(%22ADC%20Polarity%22%2C%20wm8960_enum%5B0%5D)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_SINGLE(%22ADC%20High%20Pass%20Filter%20Switch%22%2C%20WM8960_DACCTL1%2C%200%2C%201%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_ENUM(%22DAC%20Polarity%22%2C%20wm8960_enum%5B2%5D)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_SINGLE_BOOL_EXT(%22DAC%20Deemphasis%20Switch%22%2C%200%2C%20wm8960_get_deemph%2C%20wm8960_put_deemph)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_ENUM(%223D%20Filter%20Upper%20Cut-Off%22%2C%20wm8960_enum%5B2%5D)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_ENUM(%223D%20Filter%20Lower%20Cut-Off%22%2C%20wm8960_enum%5B3%5D)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_SINGLE(%223D%20Depth%22%2C%20WM8960_3D%2C%201%2C%2015%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_SINGLE(%223D%22%2C%20WM8960_3D%2C%200%2C%201%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_ENUM(%22ALC%20Function%22%2C%20wm8960_enum%5B4%5D)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_SINGLE(%22ALC%20Max%20Gain%22%2C%20WM8960_ALC1%2C%204%2C%207%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_SINGLE(%22ALC%20Target%22%2C%20WM8960_ALC1%2C%200%2C%2015%2C%201)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_SINGLE(%22ALC%20Min%20Gain%22%2C%20WM8960_ALC2%2C%204%2C%207%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_SINGLE(%22ALC%20Hold%20Time%22%2C%20WM8960_ALC2%2C%200%2C%2015%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_ENUM(%22ALC%20Mode%22%2C%20wm8960_enum%5B5%5D)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_SINGLE(%22ALC%20Decay%22%2C%20WM8960_ALC3%2C%204%2C%2015%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_SINGLE(%22ALC%20Attack%22%2C%20WM8960_ALC3%2C%200%2C%2015%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_SINGLE(%22Noise%20Gate%20Threshold%22%2C%20WM8960_NOISEG%2C%203%2C%2031%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_SINGLE(%22Noise%20Gate%20Switch%22%2C%20WM8960_NOISEG%2C%200%2C%201%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_ENUM(%22Capture%20Left%20Boost%22%2C%20wm8960_enum%5B6%5D)%2C%20%2F%2FLMICBOOST%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3ESOC_ENUM(%22Capture%20Right%20Boost%22%2C%20wm8960_enum%5B7%5D)%2C%20%2F%2FRMICBOOT%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-size%3A%2010pt%3B%22%3E%7D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22text-decoration%3A%20underline%3B%20font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3E1.%20SOC_SINGLE(xname%2C%20reg%2C%20shift%2C%20max%2C%20invert)%3C%2FSTRONG%3E%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3ETo%20setup%20a%20simple%20switch%2C%20we%20can%20use%20SOC_SINGLE.%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_64.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_64.png%22%20style%3D%22width%3A%20682px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F21231i322D28DCBF91C7C2%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_64.png%22%20alt%3D%22pastedImage_64.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%22%3Ee.g%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20%232873ee%3B%22%3ESOC_SINGLE(%22PCM%20Playback%20-6dB%20Switch%22%2C%20WM8960_DACCTL1%2C%207%2C%201%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20arial%2Chelvetica%2Csans-serif%3B%22%3E-%20The%20name%20of%20this%20control%20is%20%E2%80%9CPCM%20Playback%20-6dB%20Switch%E2%80%9D.%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20arial%2Chelvetica%2Csans-serif%3B%22%3E-%20The%20register%20in%20WM8960%20is%20WM8960_DACCTL1%20.%20(the%20register%20address%20is%200x5%2C%20defined%20in%20wm8960.h)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20arial%2Chelvetica%2Csans-serif%3B%22%3E-%20%E2%80%987%E2%80%99%20%3A%20The%207th%20bit%20in%20DACCTL1%20register%20is%20used%20to%20enable%2Fdisable%20the%20DAC%206dB%20Attenuate.%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20arial%2Chelvetica%2Csans-serif%3B%22%3E-%20%E2%80%981%E2%80%99%20%3A%20Only%20one%20enable%20or%20disable%20option.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20arial%2Chelvetica%2Csans-serif%3B%22%3E-%20%E2%80%980%E2%80%99%20%3A%20the%20value%20you%20set%20is%20not%20inverted.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22text-decoration%3A%20underline%3B%20font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3E2.%20SOC_SINGLE_TLV(xname%2C%20reg%2C%20shift%2C%20max%2C%20invert%2C%20tlv_array)%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3ETo%20setup%20a%20switch%20with%20levels%2C%20we%20can%20use%20SOC_SINGLE_TLV.%3C%2FSTRONG%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%22%3Ee.g.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_27.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_27.png%22%20style%3D%22width%3A%20839px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F29814i47C069B1A1B285C0%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_27.png%22%20alt%3D%22pastedImage_27.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%22%3EIn%20this%20example%2C%20the%20left%20input%20volume%20control%20is%20from%20000000(-17.25dB)%20to%20111111(%2B30dB).%20Each%20step%20is%200.75dB.%20Total%20is%2063%20steps.%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-family%3A%20'Courier%20New'%3B%22%3ESOC_SINGLE_TLV(%22Input%20Volume%20of%20LINPUT1%22%2C%20WM8960_LINVOL%2C%200%2C%2063%2C%200%2C%20in_tlv)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%22%3EThe%20scale%20of%20in_tlv%20declare%20like%20this%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20%232873ee%3B%22%3Estatic%20const%20DECLARE_TLV_DB_SCALE(in_tlv%2C%20-1725%2C%2075%2C%200)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3Ein_tlv%20%3A%20the%20name%20of%20the%20scale.%3C%2FP%3E%3CP%3E-1725%20%3A%20start%20from%20-17.25dB%3C%2FP%3E%3CP%3E75%3A%20each%20step%20is%200.75dB%3C%2FP%3E%3CP%3E0%3A%20the%20step%20is%20start%20from%200.%20For%20some%20volume%20control%20case%20the%20first%20step%20is%20%22mute%22%2C%20then%20the%20step%20is%20start%20from%201%20so%20change%20this%20number%20to%201.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%22%3Efor%20example%3A%20%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%22%3E%20The%200000%200000%20of%20the%20DAC%20volume%20control%20is%20digital%20mute.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_62.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_62.png%22%20style%3D%22width%3A%20762px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F57919iB2E6AEB972BAF9B5%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_62.png%22%20alt%3D%22pastedImage_62.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20%232873ee%3B%22%3Estatic%20const%20DECLARE_TLV_DB_SCALE(dac_tlv%2C%20-12700%2C%2050%2C%201)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22text-decoration%3A%20underline%3B%20font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3E3.%20SOC_DOUBLE_R(xname%2C%20reg_left%2C%20reg_right%2C%20xshift%2C%20xmax%2C%20xinvert)%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3ESOC_DOUBLE_R%20is%20a%20stereo%20version%20of%20SOC_SINGLE.%20You%20can%20control%20the%20left%20and%20right%20channel%20at%20the%20same%20time.%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%22%3Ee.g.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20%232873ee%3B%22%3ESOC_DOUBLE_R(%22Headphone%20ZC%20Switch%22%2C%20WM8960_LOUT1%2C%20WM8960_ROUT1%2C%207%2C%201%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22text-decoration%3A%20underline%3B%20font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3E4.%20SOC_DOUBLE_R_TLV(xname%2C%20reg_left%2C%20reg_right%2C%20xshift%2C%20xmax%2C%20xinvert%2C%20tlv_array)%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3ESOC_DOUBLE_R_TLV%20is%20the%20stereo%20version%20of%20SOC_SINGLE_TLV.%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%22%3Ee.g.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20%232873ee%3B%22%3ESOC_DOUBLE_R_TLV(%22PCM%20DAC%20Playback%20Volume%22%2C%20WM8960_LDAC%2C%20WM8960_RDAC%2C%200%2C%20255%2C%200%2C%20dac_tlv)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22text-decoration%3A%20underline%3B%20font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3E5.%20SOC_ENUM_SINGLE(xreg%2C%20xshift%2C%20xmax%2C%20xtexts)%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3EWhen%20the%20control%20option%20are%20some%20texts%2C%20we%20can%20use%20SOC_ENUM%20to%20enum%20the%20options.%3C%2FSTRONG%3E%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%22%3Ee.g.%20MIC%20boost%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_63.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_63.png%22%20style%3D%22width%3A%20522px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F57924i48ACCF5E3EF3E362%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_63.png%22%20alt%3D%22pastedImage_63.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%22%3E5.1.%20setup%20the%20array%20for%20the%20texts.%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20%232873ee%3B%22%3Estatic%20const%20char%20*wm8960_micboost%5B%5D%20%3D%20%7B%220dB%22%2C%22%2B13dB%22%2C%22%2B20dB%22%2C%22%2B29dB%22%7D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%22%3E5.2.%20use%20the%20SOC_ENUM_SINGLE.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20%232873ee%3B%22%3Estatic%20const%20struct%20soc_enum%20wm8960_enum%5B%5D%20%3D%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20SOC_ENUM_SINGLE(WM8960_DACCTL1%2C%205%2C%204%2C%20wm8960_polarity)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20SOC_ENUM_SINGLE(WM8960_DACCTL2%2C%205%2C%204%2C%20wm8960_polarity)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20SOC_ENUM_SINGLE(WM8960_3D%2C%206%2C%202%2C%20wm8960_3d_upper_cutoff)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20SOC_ENUM_SINGLE(WM8960_3D%2C%205%2C%202%2C%20wm8960_3d_lower_cutoff)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20SOC_ENUM_SINGLE(WM8960_ALC1%2C%207%2C%204%2C%20wm8960_alcfunc)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20SOC_ENUM_SINGLE(WM8960_ALC3%2C%208%2C%202%2C%20wm8960_alcmode)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20SOC_ENUM_SINGLE(WM8960_LINPATH%2C%204%2C%204%2C%20%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3Ewm8960_micboost%3C%2FSPAN%3E)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20SOC_ENUM_SINGLE(WM8960_RINPATH%2C%204%2C%204%2C%20%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3Ewm8960_micboost%3C%2FSPAN%3E)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20'Courier%20New'%3B%20color%3A%20%232873ee%3B%22%3E%7D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%22%3E5.3.%26nbsp%3B%20use%20SOC_ENUM%20to%20add%20the%20controls%20for%20MIC%20boost.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3ESOC_ENUM(%22Capture%20Left%20Boost%22%2C%20wm8960_enum%5B6%5D)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3ESOC_ENUM(%22Capture%20Right%20Boost%22%2C%20wm8960_enum%5B7%5D)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EAfter%20created%20all%20the%20controls%2C%20we%20can%20start%20to%20create%20the%20switches.%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThe%20following%20switches%20created%20base%20on%20the%20input%20and%20output%20diagrams.%20I%20used%20the%20same%20name%20from%20datasheet%20of%20each%20switch.%20It%20will%20more%20easy%20to%20find%20out%20the%20proper%20switch%20in%20alsamixer.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3Estatic%20const%20struct%20snd_kcontrol_new%20wm8960_lin%5B%5D%20%3D%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESOC_DAPM_SINGLE(%22%26lt%3B-%20LMP2%22%2C%20WM8960_LINPATH%2C%206%2C%201%2C%200)%2C%20%2F%2FLMP2%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESOC_DAPM_SINGLE(%22%26lt%3B-%20LMP3%22%2C%20WM8960_LINPATH%2C%207%2C%201%2C%200)%2C%20%2F%2FLMP3%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESOC_DAPM_SINGLE(%22%26lt%3B-%20LMN1%22%2C%20WM8960_LINPATH%2C%208%2C%201%2C%200)%2C%20%2F%2FLMN1%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3E%7D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3Estatic%20const%20struct%20snd_kcontrol_new%20wm8960_lin_boost%5B%5D%20%3D%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESOC_DAPM_SINGLE(%22%26lt%3B-%20LMIC2B%22%2C%20WM8960_LINPATH%2C%203%2C%201%2C%200)%2C%20%2F%2FLMIC2B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3E%7D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3Estatic%20const%20struct%20snd_kcontrol_new%20wm8960_rin%5B%5D%20%3D%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESOC_DAPM_SINGLE(%22%26lt%3B-%20RMP2%22%2C%20WM8960_RINPATH%2C%206%2C%201%2C%200)%2C%20%2F%2FRMP2%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESOC_DAPM_SINGLE(%22%26lt%3B-%20RMP3%22%2C%20WM8960_RINPATH%2C%207%2C%201%2C%200)%2C%20%2F%2FRMP3%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESOC_DAPM_SINGLE(%22%26lt%3B-%20RMN1%22%2C%20WM8960_RINPATH%2C%208%2C%201%2C%200)%2C%20%2F%2FRMN1%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3E%7D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3Estatic%20const%20struct%20snd_kcontrol_new%20wm8960_rin_boost%5B%5D%20%3D%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESOC_DAPM_SINGLE(%22%26lt%3B-%20RMIC2B%22%2C%20WM8960_RINPATH%2C%203%2C%201%2C%200)%2C%20%2F%2FRMIC2B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3E%7D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3Estatic%20const%20struct%20snd_kcontrol_new%20wm8960_loutput_mixer%5B%5D%20%3D%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESOC_DAPM_SINGLE(%22%26lt%3B-%20LD2LO%22%2C%20WM8960_LOUTMIX%2C%208%2C%201%2C%200)%2C%20%2F%2FLD2LO%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESOC_DAPM_SINGLE(%22%26lt%3B-%20LI2LO%22%2C%20WM8960_LOUTMIX%2C%207%2C%201%2C%200)%2C%20%2F%2FLI2LO%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESOC_DAPM_SINGLE(%22%26lt%3B-%20LB2LO%22%2C%20WM8960_BYPASS1%2C%207%2C%201%2C%200)%2C%20%2F%2FLB2LO%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3E%7D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3Estatic%20const%20struct%20snd_kcontrol_new%20wm8960_routput_mixer%5B%5D%20%3D%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESOC_DAPM_SINGLE(%22%26lt%3B-%20RD2RO%22%2C%20WM8960_ROUTMIX%2C%208%2C%201%2C%200)%2C%20%2F%2FRD2RO%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESOC_DAPM_SINGLE(%22%26lt%3B-%20RI2RO%22%2C%20WM8960_ROUTMIX%2C%207%2C%201%2C%200)%2C%20%2F%2FRI2RO%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESOC_DAPM_SINGLE(%22%26lt%3B-%20RB2RO%22%2C%20WM8960_BYPASS2%2C%207%2C%201%2C%200)%2C%20%2F%2FRB2RO%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3E%7D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3Estatic%20const%20struct%20snd_kcontrol_new%20wm8960_mono_out%5B%5D%20%3D%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESOC_DAPM_SINGLE(%22%26lt%3B-%20L2MO%22%2C%20WM8960_MONOMIX1%2C%207%2C%201%2C%200)%2C%20%2F%2FL2MO%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESOC_DAPM_SINGLE(%22%26lt%3B-%20R2MO%22%2C%20WM8960_MONOMIX2%2C%207%2C%201%2C%200)%2C%20%2F%2FR2MO%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3E%7D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EThen%2C%20create%20the%20inputs%2C%20ADC%2C%20DAC%2C%20mixers%2C%20PGA%20and%20outputs.%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3Estatic%20const%20struct%20snd_soc_dapm_widget%20wm8960_dapm_widgets%5B%5D%20%3D%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_INPUT(%22LINPUT1%22)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_INPUT(%22RINPUT1%22)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_INPUT(%22LINPUT2%22)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_INPUT(%22RINPUT2%22)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_INPUT(%22LINPUT3%22)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_INPUT(%22RINPUT3%22)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_MICBIAS(%22MICB%22%2C%20WM8960_POWER1%2C%201%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_MIXER(%22Left%20Boost%20Mixer%22%2C%20WM8960_POWER1%2C%205%2C%200%2C%20wm8960_lin_boost%2C%20ARRAY_SIZE(wm8960_lin_boost))%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_MIXER(%22Right%20Boost%20Mixer%22%2C%20WM8960_POWER1%2C%204%2C%200%2C%20wm8960_rin_boost%2C%20ARRAY_SIZE(wm8960_rin_boost))%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_MIXER(%22Left%20Input%20PGA%22%2C%20WM8960_POWER3%2C%205%2C%200%2C%20wm8960_lin%2C%20ARRAY_SIZE(wm8960_lin))%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_MIXER(%22Right%20Input%20PGA%22%2C%20WM8960_POWER3%2C%204%2C%200%2C%20wm8960_rin%2C%20ARRAY_SIZE(wm8960_rin))%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_ADC(%22Left%20ADC%22%2C%20%22Capture%22%2C%20WM8960_POWER1%2C%203%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_ADC(%22Right%20ADC%22%2C%20%22Capture%22%2C%20WM8960_POWER1%2C%202%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_DAC(%22Left%20DAC%22%2C%20%22Playback%22%2C%20WM8960_POWER2%2C%208%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_DAC(%22Right%20DAC%22%2C%20%22Playback%22%2C%20WM8960_POWER2%2C%207%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_MIXER(%22Left%20Output%20Mixer%22%2C%20WM8960_POWER3%2C%203%2C%200%2C%20wm8960_loutput_mixer%2C%20ARRAY_SIZE(wm8960_loutput_mixer))%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_MIXER(%22Right%20Output%20Mixer%22%2C%20WM8960_POWER3%2C%202%2C%200%2C%20wm8960_routput_mixer%2C%20ARRAY_SIZE(wm8960_routput_mixer))%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_PGA(%22Left%20HP%20PGA%22%2C%20WM8960_POWER2%2C%206%2C%200%2C%20NULL%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_PGA(%22Right%20HP%20PGA%22%2C%20WM8960_POWER2%2C%205%2C%200%2C%20NULL%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_PGA(%22Left%20Speaker%20PGA%22%2C%20WM8960_POWER2%2C%204%2C%200%2C%20NULL%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_PGA(%22Right%20Speaker%20PGA%22%2C%20WM8960_POWER2%2C%203%2C%200%2C%20NULL%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_PGA(%22Right%20Speaker%20Output%22%2C%20WM8960_CLASSD1%2C%207%2C%200%2C%20NULL%2C%200)%2C%20%2F%2FSPK_OP_EN%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_PGA(%22Left%20Speaker%20Output%22%2C%20WM8960_CLASSD1%2C%206%2C%200%2C%20NULL%2C%200)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_OUTPUT(%22SPK_LP%22)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_OUTPUT(%22SPK_LN%22)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_OUTPUT(%22HP_L%22)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_OUTPUT(%22HP_R%22)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_OUTPUT(%22SPK_RP%22)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_OUTPUT(%22SPK_RN%22)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3ESND_SOC_DAPM_OUTPUT(%22OUT3%22)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%22%3E%7D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ENow%2C%20we%20can%20start%20to%20route%20the%20audio%20path.%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThe%20path%20is%20from%20right%20to%20left%20%2C%20like%20%3A%20%7B%20%E2%80%9Cdestination%E2%80%9D%2C%20%E2%80%9Cswitch%E2%80%9D%2C%20%E2%80%9Csource%E2%80%9D%20%7D%3C%2FP%3E%3CP%3ESo%2C%20lets%20take%20the%20LINPUT1%20to%20ADC%20as%20an%20example%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_59.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_59.png%22%20style%3D%22width%3A%20579px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F57925iB68B3131BF592B4C%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_59.png%22%20alt%3D%22pastedImage_59.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%7B%20%22Left%20Input%20PGA%22%2C%20%22%26lt%3B-%20LMN1%22%2C%20%22LINPUT1%22%20%7D%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%7B%20%22Left%20Boost%20Mixer%22%2C%20%22%26lt%3B-%20LMIC2B%22%2C%20%22Left%20Input%20PGA%22%20%7D%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%7B%20%22Left%20ADC%22%2C%20NULL%2C%20%22Left%20Boost%20Mixer%22%20%7D%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EAnother%20example%20is%20DAC%20to%20Headphone.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_61.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_61.png%22%20style%3D%22width%3A%20515px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F21233i824B6D8106597A9A%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_61.png%22%20alt%3D%22pastedImage_61.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%20%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%20%22Left%20Output%20Mixer%22%2C%20%22%26lt%3B-%20LD2LO%22%2C%20%22Left%20DAC%22%20%7D%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%20%3CSPAN%20style%3D%22color%3A%20%237ed529%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%233a0699%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%20%22Right%20Output%20Mixer%22%2C%20%22%26lt%3B-%20RD2RO%22%2C%20%22Right%20DAC%22%20%7D%3C%2FSPAN%3E%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%20%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%20%22Left%20HP%20PGA%22%2C%20NULL%2C%20%22Left%20Output%20Mixer%22%20%7D%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%20%3CSPAN%20style%3D%22color%3A%20%233a0699%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%20%22Right%20HP%20PGA%22%2C%20NULL%2C%20%22Right%20Output%20Mixer%22%20%7D%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%20%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%20%22HP_L%22%2C%20NULL%2C%20%22Left%20HP%20PGA%22%20%7D%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%20%3CSPAN%20style%3D%22color%3A%20%233a0699%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%20%22HP_R%22%2C%20NULL%2C%20%22Right%20HP%20PGA%22%20%7D%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EIn%20linux%2C%20you%20can%20run%20%22alsamixer%22%20to%20turn%20on%2Foff%20the%20switches%20and%20adjust%20the%20volumes.%20%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_66.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_66.png%22%20style%3D%22width%3A%20738px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111167i75CFE9282E419D5B%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_66.png%22%20alt%3D%22pastedImage_66.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E(this%20picture%20is%20an%20example%20of%20alsamixer%20of%20other%20codec%2C%20not%20for%20wm8960)%3C%2FP%3E%3CP%3EIn%20alsamixer%2C%20use%20'M'%20to%20turn%20the%20switch%20on%2Foff%2C%26nbsp%3B%20use%20arrow%20keys%20to%20control%20the%20volumes.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3Ewm8960_dai_ops%20is%20another%20important%20part%20in%20the%20driver.%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EHere%20is%20the%20ops%20of%20the%20wm8960_dai.%3C%2FP%3E%3CP%3Estatic%20struct%20snd_soc_dai_ops%20wm8960_dai_ops%20%3D%20%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.hw_params%20%3D%20wm8960_hw_params%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.digital_mute%20%3D%20wm8960_mute%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.set_fmt%20%3D%20wm8960_set_dai_fmt%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.set_clkdiv%20%3D%20wm8960_set_dai_clkdiv%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.set_pll%20%3D%20wm8960_set_dai_pll%2C%3C%2FP%3E%3CP%3E%7D%3B%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3Ewm8960_hw_params%20%3A%20used%20to%20set%20the%20PCM%20format%20(16bit%2F24bit)%2C%20set%20the%20deemph%2C%20alc_rates%20and%20etc.%3C%2FP%3E%3CP%3Ewm8960_mute%3A%26nbsp%3B%20used%20to%20mute%20the%20output%3C%2FP%3E%3CP%3Ewm8960_set_dai_fmt%20%3A%20used%20to%20set%20the%20Master%2FSlave%20mode%2C%20set%20the%20interface%20format%20(I2S%2C%20DSP%2C%20Left%20justified%20and%20Right%20justified)%20and%20set%20the%20clock%20inversion.%3C%2FP%3E%3CP%3Ewm8960_set_dai_clkdiv%3A%20used%20to%20set%20the%20CLK%20divider%20such%20as%20DACDIV%2C%20ADCDIV%2C%20BCLKDIV%20and%20so%20on.%3C%2FP%3E%3CP%3Ewm8960_set_dai_pll%3A%20used%20to%20calculate%20the%20proper%20PLL%20values.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EIn%20the%20wm8960_set_dai_pll%2C%20we%20need%20to%20calculate%20the%20proper%20PLL%20values.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_68.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_68.png%22%20style%3D%22width%3A%20794px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F111168iCAB1E881A14AA6DF%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_68.png%22%20alt%3D%22pastedImage_68.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EBase%20on%20the%20table%2C%20if%20the%20MCLK%20%26gt%3B14.4%2C%20the%20sysclk%20prescale%20divider%20is%202.%20So%2C%20set%20the%20sysclk%20pre-divider%20to%202%20before%20finding%20pll_factors.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-family%3A%20courier%20new%2Ccourier%3B%22%3Eif%20(freq_in%20%26gt%3B%2015000000%20)%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-family%3A%20courier%20new%2Ccourier%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F*%20update%20sysclk%20div%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-family%3A%20courier%20new%2Ccourier%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20reg%20%3D%20snd_soc_read(codec%2C%20WM8960_CLOCK1)%20%26amp%3B%200x1f9%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-family%3A%20courier%20new%2Ccourier%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20snd_soc_write(codec%2C%20WM8960_CLOCK1%2C%20reg%20%7C%200x4)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-family%3A%20courier%20new%2Ccourier%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20clk_in%20%3D%20clk_in%2F2%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-family%3A%20courier%20new%2Ccourier%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-family%3A%20courier%20new%2Ccourier%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if%20(freq_in%20%26amp%3B%26amp%3B%20freq_out)%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-family%3A%20courier%20new%2Ccourier%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20ret%20%3D%20pll_factors(clk_in%2C%20freq_out%2C%20%26amp%3Bpll_div)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-family%3A%20courier%20new%2Ccourier%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if%20(ret%20!%3D%200)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-family%3A%20courier%20new%2Ccourier%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20return%20ret%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232873ee%3B%20font-family%3A%20courier%20new%2Ccourier%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EIn%20the%20driver%2C%20there%20are%20two%20names%20are%20important.%20One%20is%20the%20name%20of%20codec%20dai.%20The%20name%20is%20%E2%80%9Cwm8960%E2%80%9D.%20Make%20sure%20this%20codec%20dai%20name%20is%20the%20same%20codec%20dai%20name%20used%20in%20the%20imx-wm8960.c.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3Estatic%20struct%20snd_soc_dai_driver%20wm8960_dai%20%3D%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.name%20%3D%20%22wm8960%22%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.playback%20%3D%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.stream_name%20%3D%20%22Playback%22%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.channels_min%20%3D%201%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.channels_max%20%3D%202%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.rates%20%3D%20WM8960_RATES%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.formats%20%3D%20WM8960_FORMATS%2C%7D%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.capture%20%3D%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.stream_name%20%3D%20%22Capture%22%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.channels_min%20%3D%201%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.channels_max%20%3D%202%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.rates%20%3D%20WM8960_RATES%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.formats%20%3D%20WM8960_FORMATS%2C%7D%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.ops%20%3D%20%26amp%3Bwm8960_dai_ops%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.symmetric_rates%20%3D%201%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%7D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EAnother%20name%20is%20the%20I2C%20device%20id.%20Make%20sure%20the%20I2C%20name%20is%20same%20as%20the%20name%20used%20in%20your_board.c%20file.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23303030%3B%22%3Estatic%20const%3C%2FSPAN%3E%20struct%20i2c_device_id%20wm8960_i2c_id%5B%5D%20%3D%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%20%22wm8960%22%2C%200%20%7D%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%20%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%7D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3EMODULE_DEVICE_TABLE(i2c%2C%20wm8960_i2c_id)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3Estatic%20struct%20i2c_driver%20wm8960_i2c_driver%20%3D%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.driver%20%3D%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.name%20%3D%20%22wm8960%22%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.owner%20%3D%20THIS_MODULE%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.probe%20%3D%26nbsp%3B%26nbsp%3B%26nbsp%3B%20wm8960_i2c_probe%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.remove%20%3D%26nbsp%3B%26nbsp%3B%20__devexit_p(wm8960_i2c_remove)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.id_table%20%3D%20wm8960_i2c_id%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%7D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EHere%20is%20the%20name%20used%20in%20your_board.c%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3Estatic%20struct%20i2c_board_info%20mxc_i2c0_board_info%5B%5D%20__initdata%20%3D%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20I2C_BOARD_INFO(%22wm8960%22%2C%200x1a)%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EMachine%20driver%20imx-wm8960.c%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EBasically%2C%20the%20machine%20driver%20is%20the%20connection%20between%20wm8960.c%20and%20the%20i.MX.%20%3C%2FP%3E%3CP%3EIt%20is%20modified%20base%20on%20the%20imx-wm8962.c.%20I%20didn't%20add%20the%20HP%20and%20MIC%20detection%20in%20this%20driver.%20If%20you%20need%20the%20HP%20and%20MIC%20detection%2C%20please%20take%20the%20imx-wm8962.c%20for%20reference.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EHere%20is%20an%20example%20of%20my_board.c.%20The%20following%20platform%20data%20pass%20to%20the%20machine%20driver%20from%20my%20board.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3Estatic%20struct%20platform_device%20audio_wm8960_device%20%3D%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.name%20%3D%20%22imx-wm8960%22%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%7D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3Estatic%20struct%20mxc_audio_platform_data%20wm8960_pdata%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3Estatic%20int%20wm8960_clk_enable(int%20enable)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if%20(enable)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20clk_enable(clko)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20else%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20clk_disable(clko)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20return%200%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3Estatic%20int%20mxc_wm8960_init(void)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20int%20rate%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20clko%20%3D%20clk_get(NULL%2C%20%22clko_clk%22)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if%20(IS_ERR(clko))%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20pr_err(%22can't%20get%20CLKO%20clock.%5Cn%22)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20return%20PTR_ERR(clko)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F*%20both%20audio%20codec%20and%20comera%20use%20CLKO%20clk*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20rate%20%3D%20clk_round_rate(clko%2C%2024000000)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20clk_set_rate(clko%2C%20rate)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20wm8960_pdata.sysclk%20%3D%20rate%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20return%200%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3Estatic%20struct%20mxc_audio_platform_data%20wm8960_pdata%20%3D%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.ssi_num%20%3D%201%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.src_port%20%3D%202%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.ext_port%20%3D%203%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.init%20%3D%20mxc_wm8960_init%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.clock_enable%20%3D%20wm8960_clk_enable%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20courier%20new%2Ccourier%3B%20color%3A%20%232873ee%3B%22%3E%7D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EI%20attach%20the%20driver%20and%20the%20machine%20driver%20here.%20I%20hope%20this%20document%20is%20useful%20for%20you.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1119105%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20WM8960%20audio%20codec%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1119105%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%20class%3D%22j-username-wrap%22%3EHi%20all!%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22j-username-wrap%22%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22j-username-wrap%22%3EThanks%20%3CSPAN%20class%3D%22j-username-wrap%22%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Fpeople%2Fjimmychan%22%20target%3D%22_blank%22%3Ejimmychan%3C%2FA%3E%E2%80%8B%20for%20this%20document!%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22j-username-wrap%22%3E%3CSPAN%20class%3D%22j-username-wrap%22%3EPlease%20tell%20me%2C%20can%20I%20route%20audio%20paths%20in%20this%20codec%20accordingly%20to%20this%20scheme%3A%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22j-username-wrap%22%3E%3CSPAN%20class%3D%22j-username-wrap%22%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22j-username-wrap%22%3E%3CSPAN%20class%3D%22j-username-wrap%22%3EMic1%20(LINPUT1%2F2)%20directly%20to%20OUT3%2C%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22j-username-wrap%22%3E%3CSPAN%20class%3D%22j-username-wrap%22%3ELine%20In%20(LINPUT3)%20directly%20to%20SPK_R%2C%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22j-username-wrap%22%3E%3CSPAN%20class%3D%22j-username-wrap%22%3EMic2%20(RINPUT1%2F2)%20to%20CPU%2C%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22j-username-wrap%22%3E%3CSPAN%20class%3D%22j-username-wrap%22%3ECPU%20to%20SPK_L.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22j-username-wrap%22%3E%3CSPAN%20class%3D%22j-username-wrap%22%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22j-username-wrap%22%3E%3CSPAN%20class%3D%22j-username-wrap%22%3E%22directly%22%20means%20that%20sound%20passes%20through%20the%20codec%20with%20no%20help%20of%20CPU.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22j-username-wrap%22%3E%3CSPAN%20class%3D%22j-username-wrap%22%3EIs%20this%20configuration%20%3CSPAN%20class%3D%22translation-chunk%22%20data-align%3D%2219%3A29%22%3Efeasible%3F%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22j-username-wrap%22%3E%3CSPAN%20class%3D%22j-username-wrap%22%3E%3CSPAN%20class%3D%22translation-chunk%22%20data-align%3D%2219%3A29%22%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22j-username-wrap%22%3E%3CSPAN%20class%3D%22j-username-wrap%22%3E%3CSPAN%20class%3D%22translation-chunk%22%20data-align%3D%2219%3A29%22%3ENow%20I%20am%20able%20only%20to%20capture%20Mic1%2F2%20with%20CPU%20and%20play%20captured%20sound.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1119104%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20WM8960%20audio%20codec%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1119104%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThanks%20%3CSPAN%20style%3D%22color%3A%20%239aa9af%3B%20font-family%3A%20arial%2C%20helvetica%2C%20'helvetica%20neue'%2C%20verdana%2C%20sans-serif%3B%20font-size%3A%2014.2857141494751px%3B%22%3E%20%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Fpeople%2Fjimmychan%22%20target%3D%22_blank%22%3Ejimmychan%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Worthy%20Document.Really%20useful%20for%20Developers.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1119103%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20WM8960%20audio%20codec%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1119103%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EVery%20good%20point.%20I%20added%20your%20suggestion%20to%20my%20document.%20thanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1119102%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20WM8960%20audio%20codec%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1119102%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Jimmy%2C%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EVery%20good%20document.%20But%20for%20a%20external%20reference%20I%C2%B4d%20rather%20point%20to%20a%20different%20link%20like%20the%20Linux%20Documentation%20or%20maybe%20%3CA%20href%3D%22http%3A%2F%2Fwww.alsa-project.org%2F%22%20title%3D%22http%3A%2F%2Fwww.alsa-project.org%2F%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3EAlsaProject%3C%2FA%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎07-12-2015 08:17 PM
Updated by: