lkml.org 
[lkml]   [2012]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[ 060/149] ASoC: fsl: p1022ds: tell the WM8776 codec driver that its the master
    3.2-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Timur Tabi <timur@freescale.com>

    commit 70ac07bb633dee75ac554195b9a4d69adfa7803c upstream.

    The WM8776 codec driver requires the machine driver to set one of the
    SND_SOC_DAIFMT_CBx_xxx values. The P1022DS machine driver should be setting
    SND_SOC_DAIFMT_CBM_CFM, but since that value was zero, no one noticed.

    Commit 75d9ac46 ("ASoC: Allow DAI formats to be specified in the
    dai_link"), however, changed the value of SND_SOC_DAIFMT_CBM_CFM from zero
    to a non-zero value, which means that it now needs to be specifically set
    by the machine driver.

    We also set SND_SOC_DAIFMT_NB_NF, for the same reason.

    Signed-off-by: Timur Tabi <timur@freescale.com>
    Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    sound/soc/fsl/p1022_ds.c | 24 ++++++++++++++++--------
    1 file changed, 16 insertions(+), 8 deletions(-)

    --- a/sound/soc/fsl/p1022_ds.c
    +++ b/sound/soc/fsl/p1022_ds.c
    @@ -392,7 +392,8 @@ static int p1022_ds_probe(struct platfor
    }

    if (strcasecmp(sprop, "i2s-slave") == 0) {
    - mdata->dai_format = SND_SOC_DAIFMT_I2S;
    + mdata->dai_format = SND_SOC_DAIFMT_NB_NF |
    + SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM;
    mdata->codec_clk_direction = SND_SOC_CLOCK_OUT;
    mdata->cpu_clk_direction = SND_SOC_CLOCK_IN;

    @@ -409,31 +410,38 @@ static int p1022_ds_probe(struct platfor
    }
    mdata->clk_frequency = be32_to_cpup(iprop);
    } else if (strcasecmp(sprop, "i2s-master") == 0) {
    - mdata->dai_format = SND_SOC_DAIFMT_I2S;
    + mdata->dai_format = SND_SOC_DAIFMT_NB_NF |
    + SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS;
    mdata->codec_clk_direction = SND_SOC_CLOCK_IN;
    mdata->cpu_clk_direction = SND_SOC_CLOCK_OUT;
    } else if (strcasecmp(sprop, "lj-slave") == 0) {
    - mdata->dai_format = SND_SOC_DAIFMT_LEFT_J;
    + mdata->dai_format = SND_SOC_DAIFMT_NB_NF |
    + SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM;
    mdata->codec_clk_direction = SND_SOC_CLOCK_OUT;
    mdata->cpu_clk_direction = SND_SOC_CLOCK_IN;
    } else if (strcasecmp(sprop, "lj-master") == 0) {
    - mdata->dai_format = SND_SOC_DAIFMT_LEFT_J;
    + mdata->dai_format = SND_SOC_DAIFMT_NB_NF |
    + SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBS_CFS;
    mdata->codec_clk_direction = SND_SOC_CLOCK_IN;
    mdata->cpu_clk_direction = SND_SOC_CLOCK_OUT;
    } else if (strcasecmp(sprop, "rj-slave") == 0) {
    - mdata->dai_format = SND_SOC_DAIFMT_RIGHT_J;
    + mdata->dai_format = SND_SOC_DAIFMT_NB_NF |
    + SND_SOC_DAIFMT_RIGHT_J | SND_SOC_DAIFMT_CBM_CFM;
    mdata->codec_clk_direction = SND_SOC_CLOCK_OUT;
    mdata->cpu_clk_direction = SND_SOC_CLOCK_IN;
    } else if (strcasecmp(sprop, "rj-master") == 0) {
    - mdata->dai_format = SND_SOC_DAIFMT_RIGHT_J;
    + mdata->dai_format = SND_SOC_DAIFMT_NB_NF |
    + SND_SOC_DAIFMT_RIGHT_J | SND_SOC_DAIFMT_CBS_CFS;
    mdata->codec_clk_direction = SND_SOC_CLOCK_IN;
    mdata->cpu_clk_direction = SND_SOC_CLOCK_OUT;
    } else if (strcasecmp(sprop, "ac97-slave") == 0) {
    - mdata->dai_format = SND_SOC_DAIFMT_AC97;
    + mdata->dai_format = SND_SOC_DAIFMT_NB_NF |
    + SND_SOC_DAIFMT_AC97 | SND_SOC_DAIFMT_CBM_CFM;
    mdata->codec_clk_direction = SND_SOC_CLOCK_OUT;
    mdata->cpu_clk_direction = SND_SOC_CLOCK_IN;
    } else if (strcasecmp(sprop, "ac97-master") == 0) {
    - mdata->dai_format = SND_SOC_DAIFMT_AC97;
    + mdata->dai_format = SND_SOC_DAIFMT_NB_NF |
    + SND_SOC_DAIFMT_AC97 | SND_SOC_DAIFMT_CBS_CFS;
    mdata->codec_clk_direction = SND_SOC_CLOCK_IN;
    mdata->cpu_clk_direction = SND_SOC_CLOCK_OUT;
    } else {



    \
     
     \ /
      Last update: 2012-03-31 00:25    [W:4.054 / U:0.104 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site