rate = 192000;
if (lowpass > 14)
- glb_ptr->set_lowpass = lowpass = 3;
+ glb_ptr->set_lowpass = lowpass = 0;
if (mode > 3)
glb_ptr->set_mode = mode = 0;
glb_ptr->set_mode = 0;
} else {
glb_ptr->dual_mode = 0;
+ return 0;
}
}
return ret;
}
+ if (digital_gain_0db_limit) {
+ ret = snd_soc_limit_volume(card, "Subwoofer Playback Volume",
+ 207);
+ if (ret < 0)
+ dev_warn(card->dev, "Failed to set volume limit: %d\n",
+ ret);
+ }
+
ret = snd_soc_write(rtd->codec_dais[1]->codec,
PCM512x_DIGITAL_VOLUME_3, (~right_val));
if (ret < 0)
rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name);
+ if (digital_gain_0db_limit) {
+ ret = snd_soc_limit_volume(card, "Master Playback Volume",
+ 207);
+ if (ret < 0)
+ dev_warn(card->dev, "Failed to set volume limit: %d\n",
+ ret);
+ }
+
if (glb_ptr->dual_mode != 1) {
ret = snd_soc_write(rtd->codec_dais[1]->codec,
PCM512x_DIGITAL_VOLUME_2, (~left_val));
memset(glb_ptr, 0x00, sizeof(glb_ptr));
card->drvdata = glb_ptr;
+ glb_ptr->dual_mode = 2;
+ glb_ptr->set_mode = 0;
mutex_init(&glb_ptr->lock);
}
}
- if (digital_gain_0db_limit) {
- ret = snd_soc_limit_volume(card,
- "Subwoofer Playback Volume", 207);
- if (ret < 0)
- dev_warn(card->dev, "Failed to set volume limit: %d\n",
- ret);
- ret = snd_soc_limit_volume(card, "Master Playback Volume", 207);
- if (ret < 0)
- dev_warn(card->dev, "Failed to set volume limit: %d\n",
- ret);
- }
-
ret = snd_allo_piano_dsp_program(rtd, glb_ptr->set_mode, rate,
glb_ptr->set_lowpass);
if (ret < 0)