lkml.org 
[lkml]   [2021]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 4/7] ASoC: codecs: wcd938x: add basic controls
From
Date

> +static int wcd938x_ear_pa_put_gain(struct snd_kcontrol *kcontrol,
> + struct snd_ctl_elem_value *ucontrol)
> +{
> + struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
> + struct wcd938x_sdw_priv *wcd = snd_soc_component_get_drvdata(component);
> + struct wcd938x_priv *wcd938x = wcd->wcd938x;
> +
> + if (wcd938x->comp1_enable) {
> + dev_err(component->dev, "Can not set EAR PA Gain, compander1 is enabled\n");
> + return -EINVAL;
> + }
> +
> + snd_soc_component_write_field(component, WCD938X_ANA_EAR_COMPANDER_CTL,
> + WCD938X_EAR_GAIN_MASK,
> + ucontrol->value.integer.value[0]);
> +
> + return 0;

that goes back to my other comments, the earpiece is connected to the RX
interface, so what component would be used to set the gain here? the TX
one? But what tells you this component is active and ready to support
commands?

\
 
 \ /
  Last update: 2021-03-19 18:00    [W:0.117 / U:1.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site