diff options
Diffstat (limited to 'sound/soc/blackfin/bf5xx-i2s.c')
-rw-r--r-- | sound/soc/blackfin/bf5xx-i2s.c | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/sound/soc/blackfin/bf5xx-i2s.c b/sound/soc/blackfin/bf5xx-i2s.c index 876abade27e1..084b68884ada 100644 --- a/sound/soc/blackfin/bf5xx-i2s.c +++ b/sound/soc/blackfin/bf5xx-i2s.c | |||
@@ -77,12 +77,12 @@ static struct sport_param sport_params[2] = { | |||
77 | * TFS. When Port G is selected and EMAC then there is a conflict between | 77 | * TFS. When Port G is selected and EMAC then there is a conflict between |
78 | * the PHY interrupt line and TFS. Current settings prevent the conflict | 78 | * the PHY interrupt line and TFS. Current settings prevent the conflict |
79 | * by ignoring the TFS pin when Port G is selected. This allows both | 79 | * by ignoring the TFS pin when Port G is selected. This allows both |
80 | * ssm2602 using Port G and EMAC concurrently. | 80 | * codecs and EMAC using Port G concurrently. |
81 | */ | 81 | */ |
82 | #ifdef CONFIG_BF527_SPORT0_PORTF | 82 | #ifdef CONFIG_BF527_SPORT0_PORTG |
83 | #define LOCAL_SPORT0_TFS (P_SPORT0_TFS) | ||
84 | #else | ||
85 | #define LOCAL_SPORT0_TFS (0) | 83 | #define LOCAL_SPORT0_TFS (0) |
84 | #else | ||
85 | #define LOCAL_SPORT0_TFS (P_SPORT0_TFS) | ||
86 | #endif | 86 | #endif |
87 | 87 | ||
88 | static u16 sport_req[][7] = { {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, | 88 | static u16 sport_req[][7] = { {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, |
@@ -227,7 +227,8 @@ static int bf5xx_i2s_probe(struct platform_device *pdev, | |||
227 | return 0; | 227 | return 0; |
228 | } | 228 | } |
229 | 229 | ||
230 | static void bf5xx_i2s_remove(struct snd_soc_dai *dai) | 230 | static void bf5xx_i2s_remove(struct platform_device *pdev, |
231 | struct snd_soc_dai *dai) | ||
231 | { | 232 | { |
232 | pr_debug("%s enter\n", __func__); | 233 | pr_debug("%s enter\n", __func__); |
233 | peripheral_free_list(&sport_req[sport_num][0]); | 234 | peripheral_free_list(&sport_req[sport_num][0]); |
@@ -236,36 +237,31 @@ static void bf5xx_i2s_remove(struct snd_soc_dai *dai) | |||
236 | #ifdef CONFIG_PM | 237 | #ifdef CONFIG_PM |
237 | static int bf5xx_i2s_suspend(struct snd_soc_dai *dai) | 238 | static int bf5xx_i2s_suspend(struct snd_soc_dai *dai) |
238 | { | 239 | { |
239 | struct sport_device *sport = | ||
240 | (struct sport_device *)dai->private_data; | ||
241 | 240 | ||
242 | pr_debug("%s : sport %d\n", __func__, dai->id); | 241 | pr_debug("%s : sport %d\n", __func__, dai->id); |
243 | if (!dai->active) | 242 | |
244 | return 0; | ||
245 | if (dai->capture.active) | 243 | if (dai->capture.active) |
246 | sport_rx_stop(sport); | 244 | sport_rx_stop(sport_handle); |
247 | if (dai->playback.active) | 245 | if (dai->playback.active) |
248 | sport_tx_stop(sport); | 246 | sport_tx_stop(sport_handle); |
249 | return 0; | 247 | return 0; |
250 | } | 248 | } |
251 | 249 | ||
252 | static int bf5xx_i2s_resume(struct snd_soc_dai *dai) | 250 | static int bf5xx_i2s_resume(struct snd_soc_dai *dai) |
253 | { | 251 | { |
254 | int ret; | 252 | int ret; |
255 | struct sport_device *sport = | ||
256 | (struct sport_device *)dai->private_data; | ||
257 | 253 | ||
258 | pr_debug("%s : sport %d\n", __func__, dai->id); | 254 | pr_debug("%s : sport %d\n", __func__, dai->id); |
259 | if (!dai->active) | ||
260 | return 0; | ||
261 | 255 | ||
262 | ret = sport_config_rx(sport, RFSR | RCKFE, RSFSE|0x1f, 0, 0); | 256 | ret = sport_config_rx(sport_handle, bf5xx_i2s.rcr1, |
257 | bf5xx_i2s.rcr2, 0, 0); | ||
263 | if (ret) { | 258 | if (ret) { |
264 | pr_err("SPORT is busy!\n"); | 259 | pr_err("SPORT is busy!\n"); |
265 | return -EBUSY; | 260 | return -EBUSY; |
266 | } | 261 | } |
267 | 262 | ||
268 | ret = sport_config_tx(sport, TFSR | TCKFE, TSFSE|0x1f, 0, 0); | 263 | ret = sport_config_tx(sport_handle, bf5xx_i2s.tcr1, |
264 | bf5xx_i2s.tcr2, 0, 0); | ||
269 | if (ret) { | 265 | if (ret) { |
270 | pr_err("SPORT is busy!\n"); | 266 | pr_err("SPORT is busy!\n"); |
271 | return -EBUSY; | 267 | return -EBUSY; |