summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_controller.h
diff options
context:
space:
mode:
authorDylan Reid <dgreid@chromium.org>2014-02-28 15:41:24 -0800
committerTakashi Iwai <tiwai@suse.de>2014-03-01 11:22:38 +0100
commit2b5fd6c2e9f2398962a932f85d951bce794f97f8 (patch)
treea9e79bcaa598ee98432ef159a075244e87b8db83 /sound/pci/hda/hda_controller.h
parent679089944317963e9abf51899b48db3b6f424489 (diff)
ALSA: hda - Move the dsp loader to hda_controller
Moving the DSP loading functionality to hda_controller.c means that the dsp lock doesn't need to be shared in hda_intel and hda_controller. The forthcoming platform driver doesn't need the DSP loading code, but sharing it doesn't hurt. Tested on Chromebook Pixel's ca0132 that uses the DSP loader. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_controller.h')
-rw-r--r--sound/pci/hda/hda_controller.h23
1 files changed, 6 insertions, 17 deletions
diff --git a/sound/pci/hda/hda_controller.h b/sound/pci/hda/hda_controller.h
index 9ea6b44e033d..7c9c04d23f20 100644
--- a/sound/pci/hda/hda_controller.h
+++ b/sound/pci/hda/hda_controller.h
@@ -32,26 +32,15 @@ unsigned int azx_get_position(struct azx *chip,
bool with_check);
/* Stream control. */
-void azx_stream_start(struct azx *chip, struct azx_dev *azx_dev);
void azx_stream_stop(struct azx *chip, struct azx_dev *azx_dev);
-void azx_stream_reset(struct azx *chip, struct azx_dev *azx_dev);
-int azx_setup_controller(struct azx *chip, struct azx_dev *azx_dev);
-int setup_bdle(struct azx *chip,
- struct snd_dma_buffer *dmab,
- struct azx_dev *azx_dev, u32 **bdlp,
- int ofs, int size, int with_ioc);
-/* DSP lock helpers */
#ifdef CONFIG_SND_HDA_DSP_LOADER
-#define dsp_lock_init(dev) mutex_init(&(dev)->dsp_mutex)
-#define dsp_lock(dev) mutex_lock(&(dev)->dsp_mutex)
-#define dsp_unlock(dev) mutex_unlock(&(dev)->dsp_mutex)
-#define dsp_is_locked(dev) ((dev)->locked)
-#else
-#define dsp_lock_init(dev) do {} while (0)
-#define dsp_lock(dev) do {} while (0)
-#define dsp_unlock(dev) do {} while (0)
-#define dsp_is_locked(dev) 0
+int azx_load_dsp_prepare(struct hda_bus *bus, unsigned int format,
+ unsigned int byte_size,
+ struct snd_dma_buffer *bufp);
+void azx_load_dsp_trigger(struct hda_bus *bus, bool start);
+void azx_load_dsp_cleanup(struct hda_bus *bus,
+ struct snd_dma_buffer *dmab);
#endif
/* Allocation functions. */