mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
audio: fixed kernel panic when resample is disabled [1/1]
PD#SWPL-7039 Problem: Kernel Panic when resample A is disabled Solution: When resample is disabled,don't init resample Verify: Verified on T962e2_ab311 Change-Id: Id9552ffc6be40f133b828dbded4ad3f15d177ab0 Signed-off-by: Zhe Wang <Zhe.Wang@amlogic.com>
This commit is contained in:
@@ -372,7 +372,9 @@ static int extn_dai_startup(
|
|||||||
struct snd_pcm_substream *substream,
|
struct snd_pcm_substream *substream,
|
||||||
struct snd_soc_dai *cpu_dai)
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ struct audioresample *s_resample_a;
|
|||||||
|
|
||||||
struct audioresample *s_resample_b;
|
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;
|
struct audioresample *p_resample;
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
int resample_set_inner_rate(enum resample_idx id);
|
||||||
|
|
||||||
|
struct audioresample *get_audioresample(enum resample_idx id);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user