Skip to content

Commit

Permalink
ALSA: hda: remove redundant variable in snd_hdac_stream_start()
Browse files Browse the repository at this point in the history
commit 4fe20d62842eaa858267df1535f3e2bd39275c4a upstream

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]>
  • Loading branch information
CoveyZhang authored and crojewsk-intel committed Apr 24, 2024
1 parent e6d26d6 commit 70ecc9c
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion include/sound/hdaudio.h
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ void snd_hdac_stream_cleanup(struct hdac_stream *azx_dev);
int snd_hdac_stream_setup_periods(struct hdac_stream *azx_dev);
int snd_hdac_stream_set_params(struct hdac_stream *azx_dev,
unsigned int format_val);
void snd_hdac_stream_start(struct hdac_stream *azx_dev, bool fresh_start);
void snd_hdac_stream_start(struct hdac_stream *azx_dev);
void snd_hdac_stream_stop(struct hdac_stream *azx_dev);
void snd_hdac_stop_streams(struct hdac_bus *bus);
void snd_hdac_stop_streams_and_chip(struct hdac_bus *bus);
Expand Down
7 changes: 2 additions & 5 deletions sound/hda/hdac_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,20 +124,17 @@ EXPORT_SYMBOL_GPL(snd_hdac_stream_init);
/**
* snd_hdac_stream_start - start a stream
* @azx_dev: HD-audio core stream to start
* @fresh_start: false = wallclock timestamp relative to period wallclock
*
* Start a stream, set start_wallclk and set the running flag.
*/
void snd_hdac_stream_start(struct hdac_stream *azx_dev, bool fresh_start)
void snd_hdac_stream_start(struct hdac_stream *azx_dev)
{
struct hdac_bus *bus = azx_dev->bus;
int stripe_ctl;

trace_snd_hdac_stream_start(bus, azx_dev);

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

/* enable SIE */
snd_hdac_chip_updatel(bus, INTCTL,
Expand Down Expand Up @@ -970,7 +967,7 @@ EXPORT_SYMBOL_GPL(snd_hdac_dsp_prepare);
void snd_hdac_dsp_trigger(struct hdac_stream *azx_dev, bool start)
{
if (start)
snd_hdac_stream_start(azx_dev, true);
snd_hdac_stream_start(azx_dev);
else
snd_hdac_stream_stop(azx_dev);
}
Expand Down
2 changes: 1 addition & 1 deletion sound/pci/hda/hda_controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ static int azx_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
azx_dev = get_azx_dev(s);
if (start) {
azx_dev->insufficient = 1;
snd_hdac_stream_start(azx_stream(azx_dev), true);
snd_hdac_stream_start(azx_stream(azx_dev));
} else {
snd_hdac_stream_stop(azx_stream(azx_dev));
}
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/avs/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ static int avs_dai_fe_trigger(struct snd_pcm_substream *substream, int cmd, stru
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
spin_lock_irqsave(&bus->reg_lock, flags);
snd_hdac_stream_start(hdac_stream(host_stream), true);
snd_hdac_stream_start(hdac_stream(host_stream));
spin_unlock_irqrestore(&bus->reg_lock, flags);

/* Timeout on DRSM poll shall not stop the resume so ignore the result. */
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/avs/probes.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ static int avs_probe_compr_trigger(struct snd_compr_stream *cstream, int cmd,
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
case SNDRV_PCM_TRIGGER_RESUME:
spin_lock_irqsave(&bus->reg_lock, cookie);
snd_hdac_stream_start(hdac_stream(host_stream), true);
snd_hdac_stream_start(hdac_stream(host_stream));
spin_unlock_irqrestore(&bus->reg_lock, cookie);
break;

Expand Down
4 changes: 2 additions & 2 deletions sound/soc/intel/skylake/skl-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ static int skl_decoupled_trigger(struct snd_pcm_substream *substream,
spin_lock_irqsave(&bus->reg_lock, cookie);

if (start) {
snd_hdac_stream_start(hdac_stream(stream), true);
snd_hdac_stream_start(hdac_stream(stream));
snd_hdac_stream_timecounter_init(hstr, 0);
} else {
snd_hdac_stream_stop(hdac_stream(stream));
Expand Down Expand Up @@ -1130,7 +1130,7 @@ static int skl_coupled_trigger(struct snd_pcm_substream *substream,
continue;
stream = get_hdac_ext_stream(s);
if (start)
snd_hdac_stream_start(hdac_stream(stream), true);
snd_hdac_stream_start(hdac_stream(stream));
else
snd_hdac_stream_stop(hdac_stream(stream));
}
Expand Down

0 comments on commit 70ecc9c

Please sign in to comment.