@@ -62,7 +62,7 @@ static int sst_byt_pcm_hw_params(struct snd_soc_component *component,
62
62
struct snd_pcm_substream * substream ,
63
63
struct snd_pcm_hw_params * params )
64
64
{
65
- struct snd_soc_pcm_runtime * rtd = substream -> private_data ;
65
+ struct snd_soc_pcm_runtime * rtd = asoc_substream_to_rtd ( substream ) ;
66
66
struct sst_byt_priv_data * pdata = snd_soc_component_get_drvdata (component );
67
67
struct sst_byt_pcm_data * pcm_data = & pdata -> pcm [substream -> stream ];
68
68
struct sst_byt * byt = pdata -> byt ;
@@ -121,7 +121,7 @@ static int sst_byt_pcm_hw_params(struct snd_soc_component *component,
121
121
122
122
static int sst_byt_pcm_restore_stream_context (struct snd_pcm_substream * substream )
123
123
{
124
- struct snd_soc_pcm_runtime * rtd = substream -> private_data ;
124
+ struct snd_soc_pcm_runtime * rtd = asoc_substream_to_rtd ( substream ) ;
125
125
struct snd_soc_component * component = snd_soc_rtdcom_lookup (rtd , DRV_NAME );
126
126
struct sst_byt_priv_data * pdata = snd_soc_component_get_drvdata (component );
127
127
struct sst_byt_pcm_data * pcm_data = & pdata -> pcm [substream -> stream ];
@@ -155,7 +155,7 @@ static void sst_byt_pcm_work(struct work_struct *work)
155
155
static int sst_byt_pcm_trigger (struct snd_soc_component * component ,
156
156
struct snd_pcm_substream * substream , int cmd )
157
157
{
158
- struct snd_soc_pcm_runtime * rtd = substream -> private_data ;
158
+ struct snd_soc_pcm_runtime * rtd = asoc_substream_to_rtd ( substream ) ;
159
159
struct sst_byt_priv_data * pdata = snd_soc_component_get_drvdata (component );
160
160
struct sst_byt_pcm_data * pcm_data = & pdata -> pcm [substream -> stream ];
161
161
struct sst_byt * byt = pdata -> byt ;
@@ -197,7 +197,7 @@ static u32 byt_notify_pointer(struct sst_byt_stream *stream, void *data)
197
197
struct sst_byt_pcm_data * pcm_data = data ;
198
198
struct snd_pcm_substream * substream = pcm_data -> substream ;
199
199
struct snd_pcm_runtime * runtime = substream -> runtime ;
200
- struct snd_soc_pcm_runtime * rtd = substream -> private_data ;
200
+ struct snd_soc_pcm_runtime * rtd = asoc_substream_to_rtd ( substream ) ;
201
201
struct snd_soc_component * component = snd_soc_rtdcom_lookup (rtd , DRV_NAME );
202
202
struct sst_byt_priv_data * pdata = snd_soc_component_get_drvdata (component );
203
203
struct sst_byt * byt = pdata -> byt ;
@@ -219,7 +219,7 @@ static u32 byt_notify_pointer(struct sst_byt_stream *stream, void *data)
219
219
static snd_pcm_uframes_t sst_byt_pcm_pointer (struct snd_soc_component * component ,
220
220
struct snd_pcm_substream * substream )
221
221
{
222
- struct snd_soc_pcm_runtime * rtd = substream -> private_data ;
222
+ struct snd_soc_pcm_runtime * rtd = asoc_substream_to_rtd ( substream ) ;
223
223
struct snd_pcm_runtime * runtime = substream -> runtime ;
224
224
struct sst_byt_priv_data * pdata = snd_soc_component_get_drvdata (component );
225
225
struct sst_byt_pcm_data * pcm_data = & pdata -> pcm [substream -> stream ];
@@ -232,7 +232,7 @@ static snd_pcm_uframes_t sst_byt_pcm_pointer(struct snd_soc_component *component
232
232
static int sst_byt_pcm_open (struct snd_soc_component * component ,
233
233
struct snd_pcm_substream * substream )
234
234
{
235
- struct snd_soc_pcm_runtime * rtd = substream -> private_data ;
235
+ struct snd_soc_pcm_runtime * rtd = asoc_substream_to_rtd ( substream ) ;
236
236
struct sst_byt_priv_data * pdata = snd_soc_component_get_drvdata (component );
237
237
struct sst_byt_pcm_data * pcm_data = & pdata -> pcm [substream -> stream ];
238
238
struct sst_byt * byt = pdata -> byt ;
@@ -260,7 +260,7 @@ static int sst_byt_pcm_open(struct snd_soc_component *component,
260
260
static int sst_byt_pcm_close (struct snd_soc_component * component ,
261
261
struct snd_pcm_substream * substream )
262
262
{
263
- struct snd_soc_pcm_runtime * rtd = substream -> private_data ;
263
+ struct snd_soc_pcm_runtime * rtd = asoc_substream_to_rtd ( substream ) ;
264
264
struct sst_byt_priv_data * pdata = snd_soc_component_get_drvdata (component );
265
265
struct sst_byt_pcm_data * pcm_data = & pdata -> pcm [substream -> stream ];
266
266
struct sst_byt * byt = pdata -> byt ;
@@ -286,7 +286,7 @@ static int sst_byt_pcm_mmap(struct snd_soc_component *component,
286
286
struct snd_pcm_substream * substream ,
287
287
struct vm_area_struct * vma )
288
288
{
289
- struct snd_soc_pcm_runtime * rtd = substream -> private_data ;
289
+ struct snd_soc_pcm_runtime * rtd = asoc_substream_to_rtd ( substream ) ;
290
290
291
291
dev_dbg (rtd -> dev , "PCM: mmap\n" );
292
292
return snd_pcm_lib_default_mmap (substream , vma );
0 commit comments