Skip to content

Commit 248b75f

Browse files
Dr. David Alan Gilbertbroonie
authored andcommitted
ASoC: Intel: atom: Remove unused functions
sst_cdev_fragment_elapsed() was added in 2014 by commit 7adab12 ("ASoC: Intel: sst - add compressed ops handling") but has remained unused. sst_get_stream_allocated() was added in 2014 by commit cc54705 ("ASoC: Intel: sst - add pcm ops handling") but has remained unused. sst_wait_interruptible() was added in 2014 by commit 60dc8db ("ASoC: Intel: sst: Add some helper functions") but has remained unused. Remove them. Signed-off-by: "Dr. David Alan Gilbert" <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 4815e9f commit 248b75f

File tree

3 files changed

+0
-63
lines changed

3 files changed

+0
-63
lines changed

sound/soc/intel/atom/sst/sst.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -443,9 +443,6 @@ int sst_set_stream_param(int str_id, struct snd_sst_params *str_param);
443443
int sst_set_metadata(int str_id, char *params);
444444
int sst_get_stream(struct intel_sst_drv *ctx,
445445
struct snd_sst_params *str_param);
446-
int sst_get_stream_allocated(struct intel_sst_drv *ctx,
447-
struct snd_sst_params *str_param,
448-
struct snd_sst_lib_download **lib_dnld);
449446
int sst_drain_stream(struct intel_sst_drv *sst_drv_ctx,
450447
int str_id, bool partial_drain);
451448
int sst_post_message_mrfld(struct intel_sst_drv *sst_drv_ctx,
@@ -461,16 +458,13 @@ void sst_post_download_mrfld(struct intel_sst_drv *ctx);
461458
int sst_get_block_stream(struct intel_sst_drv *sst_drv_ctx);
462459
void sst_memcpy_free_resources(struct intel_sst_drv *sst_drv_ctx);
463460

464-
int sst_wait_interruptible(struct intel_sst_drv *sst_drv_ctx,
465-
struct sst_block *block);
466461
int sst_wait_timeout(struct intel_sst_drv *sst_drv_ctx,
467462
struct sst_block *block);
468463
int sst_create_ipc_msg(struct ipc_post **arg, bool large);
469464
int free_stream_context(struct intel_sst_drv *ctx, unsigned int str_id);
470465
void sst_clean_stream(struct stream_info *stream);
471466
int intel_sst_register_compress(struct intel_sst_drv *sst);
472467
int intel_sst_remove_compress(struct intel_sst_drv *sst);
473-
void sst_cdev_fragment_elapsed(struct intel_sst_drv *ctx, int str_id);
474468
int sst_send_sync_msg(int ipc, int str_id);
475469
int sst_get_num_channel(struct snd_sst_params *str_param);
476470
int sst_get_sfreq(struct snd_sst_params *str_param);

sound/soc/intel/atom/sst/sst_drv_interface.c

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,6 @@ int free_stream_context(struct intel_sst_drv *ctx, unsigned int str_id)
5555
return ret;
5656
}
5757

58-
int sst_get_stream_allocated(struct intel_sst_drv *ctx,
59-
struct snd_sst_params *str_param,
60-
struct snd_sst_lib_download **lib_dnld)
61-
{
62-
int retval;
63-
64-
retval = ctx->ops->alloc_stream(ctx, str_param);
65-
if (retval > 0)
66-
dev_dbg(ctx->dev, "Stream allocated %d\n", retval);
67-
return retval;
68-
69-
}
70-
7158
/*
7259
* sst_get_sfreq - this function returns the frequency of the stream
7360
*
@@ -430,17 +417,6 @@ static int sst_cdev_codec_caps(struct snd_compr_codec_caps *codec)
430417
return 0;
431418
}
432419

433-
void sst_cdev_fragment_elapsed(struct intel_sst_drv *ctx, int str_id)
434-
{
435-
struct stream_info *stream;
436-
437-
dev_dbg(ctx->dev, "fragment elapsed from firmware for str_id %d\n",
438-
str_id);
439-
stream = &ctx->streams[str_id];
440-
if (stream->compr_cb)
441-
stream->compr_cb(stream->compr_cb_param);
442-
}
443-
444420
/*
445421
* sst_close_pcm_stream - Close PCM interface
446422
*

sound/soc/intel/atom/sst/sst_pvt.c

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -69,39 +69,6 @@ void sst_set_fw_state_locked(
6969
mutex_unlock(&sst_drv_ctx->sst_lock);
7070
}
7171

72-
/*
73-
* sst_wait_interruptible - wait on event
74-
*
75-
* @sst_drv_ctx: Driver context
76-
* @block: Driver block to wait on
77-
*
78-
* This function waits without a timeout (and is interruptable) for a
79-
* given block event
80-
*/
81-
int sst_wait_interruptible(struct intel_sst_drv *sst_drv_ctx,
82-
struct sst_block *block)
83-
{
84-
int retval = 0;
85-
86-
if (!wait_event_interruptible(sst_drv_ctx->wait_queue,
87-
block->condition)) {
88-
/* event wake */
89-
if (block->ret_code < 0) {
90-
dev_err(sst_drv_ctx->dev,
91-
"stream failed %d\n", block->ret_code);
92-
retval = -EBUSY;
93-
} else {
94-
dev_dbg(sst_drv_ctx->dev, "event up\n");
95-
retval = 0;
96-
}
97-
} else {
98-
dev_err(sst_drv_ctx->dev, "signal interrupted\n");
99-
retval = -EINTR;
100-
}
101-
return retval;
102-
103-
}
104-
10572
/*
10673
* sst_wait_timeout - wait on event for timeout
10774
*

0 commit comments

Comments
 (0)