Commit 0cac6fc3 authored by Vinod Koul's avatar Vinod Koul Committed by Mark Brown

ASoC: Intel: rename pcm dias to media dai

this is for further updates to driver which supports DPCM :)
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 6f46c0d3
...@@ -95,7 +95,7 @@ static struct snd_pcm_hardware sst_platform_pcm_hw = { ...@@ -95,7 +95,7 @@ static struct snd_pcm_hardware sst_platform_pcm_hw = {
/* MFLD - MSIC */ /* MFLD - MSIC */
static struct snd_soc_dai_driver sst_platform_dai[] = { static struct snd_soc_dai_driver sst_platform_dai[] = {
{ {
.name = "Headset-cpu-dai", .name = "media-cpu-dai",
.id = 0, .id = 0,
.playback = { .playback = {
.channels_min = SST_STEREO, .channels_min = SST_STEREO,
...@@ -231,13 +231,13 @@ static int sst_platform_init_stream(struct snd_pcm_substream *substream) ...@@ -231,13 +231,13 @@ static int sst_platform_init_stream(struct snd_pcm_substream *substream)
} }
/* end -- helper functions */ /* end -- helper functions */
static int sst_platform_open(struct snd_pcm_substream *substream) static int sst_platform_media_open(struct snd_pcm_substream *substream)
{ {
struct snd_pcm_runtime *runtime = substream->runtime; struct snd_pcm_runtime *runtime = substream->runtime;
struct sst_runtime_stream *stream; struct sst_runtime_stream *stream;
int ret_val; int ret_val;
pr_debug("sst_platform_open called\n"); pr_debug("sst_platform_media_open called\n");
snd_soc_set_runtime_hwparams(substream, &sst_platform_pcm_hw); snd_soc_set_runtime_hwparams(substream, &sst_platform_pcm_hw);
ret_val = snd_pcm_hw_constraint_integer(runtime, ret_val = snd_pcm_hw_constraint_integer(runtime,
...@@ -275,12 +275,12 @@ static int sst_platform_open(struct snd_pcm_substream *substream) ...@@ -275,12 +275,12 @@ static int sst_platform_open(struct snd_pcm_substream *substream)
return 0; return 0;
} }
static int sst_platform_close(struct snd_pcm_substream *substream) static int sst_platform_media_close(struct snd_pcm_substream *substream)
{ {
struct sst_runtime_stream *stream; struct sst_runtime_stream *stream;
int ret_val = 0, str_id; int ret_val = 0, str_id;
pr_debug("sst_platform_close called\n"); pr_debug("sst_platform_media_close called\n");
stream = substream->runtime->private_data; stream = substream->runtime->private_data;
str_id = stream->stream_info.str_id; str_id = stream->stream_info.str_id;
if (str_id) if (str_id)
...@@ -290,12 +290,12 @@ static int sst_platform_close(struct snd_pcm_substream *substream) ...@@ -290,12 +290,12 @@ static int sst_platform_close(struct snd_pcm_substream *substream)
return ret_val; return ret_val;
} }
static int sst_platform_pcm_prepare(struct snd_pcm_substream *substream) static int sst_platform_pcm_media_prepare(struct snd_pcm_substream *substream)
{ {
struct sst_runtime_stream *stream; struct sst_runtime_stream *stream;
int ret_val = 0, str_id; int ret_val = 0, str_id;
pr_debug("sst_platform_pcm_prepare called\n"); pr_debug("sst_platform_pcm_media_prepare called\n");
stream = substream->runtime->private_data; stream = substream->runtime->private_data;
str_id = stream->stream_info.str_id; str_id = stream->stream_info.str_id;
if (stream->stream_info.str_id) { if (stream->stream_info.str_id) {
...@@ -317,14 +317,14 @@ static int sst_platform_pcm_prepare(struct snd_pcm_substream *substream) ...@@ -317,14 +317,14 @@ static int sst_platform_pcm_prepare(struct snd_pcm_substream *substream)
return ret_val; return ret_val;
} }
static int sst_platform_pcm_trigger(struct snd_pcm_substream *substream, static int sst_platform_pcm_media_trigger(struct snd_pcm_substream *substream,
int cmd) int cmd)
{ {
int ret_val = 0, str_id; int ret_val = 0, str_id;
struct sst_runtime_stream *stream; struct sst_runtime_stream *stream;
int str_cmd, status; int str_cmd, status;
pr_debug("sst_platform_pcm_trigger called\n"); pr_debug("sst_platform_pcm_media_trigger called\n");
stream = substream->runtime->private_data; stream = substream->runtime->private_data;
str_id = stream->stream_info.str_id; str_id = stream->stream_info.str_id;
switch (cmd) { switch (cmd) {
...@@ -360,7 +360,7 @@ static int sst_platform_pcm_trigger(struct snd_pcm_substream *substream, ...@@ -360,7 +360,7 @@ static int sst_platform_pcm_trigger(struct snd_pcm_substream *substream,
} }
static snd_pcm_uframes_t sst_platform_pcm_pointer static snd_pcm_uframes_t sst_platform_pcm_media_pointer
(struct snd_pcm_substream *substream) (struct snd_pcm_substream *substream)
{ {
struct sst_runtime_stream *stream; struct sst_runtime_stream *stream;
...@@ -381,7 +381,7 @@ static snd_pcm_uframes_t sst_platform_pcm_pointer ...@@ -381,7 +381,7 @@ static snd_pcm_uframes_t sst_platform_pcm_pointer
return stream->stream_info.buffer_ptr; return stream->stream_info.buffer_ptr;
} }
static int sst_platform_pcm_hw_params(struct snd_pcm_substream *substream, static int sst_platform_pcm_media_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params) struct snd_pcm_hw_params *params)
{ {
snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params)); snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params));
...@@ -390,20 +390,20 @@ static int sst_platform_pcm_hw_params(struct snd_pcm_substream *substream, ...@@ -390,20 +390,20 @@ static int sst_platform_pcm_hw_params(struct snd_pcm_substream *substream,
return 0; return 0;
} }
static int sst_platform_pcm_hw_free(struct snd_pcm_substream *substream) static int sst_platform_pcm_media_hw_free(struct snd_pcm_substream *substream)
{ {
return snd_pcm_lib_free_pages(substream); return snd_pcm_lib_free_pages(substream);
} }
static struct snd_pcm_ops sst_platform_ops = { static struct snd_pcm_ops sst_platform_ops = {
.open = sst_platform_open, .open = sst_platform_media_open,
.close = sst_platform_close, .close = sst_platform_media_close,
.ioctl = snd_pcm_lib_ioctl, .ioctl = snd_pcm_lib_ioctl,
.prepare = sst_platform_pcm_prepare, .prepare = sst_platform_pcm_media_prepare,
.trigger = sst_platform_pcm_trigger, .trigger = sst_platform_pcm_media_trigger,
.pointer = sst_platform_pcm_pointer, .pointer = sst_platform_pcm_media_pointer,
.hw_params = sst_platform_pcm_hw_params, .hw_params = sst_platform_pcm_media_hw_params,
.hw_free = sst_platform_pcm_hw_free, .hw_free = sst_platform_pcm_media_hw_free,
}; };
static void sst_pcm_free(struct snd_pcm *pcm) static void sst_pcm_free(struct snd_pcm *pcm)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment