linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Takashi Iwai <tiwai@suse.de>, Ingo Molnar <mingo@kernel.org>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Mark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [GIT PULL] sound updates for 4.21
Date: Sun, 30 Dec 2018 10:21:04 +0100	[thread overview]
Message-ID: <s5hef9zl69r.wl-tiwai@suse.de> (raw)
In-Reply-To: <CAHk-=wjXVPpDWHzvNL=9gGVGNnYg1jOH8hQx=dq4caEzip-n0g@mail.gmail.com>

On Fri, 28 Dec 2018 20:04:48 +0100,
Linus Torvalds wrote:
> 
> On Fri, Dec 28, 2018 at 9:07 AM Takashi Iwai <tiwai@suse.de> wrote:
> >
> > 1) Whether ASoC driver cannot work with these Dell machines at all
> 
> I'm willing to test patches.
> 
> Right now, the reason it fails to even load is that "codec_mask" is 0x0001.
> 
> And the skl_hda_dsp_generic.c code requires
> 
>         // This will be 1 for 0x0001
>         codec_count = hweight_long(codec_mask);
> 
>         if (codec_count == 1 && codec_mask & IDISP_CODEC_MASK) {
>            .. this is ok ..
>         } else if (codec_count == 2 && codec_mask & IDISP_CODEC_MASK) {
>            .. as is this ..
>         } else {
>            .. but here we return -EINVAL;
>         }
> 
> and that basically requires that IDISP_CODEC_MASK be part of
> codec_mask. Which it isn't (IDISP_CODEC_MASK is 0x4).
> 
> Anyway, as long as the ASoC driver refuses to touch this, the default
> pretty much *has* to be the legacy PCI driver.

Thanks, the above seems to be the likely cause.

This is a good news and a bad news, actually.  The good news is that
we know the cause, and this can be detected earlier, too.  The bad
news is that the possible detection (the probe of codec mask) is done
in an async probe work in the legacy HDA driver, hence the PCI driver
probe() call cannot return -ENODEV for this.

And, it brings me a question: does the audio routing work without
iDISP at all?  The current code looks mandating the iDISP, and I
thought this is a core part of HD-audio routing on DSP.

Intel people, could you clarify this?


If iDISP is mandatory and really missing on these machines, we need
another way to identify such systems without codec mask checks.
Maybe DMI or such listing; ugly but should be still manageable since
the number of devices hitting the problem must be fairly low.

Or, an alternative is to let ASoC driver bind at first, e.g. by
changing the driver name from snd-soc-skl to snd-hda-asoc, and drop
the selective binding from snd-hda-intel, so that it'd work as
catch-all after binding with ASoC fails.

The above would work for the modules, but for built-in, we need to
rearrange the link order, too, supposedly.
(For the mixed case with built-in and module?  I don't know, maybe we
 may forgive us by the presence of module options to control the
 binding.)


BTW, one thing I'd really like to avoid is to rearrange the probe
procedure of the legacy HDA driver (so that we can get codec_mask
during pci probe() call).  The async probe is the result of the many
struggles with the various and complex configurations.   Moving the
codec probe to the beginning isn't trivial and quite risky to break
something else.


thanks,

Takashi

  reply	other threads:[~2018-12-30  9:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-20 15:38 [GIT PULL] sound updates for 4.21 Takashi Iwai
2018-12-25 23:20 ` pr-tracker-bot
2018-12-27  3:31 ` Linus Torvalds
2018-12-28 12:43   ` Ingo Molnar
2018-12-28 17:07     ` Takashi Iwai
2018-12-28 19:04       ` Linus Torvalds
2018-12-30  9:21         ` Takashi Iwai [this message]
     [not found]           ` <82bb7f60-c3c2-4715-a0a0-f1f2a8b14c74@linux.intel.com>
2018-12-31  0:19             ` Linus Torvalds
2018-12-31  0:54               ` Pierre-Louis Bossart
2018-12-31  8:11             ` Takashi Iwai
2018-12-31 10:24               ` Pierre-Louis Bossart
2018-12-31 18:15                 ` Takashi Iwai
2018-12-31 20:10                   ` Pierre-Louis Bossart
2018-12-31 21:02                     ` Hans de Goede
2018-12-31 13:43               ` Azat Khuzhin
2018-12-31 15:22                 ` Pierre-Louis Bossart
2019-01-05  0:34                   ` Azat Khuzhin
2019-01-05  2:12                     ` 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=s5hef9zl69r.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=torvalds@linux-foundation.org \
    /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).