mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
ASoC: rockchip: vad: remove rtd->num_codecs
Fixes: 3989ade2d1 ("ASoC: soc.h: remove num_cpus/codecs")
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I41ccfff7fdcd811c509e7a83bd3f18093e8a2fc9
This commit is contained in:
@@ -249,15 +249,14 @@ static int rockchip_vad_setup(struct rockchip_vad *vad)
|
||||
static struct rockchip_vad *substream_get_drvdata(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_dai *codec_dai;
|
||||
struct rockchip_vad *vad = NULL;
|
||||
unsigned int i;
|
||||
|
||||
if (!rtd)
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i < rtd->num_codecs; i++) {
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, i);
|
||||
|
||||
for_each_rtd_codec_dais(rtd, i, codec_dai) {
|
||||
if (strstr(codec_dai->name, "vad"))
|
||||
vad = snd_soc_component_get_drvdata(codec_dai->component);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user