Skip to content

Commit

Permalink
ASoC: intel: rename soundwire machine driver soc ops
Browse files Browse the repository at this point in the history
Rename Soundwire generic machine driver soc ops with tag "asoc".

Link: thesofproject#5068
Signed-off-by: Vijendar Mukunda <[email protected]>
Reviewed-by: Bard Liao <[email protected]>
Reviewed-by: Pierre-Louis Bossart <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
vijendarmukunda authored and broonie committed Aug 1, 2024
1 parent 408a454 commit 96990cf
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
26 changes: 13 additions & 13 deletions sound/soc/intel/boards/sof_sdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,12 +594,12 @@ static const struct snd_kcontrol_new rt700_controls[] = {
};

/* these wrappers are only needed to avoid typecast compilation errors */
int sdw_startup(struct snd_pcm_substream *substream)
int asoc_sdw_startup(struct snd_pcm_substream *substream)
{
return sdw_startup_stream(substream);
}

int sdw_prepare(struct snd_pcm_substream *substream)
int asoc_sdw_prepare(struct snd_pcm_substream *substream)
{
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
struct sdw_stream_runtime *sdw_stream;
Expand All @@ -617,7 +617,7 @@ int sdw_prepare(struct snd_pcm_substream *substream)
return sdw_prepare_stream(sdw_stream);
}

int sdw_trigger(struct snd_pcm_substream *substream, int cmd)
int asoc_sdw_trigger(struct snd_pcm_substream *substream, int cmd)
{
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
struct sdw_stream_runtime *sdw_stream;
Expand Down Expand Up @@ -656,8 +656,8 @@ int sdw_trigger(struct snd_pcm_substream *substream, int cmd)
return ret;
}

int sdw_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
int asoc_sdw_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
struct snd_soc_dai_link_ch_map *ch_maps;
Expand Down Expand Up @@ -699,7 +699,7 @@ int sdw_hw_params(struct snd_pcm_substream *substream,
return 0;
}

int sdw_hw_free(struct snd_pcm_substream *substream)
int asoc_sdw_hw_free(struct snd_pcm_substream *substream)
{
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
struct sdw_stream_runtime *sdw_stream;
Expand All @@ -717,18 +717,18 @@ int sdw_hw_free(struct snd_pcm_substream *substream)
return sdw_deprepare_stream(sdw_stream);
}

void sdw_shutdown(struct snd_pcm_substream *substream)
void asoc_sdw_shutdown(struct snd_pcm_substream *substream)
{
sdw_shutdown_stream(substream);
}

static const struct snd_soc_ops sdw_ops = {
.startup = sdw_startup,
.prepare = sdw_prepare,
.trigger = sdw_trigger,
.hw_params = sdw_hw_params,
.hw_free = sdw_hw_free,
.shutdown = sdw_shutdown,
.startup = asoc_sdw_startup,
.prepare = asoc_sdw_prepare,
.trigger = asoc_sdw_trigger,
.hw_params = asoc_sdw_hw_params,
.hw_free = asoc_sdw_hw_free,
.shutdown = asoc_sdw_shutdown,
};

static struct asoc_sdw_codec_info codec_info_list[] = {
Expand Down
14 changes: 7 additions & 7 deletions sound/soc/intel/boards/sof_sdw_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,13 @@ struct mc_private {

extern unsigned long sof_sdw_quirk;

int sdw_startup(struct snd_pcm_substream *substream);
int sdw_prepare(struct snd_pcm_substream *substream);
int sdw_trigger(struct snd_pcm_substream *substream, int cmd);
int sdw_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params);
int sdw_hw_free(struct snd_pcm_substream *substream);
void sdw_shutdown(struct snd_pcm_substream *substream);
int asoc_sdw_startup(struct snd_pcm_substream *substream);
int asoc_sdw_prepare(struct snd_pcm_substream *substream);
int asoc_sdw_trigger(struct snd_pcm_substream *substream, int cmd);
int asoc_sdw_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params);
int asoc_sdw_hw_free(struct snd_pcm_substream *substream);
void asoc_sdw_shutdown(struct snd_pcm_substream *substream);

/* generic HDMI support */
int sof_sdw_hdmi_init(struct snd_soc_pcm_runtime *rtd);
Expand Down
12 changes: 6 additions & 6 deletions sound/soc/intel/boards/sof_sdw_maxim.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static int mx8373_sdw_prepare(struct snd_pcm_substream *substream)
int ret;

/* according to soc_pcm_prepare dai link prepare is called first */
ret = sdw_prepare(substream);
ret = asoc_sdw_prepare(substream);
if (ret < 0)
return ret;

Expand All @@ -92,20 +92,20 @@ static int mx8373_sdw_hw_free(struct snd_pcm_substream *substream)
int ret;

/* according to soc_pcm_hw_free dai link free is called first */
ret = sdw_hw_free(substream);
ret = asoc_sdw_hw_free(substream);
if (ret < 0)
return ret;

return mx8373_enable_spk_pin(substream, false);
}

static const struct snd_soc_ops max_98373_sdw_ops = {
.startup = sdw_startup,
.startup = asoc_sdw_startup,
.prepare = mx8373_sdw_prepare,
.trigger = sdw_trigger,
.hw_params = sdw_hw_params,
.trigger = asoc_sdw_trigger,
.hw_params = asoc_sdw_hw_params,
.hw_free = mx8373_sdw_hw_free,
.shutdown = sdw_shutdown,
.shutdown = asoc_sdw_shutdown,
};

static int mx8373_sdw_late_probe(struct snd_soc_card *card)
Expand Down

0 comments on commit 96990cf

Please sign in to comment.