Lines Matching refs:component

90 	struct snd_soc_component *component;  member
157 static void wm0010_halt(struct snd_soc_component *component) in wm0010_halt() argument
159 struct wm0010_priv *wm0010 = snd_soc_component_get_drvdata(component); in wm0010_halt()
193 struct snd_soc_component *component; member
218 struct snd_soc_component *component = xfer->component; in wm0010_boot_xfer_complete() local
219 struct wm0010_priv *wm0010 = snd_soc_component_get_drvdata(component); in wm0010_boot_xfer_complete()
224 dev_err(component->dev, "SPI transfer failed: %d\n", in wm0010_boot_xfer_complete()
233 dev_dbg(component->dev, "%d: %04x\n", i, out32[i]); in wm0010_boot_xfer_complete()
237 dev_err(component->dev, in wm0010_boot_xfer_complete()
245 dev_err(component->dev, in wm0010_boot_xfer_complete()
251 dev_dbg(component->dev, "Stage2 loader running\n"); in wm0010_boot_xfer_complete()
255 dev_dbg(component->dev, "CODE_HDR packet received\n"); in wm0010_boot_xfer_complete()
259 dev_dbg(component->dev, "CODE_DATA packet received\n"); in wm0010_boot_xfer_complete()
263 dev_dbg(component->dev, "Download complete\n"); in wm0010_boot_xfer_complete()
267 dev_dbg(component->dev, "Application start\n"); in wm0010_boot_xfer_complete()
271 dev_dbg(component->dev, "PLL packet received\n"); in wm0010_boot_xfer_complete()
276 dev_err(component->dev, "Device reports image too long\n"); in wm0010_boot_xfer_complete()
281 dev_err(component->dev, "Device reports bad SPI packet\n"); in wm0010_boot_xfer_complete()
286 dev_err(component->dev, "Device reports SPI read overflow\n"); in wm0010_boot_xfer_complete()
291 dev_err(component->dev, "Device reports SPI underclock\n"); in wm0010_boot_xfer_complete()
296 dev_err(component->dev, "Device reports bad header packet\n"); in wm0010_boot_xfer_complete()
301 dev_err(component->dev, "Device reports invalid packet type\n"); in wm0010_boot_xfer_complete()
306 dev_err(component->dev, "Device reports data before header error\n"); in wm0010_boot_xfer_complete()
311 dev_err(component->dev, "Device reports invalid PLL packet\n"); in wm0010_boot_xfer_complete()
315 dev_err(component->dev, "Device reports packet alignment error\n"); in wm0010_boot_xfer_complete()
320 dev_err(component->dev, "Unrecognised return 0x%x\n", in wm0010_boot_xfer_complete()
342 static int wm0010_firmware_load(const char *name, struct snd_soc_component *component) in wm0010_firmware_load() argument
344 struct spi_device *spi = to_spi_device(component->dev); in wm0010_firmware_load()
345 struct wm0010_priv *wm0010 = snd_soc_component_get_drvdata(component); in wm0010_firmware_load()
359 ret = request_firmware(&fw, name, component->dev); in wm0010_firmware_load()
361 dev_err(component->dev, "Failed to request application(%s): %d\n", in wm0010_firmware_load()
376 dev_err(component->dev, "First record not INFO\r\n"); in wm0010_firmware_load()
382 dev_err(component->dev, in wm0010_firmware_load()
389 dev_dbg(component->dev, "Version v%02d INFO record found\r\n", in wm0010_firmware_load()
394 dev_err(component->dev, "Not a WM0010 firmware file.\r\n"); in wm0010_firmware_load()
404 dev_dbg(component->dev, in wm0010_firmware_load()
415 xfer->component = component; in wm0010_firmware_load()
459 dev_dbg(component->dev, "All transfers scheduled\n"); in wm0010_firmware_load()
465 dev_err(component->dev, "Write failed: %d\n", ret); in wm0010_firmware_load()
470 dev_dbg(component->dev, "Boot fail!\n"); in wm0010_firmware_load()
495 static int wm0010_stage2_load(struct snd_soc_component *component) in wm0010_stage2_load() argument
497 struct spi_device *spi = to_spi_device(component->dev); in wm0010_stage2_load()
498 struct wm0010_priv *wm0010 = snd_soc_component_get_drvdata(component); in wm0010_stage2_load()
507 ret = request_firmware(&fw, "wm0010_stage2.bin", component->dev); in wm0010_stage2_load()
509 dev_err(component->dev, "Failed to request stage2 loader: %d\n", in wm0010_stage2_load()
514 dev_dbg(component->dev, "Downloading %zu byte stage 2 loader\n", fw->size); in wm0010_stage2_load()
538 dev_dbg(component->dev, "Starting initial download at %dHz\n", in wm0010_stage2_load()
543 dev_err(component->dev, "Initial download failed: %d\n", ret); in wm0010_stage2_load()
550 dev_err(component->dev, "Boot ROM error: %x in %d\n", in wm0010_stage2_load()
567 static int wm0010_boot(struct snd_soc_component *component) in wm0010_boot() argument
569 struct spi_device *spi = to_spi_device(component->dev); in wm0010_boot()
570 struct wm0010_priv *wm0010 = snd_soc_component_get_drvdata(component); in wm0010_boot()
587 dev_err(component->dev, "Max DSP clock frequency is 26MHz\n"); in wm0010_boot()
595 dev_dbg(component->dev, "max_spi_freq: %d\n", wm0010->max_spi_freq); in wm0010_boot()
620 dev_err(component->dev, "Failed to get interrupt from DSP\n"); in wm0010_boot()
626 ret = wm0010_stage2_load(component); in wm0010_boot()
632 dev_err(component->dev, "Failed to get interrupt from DSP loader.\n"); in wm0010_boot()
673 dev_err(component->dev, "First PLL write failed: %d\n", ret); in wm0010_boot()
680 dev_err(component->dev, "Second PLL write failed: %d\n", ret); in wm0010_boot()
689 dev_dbg(component->dev, "PLL packet received\n"); in wm0010_boot()
699 dev_dbg(component->dev, "Not enabling DSP PLL."); in wm0010_boot()
701 ret = wm0010_firmware_load("wm0010.dfw", component); in wm0010_boot()
720 wm0010_halt(component); in wm0010_boot()
732 static int wm0010_set_bias_level(struct snd_soc_component *component, in wm0010_set_bias_level() argument
735 struct wm0010_priv *wm0010 = snd_soc_component_get_drvdata(component); in wm0010_set_bias_level()
739 if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_PREPARE) in wm0010_set_bias_level()
740 wm0010_boot(component); in wm0010_set_bias_level()
745 if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_PREPARE) { in wm0010_set_bias_level()
747 wm0010_halt(component); in wm0010_set_bias_level()
758 static int wm0010_set_sysclk(struct snd_soc_component *component, int source, in wm0010_set_sysclk() argument
761 struct wm0010_priv *wm0010 = snd_soc_component_get_drvdata(component); in wm0010_set_sysclk()
780 static int wm0010_probe(struct snd_soc_component *component);
855 static int wm0010_probe(struct snd_soc_component *component) in wm0010_probe() argument
857 struct wm0010_priv *wm0010 = snd_soc_component_get_drvdata(component); in wm0010_probe()
859 wm0010->component = component; in wm0010_probe()