ASoC: Intel: add support for pause and resume in sst
This adds missing pcm pause and resume ops in the driver Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
7b9ca9d7e5
commit
e0b87d476b
|
@ -572,6 +572,35 @@ static int sst_stream_drop(struct device *dev, int str_id)
|
|||
return sst_drop_stream(ctx, str_id);
|
||||
}
|
||||
|
||||
static int sst_stream_pause(struct device *dev, int str_id)
|
||||
{
|
||||
struct stream_info *str_info;
|
||||
struct intel_sst_drv *ctx = dev_get_drvdata(dev);
|
||||
|
||||
if (ctx->sst_state != SST_FW_RUNNING)
|
||||
return 0;
|
||||
|
||||
str_info = get_stream_info(ctx, str_id);
|
||||
if (!str_info)
|
||||
return -EINVAL;
|
||||
|
||||
return sst_pause_stream(ctx, str_id);
|
||||
}
|
||||
|
||||
static int sst_stream_resume(struct device *dev, int str_id)
|
||||
{
|
||||
struct stream_info *str_info;
|
||||
struct intel_sst_drv *ctx = dev_get_drvdata(dev);
|
||||
|
||||
if (ctx->sst_state != SST_FW_RUNNING)
|
||||
return 0;
|
||||
|
||||
str_info = get_stream_info(ctx, str_id);
|
||||
if (!str_info)
|
||||
return -EINVAL;
|
||||
return sst_resume_stream(ctx, str_id);
|
||||
}
|
||||
|
||||
static int sst_stream_init(struct device *dev, struct pcm_stream_info *str_info)
|
||||
{
|
||||
int str_id = 0;
|
||||
|
@ -633,6 +662,8 @@ static struct sst_ops pcm_ops = {
|
|||
.stream_init = sst_stream_init,
|
||||
.stream_start = sst_stream_start,
|
||||
.stream_drop = sst_stream_drop,
|
||||
.stream_pause = sst_stream_pause,
|
||||
.stream_pause_release = sst_stream_resume,
|
||||
.stream_read_tstamp = sst_read_timestamp,
|
||||
.send_byte_stream = sst_send_byte_stream,
|
||||
.close = sst_close_pcm_stream,
|
||||
|
|
Loading…
Reference in New Issue