alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: ojab // <ojab@ojab.ru>, Mark Brown <broonie@kernel.org>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>,
	Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Subject: Re: [alsa-devel] No sound since 5.4 on skl_n88l25_s4567
Date: Tue, 18 Feb 2020 10:24:50 -0600	[thread overview]
Message-ID: <394de883-f044-44cb-9b09-a4fbe2e14b75@linux.intel.com> (raw)
In-Reply-To: <CAKzrAgQapgQtxMLYjEe9mSaXp_uYxMyH8fwvoJqM3Or0sqqfiw@mail.gmail.com>



On 2/17/20 9:10 AM, ojab // wrote:
> On Thu, Jan 16, 2020 at 5:57 PM Mark Brown <broonie@kernel.org> wrote:
>>
>> On Wed, Jan 15, 2020 at 07:04:48PM -0600, Pierre-Louis Bossart wrote:
>>
>>> Maybe we could have some sort of boolean flag in the component->driver
>>> definition and explicitly request a backwards-compatible behavior (e.g. for
>>> all SKL/KBL machine drivers) when that driver is known to be flaky. There's
>>> already things like 'fully_routed', maybe we can add something such as
>>> 'disable_route_check'?
>>
>> A quirk for old stuff that can't be fixed sounds like a sensible
>> solution to this.
> 
> Any update on this?

Sorry, this is what I had in mind (not even compile-tested). I don't 
know if the checks need to be disabled twice.

diff --git a/include/sound/soc.h b/include/sound/soc.h
index f0e4f36f83bf..7a4643d87e39 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1058,6 +1058,7 @@ struct snd_soc_card {
         const struct snd_soc_dapm_route *of_dapm_routes;
         int num_of_dapm_routes;
         bool fully_routed;
+       bool disable_route_checks;

         /* lists of probed devices belonging to this card */
         struct list_head component_dev_list;
diff --git a/sound/soc/intel/boards/skl_nau88l25_max98357a.c 
b/sound/soc/intel/boards/skl_nau88l25_max98357a.c
index e6de3b28d840..b57f55731390 100644
--- a/sound/soc/intel/boards/skl_nau88l25_max98357a.c
+++ b/sound/soc/intel/boards/skl_nau88l25_max98357a.c
@@ -644,6 +644,7 @@ static struct snd_soc_card skylake_audio_card = {
         .num_dapm_routes = ARRAY_SIZE(skylake_map),
         .fully_routed = true,
         .late_probe = skylake_card_late_probe,
+       .disable_route_checks = true,
  };

  static int skylake_audio_probe(struct platform_device *pdev)
diff --git a/sound/soc/intel/boards/skl_nau88l25_ssm4567.c 
b/sound/soc/intel/boards/skl_nau88l25_ssm4567.c
index c99c8b23e509..8f3b724fec27 100644
--- a/sound/soc/intel/boards/skl_nau88l25_ssm4567.c
+++ b/sound/soc/intel/boards/skl_nau88l25_ssm4567.c
@@ -687,6 +687,7 @@ static struct snd_soc_card skylake_audio_card = {
         .num_configs = ARRAY_SIZE(ssm4567_codec_conf),
         .fully_routed = true,
         .late_probe = skylake_card_late_probe,
+       .disable_route_checks = true,
  };

  static int skylake_audio_probe(struct platform_device *pdev)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 068d809c349a..d56cb655d89c 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1257,7 +1257,10 @@ static int soc_probe_component(struct 
snd_soc_card *card,
                                       component->driver->dapm_routes,
                                       component->driver->num_dapm_routes);
         if (ret < 0)
-               goto err_probe;
+               if (card->disable_route_checks)
+                       dev_info(component->dev, "Ignoring errors on 
snd_soc_dapm_add_routes\n");
+               else
+                       goto err_probe;

         /* see for_each_card_components */
         list_add(&component->card_list, &card->component_dev_list);
@@ -1939,7 +1942,10 @@ static int snd_soc_bind_card(struct snd_soc_card 
*card)
         ret = snd_soc_dapm_add_routes(&card->dapm, card->dapm_routes,
                                       card->num_dapm_routes);
         if (ret < 0)
-               goto probe_end;
+               if (card->disable_route_checks)
+                       dev_info(component->dev, "Ignoring errors on 
snd_soc_dapm_add_routes\n");
+               else
+                       goto probe_end;

         ret = snd_soc_dapm_add_routes(&card->dapm, card->of_dapm_routes,
                                       card->num_of_dapm_routes);

  reply	other threads:[~2020-02-18 17:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAKzrAgTD2oeyajKGOaPea98vZ-uKJOn6uOqABA+CKtpvYpWYvQ@mail.gmail.com>
     [not found] ` <CAKzrAgTCE4btXr04pkvLUG6PPbtn9dm5h_9rjqDYG0HrTZ0zbg@mail.gmail.com>
2020-01-15  0:23   ` [alsa-devel] No sound since 5.4 on skl_n88l25_s4567 Kuninori Morimoto
2020-01-15  1:41     ` Pierre-Louis Bossart
2020-01-15 11:57       ` ojab //
2020-01-15 15:07         ` Pierre-Louis Bossart
2020-01-15 17:54           ` ojab //
2020-01-15 19:38             ` Pierre-Louis Bossart
2020-01-16  0:32               ` Kuninori Morimoto
2020-01-16  1:04                 ` Pierre-Louis Bossart
2020-01-16  1:42                   ` Kuninori Morimoto
2020-01-16 14:57                   ` Mark Brown
2020-02-17 15:10                     ` ojab //
2020-02-18 16:24                       ` Pierre-Louis Bossart [this message]
2020-02-20 17:19                         ` ojab //
2020-01-15 11:59     ` ojab //

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=394de883-f044-44cb-9b09-a4fbe2e14b75@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=ojab@ojab.ru \
    --cc=ranjani.sridharan@linux.intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).