Skip to content

Commit 2207b93

Browse files
morimotobroonie
authored andcommitted
ASoC: intel/boards: use asoc_substream_to_rtd()
Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 3aecfc7 commit 2207b93

29 files changed

+40
-40
lines changed

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);

sound/soc/intel/boards/cht_bsw_max98090_ti.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static const struct snd_kcontrol_new cht_mc_controls[] = {
112112
static int cht_aif1_hw_params(struct snd_pcm_substream *substream,
113113
struct snd_pcm_hw_params *params)
114114
{
115-
struct snd_soc_pcm_runtime *rtd = substream->private_data;
115+
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
116116
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
117117
int ret;
118118

sound/soc/intel/boards/cht_bsw_nau8824.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 cht_mc_controls[] = {
7272
static int cht_aif1_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

0 commit comments

Comments
 (0)