diff options
author | Cliff Cai <cliff.cai@analog.com> | 2008-10-27 05:09:25 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-10-27 12:05:42 -0400 |
commit | c3e5203bed1999df716e3c7119f6749523eb952f (patch) | |
tree | 77994a592e204ee9f46639b6cdecea959ba74ed8 /sound/soc/blackfin/bf5xx-i2s.c | |
parent | 4b7d283150b35db6e5e10f72606f603ff424c92a (diff) |
ALSA: ASoC: Blackfin: update SPORT0 port selector (v2)
- Setting the TFS pin selector for SPORT 0 based on whether the selected
port id F or G. If the port is F then no conflict should exist for the
TFS. When Port G is selected and EMAC then there is a conflict between
the PHY interrupt line and TFS. Current settings prevent the conflict
by ignoring the TFS pin when Port G is selected. This allows both
ssm2602 using Port G and EMAC concurrently.
- some code cleanup
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/soc/blackfin/bf5xx-i2s.c')
-rw-r--r-- | sound/soc/blackfin/bf5xx-i2s.c | 34 |
1 files changed, 22 insertions, 12 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 | ||
73 | static 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 | |||
87 | static 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 | ||
80 | static int bf5xx_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai, | 92 | static 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 | } |