@@ -351,29 +351,13 @@ static int axg_tdm_iface_hw_free(struct snd_pcm_substream *substream,
351
351
return 0 ;
352
352
}
353
353
354
- static int axg_tdm_iface_trigger (struct snd_pcm_substream * substream ,
355
- int cmd ,
354
+ static int axg_tdm_iface_prepare (struct snd_pcm_substream * substream ,
356
355
struct snd_soc_dai * dai )
357
356
{
358
- struct axg_tdm_stream * ts =
359
- snd_soc_dai_get_dma_data (dai , substream );
360
-
361
- switch (cmd ) {
362
- case SNDRV_PCM_TRIGGER_START :
363
- case SNDRV_PCM_TRIGGER_RESUME :
364
- case SNDRV_PCM_TRIGGER_PAUSE_RELEASE :
365
- axg_tdm_stream_start (ts );
366
- break ;
367
- case SNDRV_PCM_TRIGGER_SUSPEND :
368
- case SNDRV_PCM_TRIGGER_PAUSE_PUSH :
369
- case SNDRV_PCM_TRIGGER_STOP :
370
- axg_tdm_stream_stop (ts );
371
- break ;
372
- default :
373
- return - EINVAL ;
374
- }
357
+ struct axg_tdm_stream * ts = snd_soc_dai_get_dma_data (dai , substream );
375
358
376
- return 0 ;
359
+ /* Force all attached formatters to update */
360
+ return axg_tdm_stream_reset (ts );
377
361
}
378
362
379
363
static int axg_tdm_iface_remove_dai (struct snd_soc_dai * dai )
@@ -413,8 +397,8 @@ static const struct snd_soc_dai_ops axg_tdm_iface_ops = {
413
397
.set_fmt = axg_tdm_iface_set_fmt ,
414
398
.startup = axg_tdm_iface_startup ,
415
399
.hw_params = axg_tdm_iface_hw_params ,
400
+ .prepare = axg_tdm_iface_prepare ,
416
401
.hw_free = axg_tdm_iface_hw_free ,
417
- .trigger = axg_tdm_iface_trigger ,
418
402
};
419
403
420
404
/* TDM Backend DAIs */
0 commit comments