aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/sst-mfld-platform-pcm.c
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2014-05-15 12:08:15 -0400
committerMark Brown <broonie@linaro.org>2014-05-16 14:44:49 -0400
commit5106f5a17e40534edbb74edf5d769abcbfadf55c (patch)
tree6b00be8fd2a548ee470042aa452709a8b9049412 /sound/soc/intel/sst-mfld-platform-pcm.c
parent8c44b2b1aee1a0e1d47af9ed96ebb848dbcdea50 (diff)
ASoC: Intel: Revert "rename pcm dias to media dai"
This reverts commit 0cac6fc3eb5218fe40d1c2910abc643ab21d9f19. This comiit was dropped from rev2 and would not be required as it renames the platform ops as well which is not required. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/intel/sst-mfld-platform-pcm.c')
-rw-r--r--sound/soc/intel/sst-mfld-platform-pcm.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/sound/soc/intel/sst-mfld-platform-pcm.c b/sound/soc/intel/sst-mfld-platform-pcm.c
index 72d0fae34a53..d0bc328538c9 100644
--- a/sound/soc/intel/sst-mfld-platform-pcm.c
+++ b/sound/soc/intel/sst-mfld-platform-pcm.c
@@ -95,7 +95,7 @@ static struct snd_pcm_hardware sst_platform_pcm_hw = {
95/* MFLD - MSIC */ 95/* MFLD - MSIC */
96static struct snd_soc_dai_driver sst_platform_dai[] = { 96static struct snd_soc_dai_driver sst_platform_dai[] = {
97{ 97{
98 .name = "media-cpu-dai", 98 .name = "Headset-cpu-dai",
99 .id = 0, 99 .id = 0,
100 .playback = { 100 .playback = {
101 .channels_min = SST_STEREO, 101 .channels_min = SST_STEREO,
@@ -231,13 +231,13 @@ static int sst_platform_init_stream(struct snd_pcm_substream *substream)
231} 231}
232/* end -- helper functions */ 232/* end -- helper functions */
233 233
234static int sst_platform_media_open(struct snd_pcm_substream *substream) 234static int sst_platform_open(struct snd_pcm_substream *substream)
235{ 235{
236 struct snd_pcm_runtime *runtime = substream->runtime; 236 struct snd_pcm_runtime *runtime = substream->runtime;
237 struct sst_runtime_stream *stream; 237 struct sst_runtime_stream *stream;
238 int ret_val; 238 int ret_val;
239 239
240 pr_debug("sst_platform_media_open called\n"); 240 pr_debug("sst_platform_open called\n");
241 241
242 snd_soc_set_runtime_hwparams(substream, &sst_platform_pcm_hw); 242 snd_soc_set_runtime_hwparams(substream, &sst_platform_pcm_hw);
243 ret_val = snd_pcm_hw_constraint_integer(runtime, 243 ret_val = snd_pcm_hw_constraint_integer(runtime,
@@ -275,12 +275,12 @@ static int sst_platform_media_open(struct snd_pcm_substream *substream)
275 return 0; 275 return 0;
276} 276}
277 277
278static int sst_platform_media_close(struct snd_pcm_substream *substream) 278static int sst_platform_close(struct snd_pcm_substream *substream)
279{ 279{
280 struct sst_runtime_stream *stream; 280 struct sst_runtime_stream *stream;
281 int ret_val = 0, str_id; 281 int ret_val = 0, str_id;
282 282
283 pr_debug("sst_platform_media_close called\n"); 283 pr_debug("sst_platform_close called\n");
284 stream = substream->runtime->private_data; 284 stream = substream->runtime->private_data;
285 str_id = stream->stream_info.str_id; 285 str_id = stream->stream_info.str_id;
286 if (str_id) 286 if (str_id)
@@ -290,12 +290,12 @@ static int sst_platform_media_close(struct snd_pcm_substream *substream)
290 return ret_val; 290 return ret_val;
291} 291}
292 292
293static int sst_platform_pcm_media_prepare(struct snd_pcm_substream *substream) 293static int sst_platform_pcm_prepare(struct snd_pcm_substream *substream)
294{ 294{
295 struct sst_runtime_stream *stream; 295 struct sst_runtime_stream *stream;
296 int ret_val = 0, str_id; 296 int ret_val = 0, str_id;
297 297
298 pr_debug("sst_platform_pcm_media_prepare called\n"); 298 pr_debug("sst_platform_pcm_prepare called\n");
299 stream = substream->runtime->private_data; 299 stream = substream->runtime->private_data;
300 str_id = stream->stream_info.str_id; 300 str_id = stream->stream_info.str_id;
301 if (stream->stream_info.str_id) { 301 if (stream->stream_info.str_id) {
@@ -317,14 +317,14 @@ static int sst_platform_pcm_media_prepare(struct snd_pcm_substream *substream)
317 return ret_val; 317 return ret_val;
318} 318}
319 319
320static int sst_platform_pcm_media_trigger(struct snd_pcm_substream *substream, 320static int sst_platform_pcm_trigger(struct snd_pcm_substream *substream,
321 int cmd) 321 int cmd)
322{ 322{
323 int ret_val = 0, str_id; 323 int ret_val = 0, str_id;
324 struct sst_runtime_stream *stream; 324 struct sst_runtime_stream *stream;
325 int str_cmd, status; 325 int str_cmd, status;
326 326
327 pr_debug("sst_platform_pcm_media_trigger called\n"); 327 pr_debug("sst_platform_pcm_trigger called\n");
328 stream = substream->runtime->private_data; 328 stream = substream->runtime->private_data;
329 str_id = stream->stream_info.str_id; 329 str_id = stream->stream_info.str_id;
330 switch (cmd) { 330 switch (cmd) {
@@ -360,7 +360,7 @@ static int sst_platform_pcm_media_trigger(struct snd_pcm_substream *substream,
360} 360}
361 361
362 362
363static snd_pcm_uframes_t sst_platform_pcm_media_pointer 363static snd_pcm_uframes_t sst_platform_pcm_pointer
364 (struct snd_pcm_substream *substream) 364 (struct snd_pcm_substream *substream)
365{ 365{
366 struct sst_runtime_stream *stream; 366 struct sst_runtime_stream *stream;
@@ -381,7 +381,7 @@ static snd_pcm_uframes_t sst_platform_pcm_media_pointer
381 return stream->stream_info.buffer_ptr; 381 return stream->stream_info.buffer_ptr;
382} 382}
383 383
384static int sst_platform_pcm_media_hw_params(struct snd_pcm_substream *substream, 384static int sst_platform_pcm_hw_params(struct snd_pcm_substream *substream,
385 struct snd_pcm_hw_params *params) 385 struct snd_pcm_hw_params *params)
386{ 386{
387 snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params)); 387 snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params));
@@ -390,20 +390,20 @@ static int sst_platform_pcm_media_hw_params(struct snd_pcm_substream *substream,
390 return 0; 390 return 0;
391} 391}
392 392
393static int sst_platform_pcm_media_hw_free(struct snd_pcm_substream *substream) 393static int sst_platform_pcm_hw_free(struct snd_pcm_substream *substream)
394{ 394{
395 return snd_pcm_lib_free_pages(substream); 395 return snd_pcm_lib_free_pages(substream);
396} 396}
397 397
398static struct snd_pcm_ops sst_platform_ops = { 398static struct snd_pcm_ops sst_platform_ops = {
399 .open = sst_platform_media_open, 399 .open = sst_platform_open,
400 .close = sst_platform_media_close, 400 .close = sst_platform_close,
401 .ioctl = snd_pcm_lib_ioctl, 401 .ioctl = snd_pcm_lib_ioctl,
402 .prepare = sst_platform_pcm_media_prepare, 402 .prepare = sst_platform_pcm_prepare,
403 .trigger = sst_platform_pcm_media_trigger, 403 .trigger = sst_platform_pcm_trigger,
404 .pointer = sst_platform_pcm_media_pointer, 404 .pointer = sst_platform_pcm_pointer,
405 .hw_params = sst_platform_pcm_media_hw_params, 405 .hw_params = sst_platform_pcm_hw_params,
406 .hw_free = sst_platform_pcm_media_hw_free, 406 .hw_free = sst_platform_pcm_hw_free,
407}; 407};
408 408
409static void sst_pcm_free(struct snd_pcm *pcm) 409static void sst_pcm_free(struct snd_pcm *pcm)