Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 036d22ed authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: Get the component handle for cpe and tasha"

parents 0879ae52 479baecc
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -13288,9 +13288,11 @@ static int tasha_handle_pdata(struct tasha_priv *tasha,
static struct wcd_cpe_core *tasha_codec_get_cpe_core(
		struct snd_soc_component *component)
{
	struct tasha_priv *priv = snd_soc_component_get_drvdata(component);

	struct tasha_priv *priv = NULL;
	priv = dev_get_drvdata(component->dev);
	if (priv)
		return priv->cpe_core;
	return NULL;
}

static int tasha_codec_cpe_fll_update_divider(
+1 −1
Original line number Diff line number Diff line
@@ -639,7 +639,7 @@ void *wcd_cpe_get_core_handle(
		goto done;
	}

	core = wcd_get_cpe_core(component);
	core = wcd_get_cpe_core(core_d->component);

	if (!core)
		dev_err(component->dev,
+1 −1
Original line number Diff line number Diff line
@@ -319,7 +319,7 @@ static int cpe_register_write_repeat(u32 reg, u8 *ptr, u32 to_write)
{
	struct snd_soc_component *component = cpe_d.cdc_priv;
	struct  wcd9xxx *wcd9xxx =
			snd_soc_component_get_drvdata(component);
			dev_get_drvdata(component->dev->parent);
	int ret = 0;

	ret = wcd9xxx_slim_write_repeat(wcd9xxx, reg, to_write, ptr);
+7 −1
Original line number Diff line number Diff line
@@ -187,6 +187,7 @@ static struct cpe_priv *cpe_get_private_data(
	struct snd_pcm_substream *substream)
{
	struct snd_soc_pcm_runtime *rtd;
	struct snd_soc_component *component = NULL;

	if (!substream || !substream->private_data) {
		pr_err("%s: %s is invalid\n",
@@ -204,7 +205,12 @@ static struct cpe_priv *cpe_get_private_data(
		goto err_ret;
	}

	return snd_soc_card_get_drvdata(rtd->card);
	component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
	if (!component) {
		pr_err("%s: invalid component\n", __func__);
		goto err_ret;
	}
        return snd_soc_component_get_drvdata(component);

err_ret:
	return NULL;