diff options
| -rw-r--r-- | sound/soc/blackfin/bf5xx-i2s.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/sound/soc/blackfin/bf5xx-i2s.c b/sound/soc/blackfin/bf5xx-i2s.c index 19539c68c05..1e9d161c76c 100644 --- a/sound/soc/blackfin/bf5xx-i2s.c +++ b/sound/soc/blackfin/bf5xx-i2s.c | |||
| @@ -237,36 +237,31 @@ static void bf5xx_i2s_remove(struct platform_device *pdev, | |||
| 237 | #ifdef CONFIG_PM | 237 | #ifdef CONFIG_PM |
| 238 | static int bf5xx_i2s_suspend(struct snd_soc_dai *dai) | 238 | static int bf5xx_i2s_suspend(struct snd_soc_dai *dai) |
| 239 | { | 239 | { |
| 240 | struct sport_device *sport = | ||
| 241 | (struct sport_device *)dai->private_data; | ||
| 242 | 240 | ||
| 243 | pr_debug("%s : sport %d\n", __func__, dai->id); | 241 | pr_debug("%s : sport %d\n", __func__, dai->id); |
| 244 | if (!dai->active) | 242 | |
| 245 | return 0; | ||
| 246 | if (dai->capture.active) | 243 | if (dai->capture.active) |
| 247 | sport_rx_stop(sport); | 244 | sport_rx_stop(sport_handle); |
| 248 | if (dai->playback.active) | 245 | if (dai->playback.active) |
| 249 | sport_tx_stop(sport); | 246 | sport_tx_stop(sport_handle); |
| 250 | return 0; | 247 | return 0; |
| 251 | } | 248 | } |
| 252 | 249 | ||
| 253 | static int bf5xx_i2s_resume(struct snd_soc_dai *dai) | 250 | static int bf5xx_i2s_resume(struct snd_soc_dai *dai) |
| 254 | { | 251 | { |
| 255 | int ret; | 252 | int ret; |
| 256 | struct sport_device *sport = | ||
| 257 | (struct sport_device *)dai->private_data; | ||
| 258 | 253 | ||
| 259 | pr_debug("%s : sport %d\n", __func__, dai->id); | 254 | pr_debug("%s : sport %d\n", __func__, dai->id); |
| 260 | if (!dai->active) | ||
| 261 | return 0; | ||
| 262 | 255 | ||
| 263 | 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); | ||
| 264 | if (ret) { | 258 | if (ret) { |
| 265 | pr_err("SPORT is busy!\n"); | 259 | pr_err("SPORT is busy!\n"); |
| 266 | return -EBUSY; | 260 | return -EBUSY; |
| 267 | } | 261 | } |
| 268 | 262 | ||
| 269 | 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); | ||
| 270 | if (ret) { | 265 | if (ret) { |
| 271 | pr_err("SPORT is busy!\n"); | 266 | pr_err("SPORT is busy!\n"); |
| 272 | return -EBUSY; | 267 | return -EBUSY; |
