diff options
| -rw-r--r-- | sound/soc/codecs/wm_adsp.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index 630ebcdaf46e..42fc46900400 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c | |||
| @@ -2452,6 +2452,25 @@ void wm_adsp2_remove(struct wm_adsp *dsp) | |||
| 2452 | } | 2452 | } |
| 2453 | EXPORT_SYMBOL_GPL(wm_adsp2_remove); | 2453 | EXPORT_SYMBOL_GPL(wm_adsp2_remove); |
| 2454 | 2454 | ||
| 2455 | static inline int wm_adsp_compr_attached(struct wm_adsp_compr *compr) | ||
| 2456 | { | ||
| 2457 | return compr->buf != NULL; | ||
| 2458 | } | ||
| 2459 | |||
| 2460 | static int wm_adsp_compr_attach(struct wm_adsp_compr *compr) | ||
| 2461 | { | ||
| 2462 | /* | ||
| 2463 | * Note this will be more complex once each DSP can support multiple | ||
| 2464 | * streams | ||
| 2465 | */ | ||
| 2466 | if (!compr->dsp->buffer) | ||
| 2467 | return -EINVAL; | ||
| 2468 | |||
| 2469 | compr->buf = compr->dsp->buffer; | ||
| 2470 | |||
| 2471 | return 0; | ||
| 2472 | } | ||
| 2473 | |||
| 2455 | int wm_adsp_compr_open(struct wm_adsp *dsp, struct snd_compr_stream *stream) | 2474 | int wm_adsp_compr_open(struct wm_adsp *dsp, struct snd_compr_stream *stream) |
| 2456 | { | 2475 | { |
| 2457 | struct wm_adsp_compr *compr; | 2476 | struct wm_adsp_compr *compr; |
| @@ -2810,25 +2829,6 @@ static int wm_adsp_buffer_free(struct wm_adsp *dsp) | |||
| 2810 | return 0; | 2829 | return 0; |
| 2811 | } | 2830 | } |
| 2812 | 2831 | ||
| 2813 | static inline int wm_adsp_compr_attached(struct wm_adsp_compr *compr) | ||
| 2814 | { | ||
| 2815 | return compr->buf != NULL; | ||
| 2816 | } | ||
| 2817 | |||
| 2818 | static int wm_adsp_compr_attach(struct wm_adsp_compr *compr) | ||
| 2819 | { | ||
| 2820 | /* | ||
| 2821 | * Note this will be more complex once each DSP can support multiple | ||
| 2822 | * streams | ||
| 2823 | */ | ||
| 2824 | if (!compr->dsp->buffer) | ||
| 2825 | return -EINVAL; | ||
| 2826 | |||
| 2827 | compr->buf = compr->dsp->buffer; | ||
| 2828 | |||
| 2829 | return 0; | ||
| 2830 | } | ||
| 2831 | |||
| 2832 | int wm_adsp_compr_trigger(struct snd_compr_stream *stream, int cmd) | 2832 | int wm_adsp_compr_trigger(struct snd_compr_stream *stream, int cmd) |
| 2833 | { | 2833 | { |
| 2834 | struct wm_adsp_compr *compr = stream->runtime->private_data; | 2834 | struct wm_adsp_compr *compr = stream->runtime->private_data; |
