aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorTimur Tabi <timur@freescale.com>2012-03-16 17:32:52 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-03-17 17:11:16 -0400
commit70ac07bb633dee75ac554195b9a4d69adfa7803c (patch)
tree1b418b9421d4681ca852d420c461f5cd550caed8 /sound/soc
parent588fb705d560cd76d435382fb25bea7349672d80 (diff)
ASoC: fsl: p1022ds: tell the WM8776 codec driver that it's the master
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> Cc: stable@vger.kernel.org
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/fsl/p1022_ds.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/sound/soc/fsl/p1022_ds.c b/sound/soc/fsl/p1022_ds.c
index b88987083475..46623405a2ce 100644
--- a/sound/soc/fsl/p1022_ds.c
+++ b/sound/soc/fsl/p1022_ds.c
@@ -395,7 +395,8 @@ static int p1022_ds_probe(struct platform_device *pdev)
395 } 395 }
396 396
397 if (strcasecmp(sprop, "i2s-slave") == 0) { 397 if (strcasecmp(sprop, "i2s-slave") == 0) {
398 mdata->dai_format = SND_SOC_DAIFMT_I2S; 398 mdata->dai_format = SND_SOC_DAIFMT_NB_NF |
399 SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM;
399 mdata->codec_clk_direction = SND_SOC_CLOCK_OUT; 400 mdata->codec_clk_direction = SND_SOC_CLOCK_OUT;
400 mdata->cpu_clk_direction = SND_SOC_CLOCK_IN; 401 mdata->cpu_clk_direction = SND_SOC_CLOCK_IN;
401 402
@@ -412,31 +413,38 @@ static int p1022_ds_probe(struct platform_device *pdev)
412 } 413 }
413 mdata->clk_frequency = be32_to_cpup(iprop); 414 mdata->clk_frequency = be32_to_cpup(iprop);
414 } else if (strcasecmp(sprop, "i2s-master") == 0) { 415 } else if (strcasecmp(sprop, "i2s-master") == 0) {
415 mdata->dai_format = SND_SOC_DAIFMT_I2S; 416 mdata->dai_format = SND_SOC_DAIFMT_NB_NF |
417 SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS;
416 mdata->codec_clk_direction = SND_SOC_CLOCK_IN; 418 mdata->codec_clk_direction = SND_SOC_CLOCK_IN;
417 mdata->cpu_clk_direction = SND_SOC_CLOCK_OUT; 419 mdata->cpu_clk_direction = SND_SOC_CLOCK_OUT;
418 } else if (strcasecmp(sprop, "lj-slave") == 0) { 420 } else if (strcasecmp(sprop, "lj-slave") == 0) {
419 mdata->dai_format = SND_SOC_DAIFMT_LEFT_J; 421 mdata->dai_format = SND_SOC_DAIFMT_NB_NF |
422 SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM;
420 mdata->codec_clk_direction = SND_SOC_CLOCK_OUT; 423 mdata->codec_clk_direction = SND_SOC_CLOCK_OUT;
421 mdata->cpu_clk_direction = SND_SOC_CLOCK_IN; 424 mdata->cpu_clk_direction = SND_SOC_CLOCK_IN;
422 } else if (strcasecmp(sprop, "lj-master") == 0) { 425 } else if (strcasecmp(sprop, "lj-master") == 0) {
423 mdata->dai_format = SND_SOC_DAIFMT_LEFT_J; 426 mdata->dai_format = SND_SOC_DAIFMT_NB_NF |
427 SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBS_CFS;
424 mdata->codec_clk_direction = SND_SOC_CLOCK_IN; 428 mdata->codec_clk_direction = SND_SOC_CLOCK_IN;
425 mdata->cpu_clk_direction = SND_SOC_CLOCK_OUT; 429 mdata->cpu_clk_direction = SND_SOC_CLOCK_OUT;
426 } else if (strcasecmp(sprop, "rj-slave") == 0) { 430 } else if (strcasecmp(sprop, "rj-slave") == 0) {
427 mdata->dai_format = SND_SOC_DAIFMT_RIGHT_J; 431 mdata->dai_format = SND_SOC_DAIFMT_NB_NF |
432 SND_SOC_DAIFMT_RIGHT_J | SND_SOC_DAIFMT_CBM_CFM;
428 mdata->codec_clk_direction = SND_SOC_CLOCK_OUT; 433 mdata->codec_clk_direction = SND_SOC_CLOCK_OUT;
429 mdata->cpu_clk_direction = SND_SOC_CLOCK_IN; 434 mdata->cpu_clk_direction = SND_SOC_CLOCK_IN;
430 } else if (strcasecmp(sprop, "rj-master") == 0) { 435 } else if (strcasecmp(sprop, "rj-master") == 0) {
431 mdata->dai_format = SND_SOC_DAIFMT_RIGHT_J; 436 mdata->dai_format = SND_SOC_DAIFMT_NB_NF |
437 SND_SOC_DAIFMT_RIGHT_J | SND_SOC_DAIFMT_CBS_CFS;
432 mdata->codec_clk_direction = SND_SOC_CLOCK_IN; 438 mdata->codec_clk_direction = SND_SOC_CLOCK_IN;
433 mdata->cpu_clk_direction = SND_SOC_CLOCK_OUT; 439 mdata->cpu_clk_direction = SND_SOC_CLOCK_OUT;
434 } else if (strcasecmp(sprop, "ac97-slave") == 0) { 440 } else if (strcasecmp(sprop, "ac97-slave") == 0) {
435 mdata->dai_format = SND_SOC_DAIFMT_AC97; 441 mdata->dai_format = SND_SOC_DAIFMT_NB_NF |
442 SND_SOC_DAIFMT_AC97 | SND_SOC_DAIFMT_CBM_CFM;
436 mdata->codec_clk_direction = SND_SOC_CLOCK_OUT; 443 mdata->codec_clk_direction = SND_SOC_CLOCK_OUT;
437 mdata->cpu_clk_direction = SND_SOC_CLOCK_IN; 444 mdata->cpu_clk_direction = SND_SOC_CLOCK_IN;
438 } else if (strcasecmp(sprop, "ac97-master") == 0) { 445 } else if (strcasecmp(sprop, "ac97-master") == 0) {
439 mdata->dai_format = SND_SOC_DAIFMT_AC97; 446 mdata->dai_format = SND_SOC_DAIFMT_NB_NF |
447 SND_SOC_DAIFMT_AC97 | SND_SOC_DAIFMT_CBS_CFS;
440 mdata->codec_clk_direction = SND_SOC_CLOCK_IN; 448 mdata->codec_clk_direction = SND_SOC_CLOCK_IN;
441 mdata->cpu_clk_direction = SND_SOC_CLOCK_OUT; 449 mdata->cpu_clk_direction = SND_SOC_CLOCK_OUT;
442 } else { 450 } else {