aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/blackfin/bf5xx-i2s.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 13:02:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 13:02:43 -0400
commitfe61c99a1227aeb5a4324e39cecf465a4b2052d3 (patch)
tree897eb0eaab90488835a18197dca9640737d5623a /sound/soc/blackfin/bf5xx-i2s.c
parent9fd815b55f31be48dbb3dd23922587d247a4e497 (diff)
parent877ae70763fa0b19ffbe25e7e119fc96f52fbbd3 (diff)
Merge branch 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ASoC: wm8753: fix mapping when MONOMIX is set to Stereo ASoC: some minor changes for AD1836 and AD1938 codec drivers ASoC: DaVinci: Fixes to McASP configuration ASoC: Blackfin I2S: fix resuming when device hasn't been used ASoC: Blackfin I2S: add lost platform_device parameter to resume function ASoC: fix typos in Blackfin headers ASoC: bf5xx-sport: the irq save/restore funcs take an unsigned long ASoC: Blackfin AC97: add a few missing multichannel define handling
Diffstat (limited to 'sound/soc/blackfin/bf5xx-i2s.c')
-rw-r--r--sound/soc/blackfin/bf5xx-i2s.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/sound/soc/blackfin/bf5xx-i2s.c b/sound/soc/blackfin/bf5xx-i2s.c
index 876abade27e1..1e9d161c76c4 100644
--- a/sound/soc/blackfin/bf5xx-i2s.c
+++ b/sound/soc/blackfin/bf5xx-i2s.c
@@ -227,7 +227,8 @@ static int bf5xx_i2s_probe(struct platform_device *pdev,
227 return 0; 227 return 0;
228} 228}
229 229
230static void bf5xx_i2s_remove(struct snd_soc_dai *dai) 230static 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
237static int bf5xx_i2s_suspend(struct snd_soc_dai *dai) 238static 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
252static int bf5xx_i2s_resume(struct snd_soc_dai *dai) 250static 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;
int func; int retcode; } error_info_t; /* Flag to bind to all functions */ #define BIND_FN_ALL 0xff /* Events */ #define CS_EVENT_PRI_LOW 0 #define CS_EVENT_PRI_HIGH 1 #define CS_EVENT_WRITE_PROTECT 0x000001 #define CS_EVENT_CARD_LOCK 0x000002 #define CS_EVENT_CARD_INSERTION 0x000004 #define CS_EVENT_CARD_REMOVAL 0x000008 #define CS_EVENT_BATTERY_DEAD 0x000010 #define CS_EVENT_BATTERY_LOW 0x000020 #define CS_EVENT_READY_CHANGE 0x000040 #define CS_EVENT_CARD_DETECT 0x000080 #define CS_EVENT_RESET_REQUEST 0x000100 #define CS_EVENT_RESET_PHYSICAL 0x000200 #define CS_EVENT_CARD_RESET 0x000400 #define CS_EVENT_REGISTRATION_COMPLETE 0x000800 #define CS_EVENT_PM_SUSPEND 0x002000 #define CS_EVENT_PM_RESUME 0x004000 #define CS_EVENT_INSERTION_REQUEST 0x008000 #define CS_EVENT_EJECTION_REQUEST 0x010000 #define CS_EVENT_MTD_REQUEST 0x020000 #define CS_EVENT_ERASE_COMPLETE 0x040000 #define CS_EVENT_REQUEST_ATTENTION 0x080000 #define CS_EVENT_CB_DETECT 0x100000 #define CS_EVENT_3VCARD 0x200000 #define CS_EVENT_XVCARD 0x400000 /* Return codes */ #define CS_SUCCESS 0x00 #define CS_BAD_ADAPTER 0x01 #define CS_BAD_ATTRIBUTE 0x02 #define CS_BAD_BASE 0x03 #define CS_BAD_EDC 0x04 #define CS_BAD_IRQ 0x06 #define CS_BAD_OFFSET 0x07 #define CS_BAD_PAGE 0x08 #define CS_READ_FAILURE 0x09 #define CS_BAD_SIZE 0x0a #define CS_BAD_SOCKET 0x0b #define CS_BAD_TYPE 0x0d #define CS_BAD_VCC 0x0e #define CS_BAD_VPP 0x0f #define CS_BAD_WINDOW 0x11 #define CS_WRITE_FAILURE 0x12 #define CS_NO_CARD 0x14 #define CS_UNSUPPORTED_FUNCTION 0x15 #define CS_UNSUPPORTED_MODE 0x16 #define CS_BAD_SPEED 0x17 #define CS_BUSY 0x18 #define CS_GENERAL_FAILURE 0x19 #define CS_WRITE_PROTECTED 0x1a #define CS_BAD_ARG_LENGTH 0x1b #define CS_BAD_ARGS 0x1c #define CS_CONFIGURATION_LOCKED 0x1d #define CS_IN_USE 0x1e #define CS_NO_MORE_ITEMS 0x1f #define CS_OUT_OF_RESOURCE 0x20 #define CS_BAD_HANDLE 0x21 #define CS_BAD_TUPLE 0x40 #ifdef __KERNEL__ /* * The main Card Services entry point */ enum service { AccessConfigurationRegister, AddSocketServices, AdjustResourceInfo, CheckEraseQueue, CloseMemory, CopyMemory, DeregisterClient, DeregisterEraseQueue, GetCardServicesInfo, GetClientInfo, GetConfigurationInfo, GetEventMask, GetFirstClient, GetFirstPartion, GetFirstRegion, GetFirstTuple, GetNextClient, GetNextPartition, GetNextRegion, GetNextTuple, GetStatus, GetTupleData, MapLogSocket, MapLogWindow, MapMemPage, MapPhySocket, MapPhyWindow, ModifyConfiguration, ModifyWindow, OpenMemory, ParseTuple, ReadMemory, RegisterClient, RegisterEraseQueue, RegisterMTD, RegisterTimer, ReleaseConfiguration, ReleaseExclusive, ReleaseIO, ReleaseIRQ, ReleaseSocketMask, ReleaseWindow, ReplaceSocketServices, RequestConfiguration, RequestExclusive, RequestIO, RequestIRQ, RequestSocketMask, RequestWindow, ResetCard, ReturnSSEntry, SetEventMask, SetRegion, ValidateCIS, VendorSpecific, WriteMemory, BindDevice, BindMTD, ReportError, SuspendCard, ResumeCard, EjectCard, InsertCard, ReplaceCIS, GetFirstWindow, GetNextWindow, GetMemPage }; struct pcmcia_socket; int pcmcia_access_configuration_register(struct pcmcia_device *p_dev, conf_reg_t *reg); int pcmcia_get_configuration_info(struct pcmcia_device *p_dev, config_info_t *config); int pcmcia_get_first_window(window_handle_t *win, win_req_t *req); int pcmcia_get_next_window(window_handle_t *win, win_req_t *req); int pcmcia_get_status(struct pcmcia_device *p_dev, cs_status_t *status); int pcmcia_get_mem_page(window_handle_t win, memreq_t *req); int pcmcia_map_mem_page(window_handle_t win, memreq_t *req); int pcmcia_modify_configuration(struct pcmcia_device *p_dev, modconf_t *mod); int pcmcia_release_window(window_handle_t win); int pcmcia_request_configuration(struct pcmcia_device *p_dev, config_req_t *req); int pcmcia_request_io(struct pcmcia_device *p_dev, io_req_t *req); int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req); int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_handle_t *wh); int pcmcia_suspend_card(struct pcmcia_socket *skt); int pcmcia_resume_card(struct pcmcia_socket *skt); int pcmcia_eject_card(struct pcmcia_socket *skt); int pcmcia_insert_card(struct pcmcia_socket *skt); int pccard_reset_card(struct pcmcia_socket *skt); struct pcmcia_device * pcmcia_dev_present(struct pcmcia_device *p_dev); void pcmcia_disable_device(struct pcmcia_device *p_dev); struct pcmcia_socket * pcmcia_get_socket(struct pcmcia_socket *skt); void pcmcia_put_socket(struct pcmcia_socket *skt); /* compatibility functions */ #define pcmcia_reset_card(p_dev, req) \ pccard_reset_card(p_dev->socket) #endif /* __KERNEL__ */ #endif /* _LINUX_CS_H */