Permalink
Browse files

prints in davinci-mcasp

Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
  • Loading branch information...
1 parent db5672d commit f98e9a0680590fe3f0d32d004980fd2401e4ed37 Joel A Fernandes committed Oct 31, 2012
Showing with 19 additions and 3 deletions.
  1. +19 −3 sound/soc/davinci/davinci-mcasp.c
@@ -473,8 +473,11 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai,
struct davinci_audio_dev *dev = snd_soc_dai_get_drvdata(cpu_dai);
void __iomem *base = dev->base;
+ printk("dai fmt: %d\n", fmt);
+
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
case SND_SOC_DAIFMT_CBS_CFS:
+ printk("mcasp_set_dai_fmt: %d\n", 1);
/* codec is clock and frame slave */
mcasp_set_bits(base + DAVINCI_MCASP_ACLKXCTL_REG, ACLKXE);
mcasp_set_bits(base + DAVINCI_MCASP_TXFMCTL_REG, AFSXE);
@@ -487,6 +490,7 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai,
break;
case SND_SOC_DAIFMT_CBM_CFS:
/* codec is clock master and frame slave */
+ printk("mcasp_set_dai_fmt: %d\n", 2);
mcasp_clr_bits(base + DAVINCI_MCASP_ACLKXCTL_REG, ACLKXE);
mcasp_set_bits(base + DAVINCI_MCASP_TXFMCTL_REG, AFSXE);
@@ -499,7 +503,11 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai,
AFSX | AFSR);
break;
case SND_SOC_DAIFMT_CBM_CFM:
+ printk("mcasp_set_dai_fmt: %d\n", 3);
/* codec is clock and frame master */
+ printk("aclkxctl(%p)\n", ((int *)(base + DAVINCI_MCASP_ACLKXCTL_REG)));
+ printk("aclkxctl: %d\n", *((int *)(base + DAVINCI_MCASP_ACLKXCTL_REG)));
+
mcasp_clr_bits(base + DAVINCI_MCASP_ACLKXCTL_REG, ACLKXE);
mcasp_clr_bits(base + DAVINCI_MCASP_TXFMCTL_REG, AFSXE);
@@ -516,30 +524,36 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai,
switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
case SND_SOC_DAIFMT_IB_NF:
+ printk("mcasp_set_dai_fmt: %d\n", 4);
mcasp_clr_bits(base + DAVINCI_MCASP_ACLKXCTL_REG, ACLKXPOL);
mcasp_clr_bits(base + DAVINCI_MCASP_TXFMCTL_REG, FSXPOL);
mcasp_set_bits(base + DAVINCI_MCASP_ACLKRCTL_REG, ACLKRPOL);
mcasp_clr_bits(base + DAVINCI_MCASP_RXFMCTL_REG, FSRPOL);
break;
- case SND_SOC_DAIFMT_NB_IF:
+ case SND_SOC_DAIFMT_NB_IF: printk("mcasp_set_dai_fmt: %d\n", 5);
+
mcasp_set_bits(base + DAVINCI_MCASP_ACLKXCTL_REG, ACLKXPOL);
mcasp_set_bits(base + DAVINCI_MCASP_TXFMCTL_REG, FSXPOL);
mcasp_clr_bits(base + DAVINCI_MCASP_ACLKRCTL_REG, ACLKRPOL);
mcasp_set_bits(base + DAVINCI_MCASP_RXFMCTL_REG, FSRPOL);
break;
- case SND_SOC_DAIFMT_IB_IF:
+ case SND_SOC_DAIFMT_IB_IF: printk("mcasp_set_dai_fmt: %d\n", 6);
+
+
mcasp_clr_bits(base + DAVINCI_MCASP_ACLKXCTL_REG, ACLKXPOL);
mcasp_set_bits(base + DAVINCI_MCASP_TXFMCTL_REG, FSXPOL);
mcasp_set_bits(base + DAVINCI_MCASP_ACLKRCTL_REG, ACLKRPOL);
mcasp_set_bits(base + DAVINCI_MCASP_RXFMCTL_REG, FSRPOL);
break;
- case SND_SOC_DAIFMT_NB_NF:
+ case SND_SOC_DAIFMT_NB_NF: printk("mcasp_set_dai_fmt: %d\n", 7);
+
+
mcasp_set_bits(base + DAVINCI_MCASP_ACLKXCTL_REG, ACLKXPOL);
mcasp_clr_bits(base + DAVINCI_MCASP_TXFMCTL_REG, FSXPOL);
@@ -1041,6 +1055,8 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
struct davinci_audio_dev *dev;
int ret;
+ printk(KERN_ERR "Probe called mcasp: Joel\n");
+
if (!pdev->dev.platform_data && !pdev->dev.of_node) {
dev_err(&pdev->dev, "No platform data supplied\n");
return -EINVAL;

0 comments on commit f98e9a0

Please sign in to comment.