diff --git a/sound/soc/amlogic/auge/extn.c b/sound/soc/amlogic/auge/extn.c index 277761265e07..78ec04f952bd 100644 --- a/sound/soc/amlogic/auge/extn.c +++ b/sound/soc/amlogic/auge/extn.c @@ -372,7 +372,9 @@ static int extn_dai_startup( struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai) { - resample_set_inner_rate(RESAMPLE_A); + if (get_audioresample(RESAMPLE_A)) + resample_set_inner_rate(RESAMPLE_A); + return 0; } diff --git a/sound/soc/amlogic/auge/resample.c b/sound/soc/amlogic/auge/resample.c index aa096072e838..8678361c51c5 100644 --- a/sound/soc/amlogic/auge/resample.c +++ b/sound/soc/amlogic/auge/resample.c @@ -75,7 +75,7 @@ struct audioresample *s_resample_a; struct audioresample *s_resample_b; -static struct audioresample *get_audioresample(enum resample_idx id) +struct audioresample *get_audioresample(enum resample_idx id) { struct audioresample *p_resample; diff --git a/sound/soc/amlogic/auge/resample.h b/sound/soc/amlogic/auge/resample.h index 1c18d11066d2..b82aac34fc82 100644 --- a/sound/soc/amlogic/auge/resample.h +++ b/sound/soc/amlogic/auge/resample.h @@ -29,4 +29,6 @@ int set_resample_source(enum resample_idx id, enum toddr_src src); int resample_set_inner_rate(enum resample_idx id); +struct audioresample *get_audioresample(enum resample_idx id); + #endif