mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 13:44:15 +08:00
ASoC: sh: rsnd: remove snd_pcm_ops
snd_pcm_ops is no longer needed. Let's use component driver callback. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/871rvvaf02.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
1c91d77e17
commit
9dcefa7232
@ -1373,8 +1373,9 @@ static int rsnd_dai_probe(struct rsnd_priv *priv)
|
||||
/*
|
||||
* pcm ops
|
||||
*/
|
||||
static int rsnd_hw_params(struct snd_pcm_substream *substream,
|
||||
struct snd_pcm_hw_params *hw_params)
|
||||
static int rsnd_hw_params(struct snd_soc_component *component,
|
||||
struct snd_pcm_substream *substream,
|
||||
struct snd_pcm_hw_params *hw_params)
|
||||
{
|
||||
struct snd_soc_dai *dai = rsnd_substream_to_dai(substream);
|
||||
struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai);
|
||||
@ -1421,7 +1422,8 @@ static int rsnd_hw_params(struct snd_pcm_substream *substream,
|
||||
params_buffer_bytes(hw_params));
|
||||
}
|
||||
|
||||
static int rsnd_hw_free(struct snd_pcm_substream *substream)
|
||||
static int rsnd_hw_free(struct snd_soc_component *component,
|
||||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_dai *dai = rsnd_substream_to_dai(substream);
|
||||
struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai);
|
||||
@ -1435,7 +1437,8 @@ static int rsnd_hw_free(struct snd_pcm_substream *substream)
|
||||
return snd_pcm_lib_free_pages(substream);
|
||||
}
|
||||
|
||||
static snd_pcm_uframes_t rsnd_pointer(struct snd_pcm_substream *substream)
|
||||
static snd_pcm_uframes_t rsnd_pointer(struct snd_soc_component *component,
|
||||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_dai *dai = rsnd_substream_to_dai(substream);
|
||||
struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai);
|
||||
@ -1447,13 +1450,6 @@ static snd_pcm_uframes_t rsnd_pointer(struct snd_pcm_substream *substream)
|
||||
return pointer;
|
||||
}
|
||||
|
||||
static const struct snd_pcm_ops rsnd_pcm_ops = {
|
||||
.ioctl = snd_pcm_lib_ioctl,
|
||||
.hw_params = rsnd_hw_params,
|
||||
.hw_free = rsnd_hw_free,
|
||||
.pointer = rsnd_pointer,
|
||||
};
|
||||
|
||||
/*
|
||||
* snd_kcontrol
|
||||
*/
|
||||
@ -1647,8 +1643,11 @@ int rsnd_kctrl_new(struct rsnd_mod *mod,
|
||||
* snd_soc_component
|
||||
*/
|
||||
static const struct snd_soc_component_driver rsnd_soc_component = {
|
||||
.ops = &rsnd_pcm_ops,
|
||||
.name = "rsnd",
|
||||
.ioctl = snd_soc_pcm_lib_ioctl,
|
||||
.hw_params = rsnd_hw_params,
|
||||
.hw_free = rsnd_hw_free,
|
||||
.pointer = rsnd_pointer,
|
||||
};
|
||||
|
||||
static int rsnd_rdai_continuance_probe(struct rsnd_priv *priv,
|
||||
|
Loading…
Reference in New Issue
Block a user