mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-20 11:13:58 +08:00
ASoC: Intel: Pass stream start position to sst_byt_stream_start()
Stream start position will be needed in resume code. Prepare for it by adding start offset argument to sst_byt_stream_start(). Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
parent
65ee9e8fb6
commit
a6686ed553
@ -663,7 +663,8 @@ static int sst_byt_stream_operations(struct sst_byt *byt, int type,
|
||||
}
|
||||
|
||||
/* stream ALSA trigger operations */
|
||||
int sst_byt_stream_start(struct sst_byt *byt, struct sst_byt_stream *stream)
|
||||
int sst_byt_stream_start(struct sst_byt *byt, struct sst_byt_stream *stream,
|
||||
u32 start_offset)
|
||||
{
|
||||
struct sst_byt_start_stream_params start_stream;
|
||||
void *tx_msg;
|
||||
@ -671,7 +672,7 @@ int sst_byt_stream_start(struct sst_byt *byt, struct sst_byt_stream *stream)
|
||||
u64 header;
|
||||
int ret;
|
||||
|
||||
start_stream.byte_offset = 0;
|
||||
start_stream.byte_offset = start_offset;
|
||||
header = sst_byt_header(IPC_IA_START_STREAM,
|
||||
sizeof(start_stream) + sizeof(u32),
|
||||
true, stream->str_id);
|
||||
|
@ -53,7 +53,8 @@ int sst_byt_stream_commit(struct sst_byt *byt, struct sst_byt_stream *stream);
|
||||
int sst_byt_stream_free(struct sst_byt *byt, struct sst_byt_stream *stream);
|
||||
|
||||
/* stream ALSA trigger operations */
|
||||
int sst_byt_stream_start(struct sst_byt *byt, struct sst_byt_stream *stream);
|
||||
int sst_byt_stream_start(struct sst_byt *byt, struct sst_byt_stream *stream,
|
||||
u32 start_offset);
|
||||
int sst_byt_stream_stop(struct sst_byt *byt, struct sst_byt_stream *stream);
|
||||
int sst_byt_stream_pause(struct sst_byt *byt, struct sst_byt_stream *stream);
|
||||
int sst_byt_stream_resume(struct sst_byt *byt, struct sst_byt_stream *stream);
|
||||
|
@ -145,7 +145,7 @@ static int sst_byt_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
|
||||
|
||||
switch (cmd) {
|
||||
case SNDRV_PCM_TRIGGER_START:
|
||||
sst_byt_stream_start(byt, pcm_data->stream);
|
||||
sst_byt_stream_start(byt, pcm_data->stream, 0);
|
||||
break;
|
||||
case SNDRV_PCM_TRIGGER_RESUME:
|
||||
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
|
||||
|
Loading…
Reference in New Issue
Block a user