All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: mac.chiang@intel.com, alsa-devel@alsa-project.org
Cc: harshapriya.n@intel.com, tiwai@suse.de, broonie@kernel.org,
	jenny.tc@intel.com
Subject: Re: [PATCH v2] ASoC: Intel: boards: kbl_da7219_max98927: add dai_trigger function
Date: Mon, 4 Mar 2019 22:03:35 -0600	[thread overview]
Message-ID: <f4e39672-3d66-bf3b-faca-b89053e52c78@linux.intel.com> (raw)
In-Reply-To: <1551752535-27367-1-git-send-email-mac.chiang@intel.com>


>   
>   static int kabylake_ssp_fixup(struct snd_soc_pcm_runtime *rtd,
> @@ -864,6 +914,7 @@ static int kabylake_card_late_probe(struct snd_soc_card *card)
>   {
>   	struct kbl_codec_private *ctx = snd_soc_card_get_drvdata(card);
>   	struct kbl_hdmi_pcm *pcm;
> +	struct snd_soc_dapm_context *dapm = &card->dapm;
>   	struct snd_soc_component *component = NULL;
>   	int err, i = 0;
>   	char jack_name[NAME_SIZE];
> @@ -890,9 +941,25 @@ static int kabylake_card_late_probe(struct snd_soc_card *card)
>   	if (!component)
>   		return -EINVAL;
>   
> +
>   	return hdac_hdmi_jack_port_init(component, &card->dapm);

That part looks quite broken. You have functional code after the 
unconditional return above for the jack init.

This is not a diff illusion, I applied this patch and looked at the diff 
with emacs and I don't know how this could possibly work.

The code prior to this patch was also weird with 2 returns at the end of 
kabylake_card_late_probe()

My take is that this has never been tested against Mark's branch but 
ported without tests from the Chrome tree.

>   
> -	return 0;
> +	if (err < 0)
> +		return err;
> +
> +	err = snd_soc_dapm_disable_pin(dapm, "Left Spk");
> +	if (err) {
> +		dev_err(card->dev, "failed to disable Left Spk: %d\n", err);
> +		return err;
> +	}
> +
> +	err = snd_soc_dapm_disable_pin(dapm, "Right Spk");
> +	if (err) {
> +		dev_err(card->dev, "failed to disable Right Spk: %d\n", err);
> +		return err;
> +	}
> +
> +	return snd_soc_dapm_sync(dapm);

  reply	other threads:[~2019-03-05  4:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-01 17:14 [PATCH] ASoC: Intel: boards: kbl_da7219_max98927: add dai_trigger function mac.chiang
2019-03-01 18:06 ` Pierre-Louis Bossart
2019-03-04  2:33   ` Chiang, Mac
2019-03-05  2:22 ` [PATCH v2] " mac.chiang
2019-03-05  4:03   ` Pierre-Louis Bossart [this message]
2019-03-05  5:42     ` Chiang, Mac
2019-03-05 15:07       ` Pierre-Louis Bossart
2019-03-08  5:16   ` [PATCH v3] " mac.chiang
2019-03-08 15:31     ` Pierre-Louis Bossart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f4e39672-3d66-bf3b-faca-b89053e52c78@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=harshapriya.n@intel.com \
    --cc=jenny.tc@intel.com \
    --cc=mac.chiang@intel.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.