aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/blackfin/bf5xx-i2s.c34
-rw-r--r--sound/soc/codecs/wm9713.c2
-rw-r--r--sound/soc/fsl/mpc5200_psc_i2s.c14
-rw-r--r--sound/soc/soc-core.c6
4 files changed, 34 insertions, 22 deletions
diff --git a/sound/soc/blackfin/bf5xx-i2s.c b/sound/soc/blackfin/bf5xx-i2s.c
index 827587f08180..e020c160ee44 100644
--- a/sound/soc/blackfin/bf5xx-i2s.c
+++ b/sound/soc/blackfin/bf5xx-i2s.c
@@ -70,12 +70,24 @@ static struct sport_param sport_params[2] = {
70 } 70 }
71}; 71};
72 72
73static u16 sport_req[][7] = { 73/*
74 { P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, 74 * Setting the TFS pin selector for SPORT 0 based on whether the selected
75 P_SPORT0_DRPRI, P_SPORT0_RSCLK, 0}, 75 * port id F or G. If the port is F then no conflict should exist for the
76 { P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, 76 * TFS. When Port G is selected and EMAC then there is a conflict between
77 P_SPORT1_DRPRI, P_SPORT1_RSCLK, 0}, 77 * the PHY interrupt line and TFS. Current settings prevent the conflict
78}; 78 * by ignoring the TFS pin when Port G is selected. This allows both
79 * ssm2602 using Port G and EMAC concurrently.
80 */
81#ifdef CONFIG_BF527_SPORT0_PORTF
82#define LOCAL_SPORT0_TFS (P_SPORT0_TFS)
83#else
84#define LOCAL_SPORT0_TFS (0)
85#endif
86
87static u16 sport_req[][7] = { {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
88 P_SPORT0_DRPRI, P_SPORT0_RSCLK, LOCAL_SPORT0_TFS, 0},
89 {P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, P_SPORT1_DRPRI,
90 P_SPORT1_RSCLK, P_SPORT1_TFS, 0} };
79 91
80static int bf5xx_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai, 92static int bf5xx_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai,
81 unsigned int fmt) 93 unsigned int fmt)
@@ -98,23 +110,21 @@ static int bf5xx_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai,
98 ret = -EINVAL; 110 ret = -EINVAL;
99 break; 111 break;
100 default: 112 default:
113 printk(KERN_ERR "%s: Unknown DAI format type\n", __func__);
101 ret = -EINVAL; 114 ret = -EINVAL;
102 break; 115 break;
103 } 116 }
104 117
105 switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { 118 switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
106 case SND_SOC_DAIFMT_CBS_CFS:
107 ret = -EINVAL;
108 break;
109 case SND_SOC_DAIFMT_CBM_CFS:
110 ret = -EINVAL;
111 break;
112 case SND_SOC_DAIFMT_CBM_CFM: 119 case SND_SOC_DAIFMT_CBM_CFM:
113 break; 120 break;
121 case SND_SOC_DAIFMT_CBS_CFS:
122 case SND_SOC_DAIFMT_CBM_CFS:
114 case SND_SOC_DAIFMT_CBS_CFM: 123 case SND_SOC_DAIFMT_CBS_CFM:
115 ret = -EINVAL; 124 ret = -EINVAL;
116 break; 125 break;
117 default: 126 default:
127 printk(KERN_ERR "%s: Unknown DAI master type\n", __func__);
118 ret = -EINVAL; 128 ret = -EINVAL;
119 break; 129 break;
120 } 130 }
diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c
index aba402b3c999..945b32ed9884 100644
--- a/sound/soc/codecs/wm9713.c
+++ b/sound/soc/codecs/wm9713.c
@@ -140,7 +140,7 @@ SOC_SINGLE("Capture ADC Boost (+20dB) Switch", AC97_VIDEO, 6, 1, 0),
140 140
141SOC_SINGLE("ALC Target Volume", AC97_CODEC_CLASS_REV, 12, 15, 0), 141SOC_SINGLE("ALC Target Volume", AC97_CODEC_CLASS_REV, 12, 15, 0),
142SOC_SINGLE("ALC Hold Time", AC97_CODEC_CLASS_REV, 8, 15, 0), 142SOC_SINGLE("ALC Hold Time", AC97_CODEC_CLASS_REV, 8, 15, 0),
143SOC_SINGLE("ALC Decay Time ", AC97_CODEC_CLASS_REV, 4, 15, 0), 143SOC_SINGLE("ALC Decay Time", AC97_CODEC_CLASS_REV, 4, 15, 0),
144SOC_SINGLE("ALC Attack Time", AC97_CODEC_CLASS_REV, 0, 15, 0), 144SOC_SINGLE("ALC Attack Time", AC97_CODEC_CLASS_REV, 0, 15, 0),
145SOC_ENUM("ALC Function", wm9713_enum[6]), 145SOC_ENUM("ALC Function", wm9713_enum[6]),
146SOC_SINGLE("ALC Max Volume", AC97_PCI_SVID, 11, 7, 0), 146SOC_SINGLE("ALC Max Volume", AC97_PCI_SVID, 11, 7, 0),
diff --git a/sound/soc/fsl/mpc5200_psc_i2s.c b/sound/soc/fsl/mpc5200_psc_i2s.c
index 86923299bc10..94a02eaa4825 100644
--- a/sound/soc/fsl/mpc5200_psc_i2s.c
+++ b/sound/soc/fsl/mpc5200_psc_i2s.c
@@ -277,7 +277,7 @@ static int psc_i2s_trigger(struct snd_pcm_substream *substream, int cmd)
277 struct mpc52xx_psc __iomem *regs = psc_i2s->psc_regs; 277 struct mpc52xx_psc __iomem *regs = psc_i2s->psc_regs;
278 u16 imr; 278 u16 imr;
279 u8 psc_cmd; 279 u8 psc_cmd;
280 long flags; 280 unsigned long flags;
281 281
282 if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE) 282 if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE)
283 s = &psc_i2s->capture; 283 s = &psc_i2s->capture;
@@ -699,9 +699,11 @@ static ssize_t psc_i2s_stat_store(struct device *dev,
699 return count; 699 return count;
700} 700}
701 701
702DEVICE_ATTR(status, 0644, psc_i2s_status_show, NULL); 702static DEVICE_ATTR(status, 0644, psc_i2s_status_show, NULL);
703DEVICE_ATTR(playback_underrun, 0644, psc_i2s_stat_show, psc_i2s_stat_store); 703static DEVICE_ATTR(playback_underrun, 0644, psc_i2s_stat_show,
704DEVICE_ATTR(capture_overrun, 0644, psc_i2s_stat_show, psc_i2s_stat_store); 704 psc_i2s_stat_store);
705static DEVICE_ATTR(capture_overrun, 0644, psc_i2s_stat_show,
706 psc_i2s_stat_store);
705 707
706/* --------------------------------------------------------------------- 708/* ---------------------------------------------------------------------
707 * OF platform bus binding code: 709 * OF platform bus binding code:
@@ -819,8 +821,8 @@ static int __devinit psc_i2s_of_probe(struct of_device *op,
819 821
820 /* Register the SYSFS files */ 822 /* Register the SYSFS files */
821 rc = device_create_file(psc_i2s->dev, &dev_attr_status); 823 rc = device_create_file(psc_i2s->dev, &dev_attr_status);
822 rc = device_create_file(psc_i2s->dev, &dev_attr_capture_overrun); 824 rc |= device_create_file(psc_i2s->dev, &dev_attr_capture_overrun);
823 rc = device_create_file(psc_i2s->dev, &dev_attr_playback_underrun); 825 rc |= device_create_file(psc_i2s->dev, &dev_attr_playback_underrun);
824 if (rc) 826 if (rc)
825 dev_info(psc_i2s->dev, "error creating sysfs files\n"); 827 dev_info(psc_i2s->dev, "error creating sysfs files\n");
826 828
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 462e635dfc74..16c7453f4946 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -95,8 +95,8 @@ static int soc_ac97_dev_register(struct snd_soc_codec *codec)
95 codec->ac97->dev.parent = NULL; 95 codec->ac97->dev.parent = NULL;
96 codec->ac97->dev.release = soc_ac97_device_release; 96 codec->ac97->dev.release = soc_ac97_device_release;
97 97
98 snprintf(codec->ac97->dev.bus_id, BUS_ID_SIZE, "%d-%d:%s", 98 dev_set_name(&codec->ac97->dev, "%d-%d:%s",
99 codec->card->number, 0, codec->name); 99 codec->card->number, 0, codec->name);
100 err = device_register(&codec->ac97->dev); 100 err = device_register(&codec->ac97->dev);
101 if (err < 0) { 101 if (err < 0) {
102 snd_printk(KERN_ERR "Can't register ac97 bus\n"); 102 snd_printk(KERN_ERR "Can't register ac97 bus\n");
@@ -1462,7 +1462,7 @@ int snd_soc_info_volsw(struct snd_kcontrol *kcontrol,
1462 struct soc_mixer_control *mc = 1462 struct soc_mixer_control *mc =
1463 (struct soc_mixer_control *)kcontrol->private_value; 1463 (struct soc_mixer_control *)kcontrol->private_value;
1464 int max = mc->max; 1464 int max = mc->max;
1465 unsigned int shift = mc->min; 1465 unsigned int shift = mc->shift;
1466 unsigned int rshift = mc->rshift; 1466 unsigned int rshift = mc->rshift;
1467 1467
1468 if (max == 1) 1468 if (max == 1)