struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct audioresample *p_resample = snd_kcontrol_chip(kcontrol);
+ struct audioresample *p_resample = snd_kcontrol_chip(kcontrol);
+
+ if (!p_resample) {
+ pr_info("audio resample is not init\n");
+ return -EINVAL;
+ }
ucontrol->value.enumerated.item[0] = p_resample->asr_idx;
{
int resample_rate = resample_idx2rate(index);
+ if (!s_resample) {
+ pr_info("audio resample is not init\n");
+ return -EINVAL;
+ }
+
if (index == s_resample->asr_idx)
return 0;
struct audioresample *p_resample = snd_kcontrol_chip(kcontrol);
if (!p_resample) {
- pr_err("audio resample is not init\n");
+ pr_info("audio resample is not init\n");
return -EINVAL;
}
struct audioresample *p_resample = snd_kcontrol_chip(kcontrol);
if (!p_resample) {
- pr_err("audio resample is not init\n");
+ pr_info("audio resample is not init\n");
return -EINVAL;
}