Skip to content

Commit 950039f

Browse files
committed
Merge series "ASoC: intel: use asoc_substream_to_rtd()" from Kuninori Morimoto <[email protected]>:
Hi Mark I have posted "ASoC: add asoc_substream_to_rtd() macro" patch-set to ALSA SoC ML (= see Link), and then Pierre-Louis wanted that Intel patch was separated for boards. The patches which are not for Intel were already accepted. This is for Intel, and Intel boards. Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Kuninori Morimoto (2): ASoC: intel/boards: use asoc_substream_to_rtd() ASoC: intel: use asoc_substream_to_rtd() sound/soc/intel/atom/sst-mfld-platform-pcm.c | 6 +++--- sound/soc/intel/baytrail/sst-baytrail-pcm.c | 16 ++++++++-------- sound/soc/intel/boards/bdw-rt5650.c | 2 +- sound/soc/intel/boards/bdw-rt5677.c | 4 ++-- sound/soc/intel/boards/broadwell.c | 2 +- sound/soc/intel/boards/bxt_rt298.c | 2 +- sound/soc/intel/boards/byt-rt5640.c | 2 +- sound/soc/intel/boards/bytcht_da7213.c | 4 ++-- sound/soc/intel/boards/bytcr_rt5640.c | 2 +- sound/soc/intel/boards/bytcr_rt5651.c | 2 +- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 2 +- sound/soc/intel/boards/cht_bsw_nau8824.c | 2 +- sound/soc/intel/boards/cht_bsw_rt5645.c | 2 +- sound/soc/intel/boards/cht_bsw_rt5672.c | 2 +- sound/soc/intel/boards/cml_rt1011_rt5682.c | 4 ++-- sound/soc/intel/boards/ehl_rt5660.c | 2 +- sound/soc/intel/boards/glk_rt5682_max98357a.c | 2 +- sound/soc/intel/boards/haswell.c | 2 +- sound/soc/intel/boards/kbl_da7219_max98927.c | 8 ++++---- sound/soc/intel/boards/kbl_rt5660.c | 2 +- sound/soc/intel/boards/kbl_rt5663_max98927.c | 4 ++-- .../intel/boards/kbl_rt5663_rt5514_max98927.c | 4 ++-- sound/soc/intel/boards/skl_nau88l25_max98357a.c | 2 +- sound/soc/intel/boards/skl_nau88l25_ssm4567.c | 2 +- sound/soc/intel/boards/skl_rt286.c | 2 +- sound/soc/intel/boards/sof_da7219_max98373.c | 2 +- sound/soc/intel/boards/sof_maxim_common.c | 4 ++-- sound/soc/intel/boards/sof_pcm512x.c | 4 ++-- sound/soc/intel/boards/sof_rt5682.c | 4 ++-- sound/soc/intel/boards/sof_sdw_rt1308.c | 2 +- sound/soc/intel/boards/sof_wm8804.c | 2 +- sound/soc/intel/haswell/sst-haswell-pcm.c | 12 ++++++------ sound/soc/intel/keembay/kmb_platform.c | 2 +- sound/soc/intel/skylake/skl-pcm.c | 8 ++++---- 34 files changed, 62 insertions(+), 62 deletions(-) -- 2.25.1
2 parents 34facb0 + 2ab9a40 commit 950039f

34 files changed

+62
-62
lines changed

sound/soc/intel/atom/sst-mfld-platform-pcm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ static int sst_platform_init_stream(struct snd_pcm_substream *substream)
274274
{
275275
struct sst_runtime_stream *stream =
276276
substream->runtime->private_data;
277-
struct snd_soc_pcm_runtime *rtd = substream->private_data;
277+
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
278278
int ret_val;
279279

280280
dev_dbg(rtd->dev, "setting buffer ptr param\n");
@@ -582,7 +582,7 @@ static int sst_soc_trigger(struct snd_soc_component *component,
582582
int ret_val = 0, str_id;
583583
struct sst_runtime_stream *stream;
584584
int status;
585-
struct snd_soc_pcm_runtime *rtd = substream->private_data;
585+
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
586586

587587
dev_dbg(rtd->dev, "%s called\n", __func__);
588588
if (substream->pcm->internal)
@@ -630,7 +630,7 @@ static snd_pcm_uframes_t sst_soc_pointer(struct snd_soc_component *component,
630630
struct sst_runtime_stream *stream;
631631
int ret_val, status;
632632
struct pcm_stream_info *str_info;
633-
struct snd_soc_pcm_runtime *rtd = substream->private_data;
633+
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
634634

635635
stream = substream->runtime->private_data;
636636
status = sst_get_stream_status(stream);

sound/soc/intel/baytrail/sst-baytrail-pcm.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static int sst_byt_pcm_hw_params(struct snd_soc_component *component,
6262
struct snd_pcm_substream *substream,
6363
struct snd_pcm_hw_params *params)
6464
{
65-
struct snd_soc_pcm_runtime *rtd = substream->private_data;
65+
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
6666
struct sst_byt_priv_data *pdata = snd_soc_component_get_drvdata(component);
6767
struct sst_byt_pcm_data *pcm_data = &pdata->pcm[substream->stream];
6868
struct sst_byt *byt = pdata->byt;
@@ -121,7 +121,7 @@ static int sst_byt_pcm_hw_params(struct snd_soc_component *component,
121121

122122
static int sst_byt_pcm_restore_stream_context(struct snd_pcm_substream *substream)
123123
{
124-
struct snd_soc_pcm_runtime *rtd = substream->private_data;
124+
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
125125
struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
126126
struct sst_byt_priv_data *pdata = snd_soc_component_get_drvdata(component);
127127
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)
155155
static int sst_byt_pcm_trigger(struct snd_soc_component *component,
156156
struct snd_pcm_substream *substream, int cmd)
157157
{
158-
struct snd_soc_pcm_runtime *rtd = substream->private_data;
158+
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
159159
struct sst_byt_priv_data *pdata = snd_soc_component_get_drvdata(component);
160160
struct sst_byt_pcm_data *pcm_data = &pdata->pcm[substream->stream];
161161
struct sst_byt *byt = pdata->byt;
@@ -197,7 +197,7 @@ static u32 byt_notify_pointer(struct sst_byt_stream *stream, void *data)
197197
struct sst_byt_pcm_data *pcm_data = data;
198198
struct snd_pcm_substream *substream = pcm_data->substream;
199199
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);
201201
struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
202202
struct sst_byt_priv_data *pdata = snd_soc_component_get_drvdata(component);
203203
struct sst_byt *byt = pdata->byt;
@@ -219,7 +219,7 @@ static u32 byt_notify_pointer(struct sst_byt_stream *stream, void *data)
219219
static snd_pcm_uframes_t sst_byt_pcm_pointer(struct snd_soc_component *component,
220220
struct snd_pcm_substream *substream)
221221
{
222-
struct snd_soc_pcm_runtime *rtd = substream->private_data;
222+
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
223223
struct snd_pcm_runtime *runtime = substream->runtime;
224224
struct sst_byt_priv_data *pdata = snd_soc_component_get_drvdata(component);
225225
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
232232
static int sst_byt_pcm_open(struct snd_soc_component *component,
233233
struct snd_pcm_substream *substream)
234234
{
235-
struct snd_soc_pcm_runtime *rtd = substream->private_data;
235+
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
236236
struct sst_byt_priv_data *pdata = snd_soc_component_get_drvdata(component);
237237
struct sst_byt_pcm_data *pcm_data = &pdata->pcm[substream->stream];
238238
struct sst_byt *byt = pdata->byt;
@@ -260,7 +260,7 @@ static int sst_byt_pcm_open(struct snd_soc_component *component,
260260
static int sst_byt_pcm_close(struct snd_soc_component *component,
261261
struct snd_pcm_substream *substream)
262262
{
263-
struct snd_soc_pcm_runtime *rtd = substream->private_data;
263+
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
264264
struct sst_byt_priv_data *pdata = snd_soc_component_get_drvdata(component);
265265
struct sst_byt_pcm_data *pcm_data = &pdata->pcm[substream->stream];
266266
struct sst_byt *byt = pdata->byt;
@@ -286,7 +286,7 @@ static int sst_byt_pcm_mmap(struct snd_soc_component *component,
286286
struct snd_pcm_substream *substream,
287287
struct vm_area_struct *vma)
288288
{
289-
struct snd_soc_pcm_runtime *rtd = substream->private_data;
289+
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
290290

291291
dev_dbg(rtd->dev, "PCM: mmap\n");
292292
return snd_pcm_lib_default_mmap(substream, vma);

sound/soc/intel/boards/bdw-rt5650.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ static int broadwell_ssp0_fixup(struct snd_soc_pcm_runtime *rtd,
106106
static int bdw_rt5650_hw_params(struct snd_pcm_substream *substream,
107107
struct snd_pcm_hw_params *params)
108108
{
109-
struct snd_soc_pcm_runtime *rtd = substream->private_data;
109+
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
110110
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
111111
int ret;
112112

sound/soc/intel/boards/bdw-rt5677.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ static int broadwell_ssp0_fixup(struct snd_soc_pcm_runtime *rtd,
156156
static int bdw_rt5677_hw_params(struct snd_pcm_substream *substream,
157157
struct snd_pcm_hw_params *params)
158158
{
159-
struct snd_soc_pcm_runtime *rtd = substream->private_data;
159+
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
160160
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
161161
int ret;
162162

@@ -173,7 +173,7 @@ static int bdw_rt5677_hw_params(struct snd_pcm_substream *substream,
173173
static int bdw_rt5677_dsp_hw_params(struct snd_pcm_substream *substream,
174174
struct snd_pcm_hw_params *params)
175175
{
176-
struct snd_soc_pcm_runtime *rtd = substream->private_data;
176+
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
177177
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
178178
int ret;
179179

sound/soc/intel/boards/broadwell.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ static int broadwell_ssp0_fixup(struct snd_soc_pcm_runtime *rtd,
103103
static int broadwell_rt286_hw_params(struct snd_pcm_substream *substream,
104104
struct snd_pcm_hw_params *params)
105105
{
106-
struct snd_soc_pcm_runtime *rtd = substream->private_data;
106+
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
107107
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
108108
int ret;
109109

sound/soc/intel/boards/bxt_rt298.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ static int broxton_ssp5_fixup(struct snd_soc_pcm_runtime *rtd,
224224
static int broxton_rt298_hw_params(struct snd_pcm_substream *substream,
225225
struct snd_pcm_hw_params *params)
226226
{
227-
struct snd_soc_pcm_runtime *rtd = substream->private_data;
227+
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
228228
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
229229
int ret;
230230

sound/soc/intel/boards/byt-rt5640.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ static const struct snd_kcontrol_new byt_rt5640_controls[] = {
7272
static int byt_rt5640_hw_params(struct snd_pcm_substream *substream,
7373
struct snd_pcm_hw_params *params)
7474
{
75-
struct snd_soc_pcm_runtime *rtd = substream->private_data;
75+
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
7676
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
7777
int ret;
7878

sound/soc/intel/boards/bytcht_da7213.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static int aif1_startup(struct snd_pcm_substream *substream)
105105
static int aif1_hw_params(struct snd_pcm_substream *substream,
106106
struct snd_pcm_hw_params *params)
107107
{
108-
struct snd_soc_pcm_runtime *rtd = substream->private_data;
108+
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
109109
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
110110
int ret;
111111

@@ -126,7 +126,7 @@ static int aif1_hw_params(struct snd_pcm_substream *substream,
126126

127127
static int aif1_hw_free(struct snd_pcm_substream *substream)
128128
{
129-
struct snd_soc_pcm_runtime *rtd = substream->private_data;
129+
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
130130
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
131131
int ret;
132132

sound/soc/intel/boards/bytcr_rt5640.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ static struct snd_soc_jack_pin rt5640_pins[] = {
380380
static int byt_rt5640_aif1_hw_params(struct snd_pcm_substream *substream,
381381
struct snd_pcm_hw_params *params)
382382
{
383-
struct snd_soc_pcm_runtime *rtd = substream->private_data;
383+
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
384384
struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0);
385385

386386
return byt_rt5640_prepare_and_enable_pll1(dai, params_rate(params));

sound/soc/intel/boards/bytcr_rt5651.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ static struct snd_soc_jack_pin bytcr_jack_pins[] = {
347347
static int byt_rt5651_aif1_hw_params(struct snd_pcm_substream *substream,
348348
struct snd_pcm_hw_params *params)
349349
{
350-
struct snd_soc_pcm_runtime *rtd = substream->private_data;
350+
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
351351
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
352352
snd_pcm_format_t format = params_format(params);
353353
int rate = params_rate(params);

0 commit comments

Comments
 (0)