Skip to content

Commit 4fe20d6

Browse files
CoveyZhangtiwai
authored andcommitted
ALSA: hda: remove redundant variable in snd_hdac_stream_start()
This 2nd variables are all set as true in treewide. So I think it can be removed for easy understanding. Signed-off-by: Zhang Yiqun <[email protected]> Acked-by: Mark Brown <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 86bdfa2 commit 4fe20d6

File tree

6 files changed

+8
-11
lines changed

6 files changed

+8
-11
lines changed

include/sound/hdaudio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ void snd_hdac_stream_cleanup(struct hdac_stream *azx_dev);
575575
int snd_hdac_stream_setup_periods(struct hdac_stream *azx_dev);
576576
int snd_hdac_stream_set_params(struct hdac_stream *azx_dev,
577577
unsigned int format_val);
578-
void snd_hdac_stream_start(struct hdac_stream *azx_dev, bool fresh_start);
578+
void snd_hdac_stream_start(struct hdac_stream *azx_dev);
579579
void snd_hdac_stream_stop(struct hdac_stream *azx_dev);
580580
void snd_hdac_stop_streams(struct hdac_bus *bus);
581581
void snd_hdac_stop_streams_and_chip(struct hdac_bus *bus);

sound/hda/hdac_stream.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,20 +124,17 @@ EXPORT_SYMBOL_GPL(snd_hdac_stream_init);
124124
/**
125125
* snd_hdac_stream_start - start a stream
126126
* @azx_dev: HD-audio core stream to start
127-
* @fresh_start: false = wallclock timestamp relative to period wallclock
128127
*
129128
* Start a stream, set start_wallclk and set the running flag.
130129
*/
131-
void snd_hdac_stream_start(struct hdac_stream *azx_dev, bool fresh_start)
130+
void snd_hdac_stream_start(struct hdac_stream *azx_dev)
132131
{
133132
struct hdac_bus *bus = azx_dev->bus;
134133
int stripe_ctl;
135134

136135
trace_snd_hdac_stream_start(bus, azx_dev);
137136

138137
azx_dev->start_wallclk = snd_hdac_chip_readl(bus, WALLCLK);
139-
if (!fresh_start)
140-
azx_dev->start_wallclk -= azx_dev->period_wallclk;
141138

142139
/* enable SIE */
143140
snd_hdac_chip_updatel(bus, INTCTL,
@@ -966,7 +963,7 @@ EXPORT_SYMBOL_GPL(snd_hdac_dsp_prepare);
966963
void snd_hdac_dsp_trigger(struct hdac_stream *azx_dev, bool start)
967964
{
968965
if (start)
969-
snd_hdac_stream_start(azx_dev, true);
966+
snd_hdac_stream_start(azx_dev);
970967
else
971968
snd_hdac_stream_stop(azx_dev);
972969
}

sound/pci/hda/hda_controller.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ static int azx_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
257257
azx_dev = get_azx_dev(s);
258258
if (start) {
259259
azx_dev->insufficient = 1;
260-
snd_hdac_stream_start(azx_stream(azx_dev), true);
260+
snd_hdac_stream_start(azx_stream(azx_dev));
261261
} else {
262262
snd_hdac_stream_stop(azx_stream(azx_dev));
263263
}

sound/soc/intel/avs/pcm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ static int avs_dai_fe_trigger(struct snd_pcm_substream *substream, int cmd, stru
647647
case SNDRV_PCM_TRIGGER_START:
648648
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
649649
spin_lock_irqsave(&bus->reg_lock, flags);
650-
snd_hdac_stream_start(hdac_stream(host_stream), true);
650+
snd_hdac_stream_start(hdac_stream(host_stream));
651651
spin_unlock_irqrestore(&bus->reg_lock, flags);
652652

653653
/* Timeout on DRSM poll shall not stop the resume so ignore the result. */

sound/soc/intel/avs/probes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ static int avs_probe_compr_trigger(struct snd_compr_stream *cstream, int cmd,
190190
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
191191
case SNDRV_PCM_TRIGGER_RESUME:
192192
spin_lock_irqsave(&bus->reg_lock, cookie);
193-
snd_hdac_stream_start(hdac_stream(host_stream), true);
193+
snd_hdac_stream_start(hdac_stream(host_stream));
194194
spin_unlock_irqrestore(&bus->reg_lock, cookie);
195195
break;
196196

sound/soc/intel/skylake/skl-pcm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ static int skl_decoupled_trigger(struct snd_pcm_substream *substream,
449449
spin_lock_irqsave(&bus->reg_lock, cookie);
450450

451451
if (start) {
452-
snd_hdac_stream_start(hdac_stream(stream), true);
452+
snd_hdac_stream_start(hdac_stream(stream));
453453
snd_hdac_stream_timecounter_init(hstr, 0);
454454
} else {
455455
snd_hdac_stream_stop(hdac_stream(stream));
@@ -1134,7 +1134,7 @@ static int skl_coupled_trigger(struct snd_pcm_substream *substream,
11341134
continue;
11351135
stream = get_hdac_ext_stream(s);
11361136
if (start)
1137-
snd_hdac_stream_start(hdac_stream(stream), true);
1137+
snd_hdac_stream_start(hdac_stream(stream));
11381138
else
11391139
snd_hdac_stream_stop(hdac_stream(stream));
11401140
}

0 commit comments

Comments
 (0)