Re: [PATCH v2] ASoC: Intel: boards: kbl_da7219_max98927: add dai_trigger function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/4/19 11:42 PM, Chiang, Mac wrote:
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.

I'm missing one line change as below. So there is only one return in kabylake_card_late_probe() as prior one. I've tested and verified it on Chrome tree.

In case I wasn't clear, your patch needs to be fixed and tested against Mark's tree. It cannot possibly work as is.

    	error = hdac_hdmi_jack_port_init(component, &card->dapm);

- 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);


_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel


_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux