All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cezary Rojewski <cezary.rojewski@intel.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	alsa-devel@alsa-project.org
Cc: vkoul@kernel.org, broonie@kernel.org, tiwai@suse.com,
	lgirdwood@gmail.com
Subject: Re: [PATCH 2/7] ASoC: Intel: Skylake: Select hda configuration permissively
Date: Tue, 10 Mar 2020 10:30:38 +0100	[thread overview]
Message-ID: <2e668752-e020-baf5-bd1b-de41d8eb6d3a@intel.com> (raw)
In-Reply-To: <ffe33017-5b2d-0c63-4a15-33df8831f29c@linux.intel.com>

On 2020-03-09 18:03, Pierre-Louis Bossart wrote:
> On 3/9/20 8:47 AM, Cezary Rojewski wrote:
>> On 2020-03-06 21:57, Pierre-Louis Bossart wrote:
>>> On 3/5/20 8:53 AM, Cezary Rojewski wrote:
>>>> With _reset_link removed from the probe sequence, codec_mask at the 
>>>> time
>>>> skl_find_hda_machine() is invoked will always be 0, so hda machine will
>>>> never be chosen. Rather than reorganizing boot flow, be permissive 
>>>> about
>>>> invalid mask. codec_mask will be set to proper value during 
>>>> probe_work -
>>>> before skl_codec_create() ever gets called.
>>>
>>> humm, what would happen e.g. if you have select the SKL driver but 
>>> there is no ACPI information to select an I2S-based machine driver, 
>>> and HDaudio/iDISP are disabled? You would have no error checks then?
>>>
>>
>> Laptops I've been testing this with have had Realtek + iDisp present 
>> onboard. Now, if you disable Realtek + HDMI/DP modules within legacy 
>> HDaudio Kconfig and HD audio support within Intel Skylake tree then 
>> you end up with no required modules for said configuration at all. 
>> Nothing will happen really: no warnings, no sound card either.
> 
> I meant enable the HDaudio controller but disable HDaudio codecs/HDMI at 
> the BIOS level. In that case the codec_mask will never be set.
> 

Applying diff (better than BIOS options which are not even present on 
some prod machines):

diff --git a/sound/hda/hdac_controller.c b/sound/hda/hdac_controller.c
index 7e7be8e4dcf9..b0e4579f26f6 100644
--- a/sound/hda/hdac_controller.c
+++ b/sound/hda/hdac_controller.c
@@ -421,7 +421,8 @@ int snd_hdac_bus_reset_link(struct hdac_bus *bus, 
bool full_reset)

         /* detect codecs */
         if (!bus->codec_mask) {
-               bus->codec_mask = snd_hdac_chip_readw(bus, STATESTS);
+               //bus->codec_mask = snd_hdac_chip_readw(bus, STATESTS);
+               bus->codec_mask = 0;
                 dev_dbg(bus->dev, "codec_mask = 0x%lx\n", bus->codec_mask);
         }

---

Results:
- skl boots
- no machines present
- drv stays dormant


Dumping boot log below (notice the '[   21.569291] snd_soc_skl 
0000:00:1f.3: codec_mask = 0x0' message):


[   21.462507] snd_soc_core:snd_soc_register_dai: snd-soc-dummy 
snd-soc-dummy: ASoC: dynamically register DAI snd-soc-dummy
[   21.462541] snd_soc_core:snd_soc_register_dai: snd-soc-dummy 
snd-soc-dummy: ASoC: Registered DAI 'snd-soc-dummy-dai'
[   21.536668] snd_soc_skl 0000:00:1f.3: DSP detected with PCI 
class/subclass/prog-if info 0x040380
[   21.542406] snd_hda_core:snd_hdac_bus_parse_capabilities: snd_soc_skl 
0000:00:1f.3: Capability version: 0x0
[   21.542412] snd_hda_core:snd_hdac_bus_parse_capabilities: snd_soc_skl 
0000:00:1f.3: HDA capability ID: 0x2
[   21.542416] snd_hda_core:snd_hdac_bus_parse_capabilities: snd_soc_skl 
0000:00:1f.3: Found ML capability
[   21.542421] snd_hda_core:snd_hdac_bus_parse_capabilities: snd_soc_skl 
0000:00:1f.3: Capability version: 0x0
[   21.542425] snd_hda_core:snd_hdac_bus_parse_capabilities: snd_soc_skl 
0000:00:1f.3: HDA capability ID: 0x3
[   21.542429] snd_hda_core:snd_hdac_bus_parse_capabilities: snd_soc_skl 
0000:00:1f.3: Found PP capability offset=800
[   21.542434] snd_hda_core:snd_hdac_bus_parse_capabilities: snd_soc_skl 
0000:00:1f.3: Capability version: 0x0
[   21.542438] snd_hda_core:snd_hdac_bus_parse_capabilities: snd_soc_skl 
0000:00:1f.3: HDA capability ID: 0x1
[   21.542443] snd_hda_core:snd_hdac_bus_parse_capabilities: snd_soc_skl 
0000:00:1f.3: Found GTS capability offset=500
[   21.542448] snd_hda_core:snd_hdac_bus_parse_capabilities: snd_soc_skl 
0000:00:1f.3: Capability version: 0x0
[   21.542451] snd_hda_core:snd_hdac_bus_parse_capabilities: snd_soc_skl 
0000:00:1f.3: HDA capability ID: 0x5
[   21.542455] snd_hda_core:snd_hdac_bus_parse_capabilities: snd_soc_skl 
0000:00:1f.3: Found DRSM capability
[   21.542460] snd_hda_core:snd_hdac_bus_parse_capabilities: snd_soc_skl 
0000:00:1f.3: Capability version: 0x0
[   21.542465] snd_hda_core:snd_hdac_bus_parse_capabilities: snd_soc_skl 
0000:00:1f.3: HDA capability ID: 0x4
[   21.542468] snd_hda_core:snd_hdac_bus_parse_capabilities: snd_soc_skl 
0000:00:1f.3: Found SPB capability
[   21.542672] snd_soc_skl:skl_first_init: snd_soc_skl 0000:00:1f.3: 
chipset global capabilities = 0x9701
[   21.556416] snd_soc_skl:skl_nhlt_update_topology_bin: snd_soc_skl 
0000:00:1f.3: oem_id LENOVO, oem_table_id TP-N23   oem_revision 4880
[   21.557053] snd_soc_skl:skl_find_machine: snd_soc_skl 0000:00:1f.3: 
No matching I2S machine driver found
[   21.557650] snd_soc_skl:skl_init_dsp: snd_soc_skl 0000:00:1f.3: dsp 
registration status=0
[   21.557658] snd_hda_ext_core:snd_hdac_ext_bus_get_ml_capabilities: 
snd_soc_skl 0000:00:1f.3: In snd_hdac_ext_bus_get_ml_capabilities Link 
count: 2
[   21.558254] snd_soc_skl 0000:00:1f.3: bound 0000:00:02.0 (ops 
i915_audio_component_bind_ops [i915])
[   21.558259] snd_hda_core:snd_hdac_display_power: snd_soc_skl 
0000:00:1f.3: display power enable
[   21.558272] snd_hda_core:snd_hdac_set_codec_wakeup: snd_soc_skl 
0000:00:1f.3: enable codec wakeup
[   21.561088] snd_hda_core:snd_hdac_set_codec_wakeup: snd_soc_skl 
0000:00:1f.3: disable codec wakeup
[   21.562606] snd_soc_skl:skl_init_pci: snd_soc_skl 0000:00:1f.3: 
Clearing TCSEL
[   21.562617] snd_hda_core:snd_hdac_set_codec_wakeup: snd_soc_skl 
0000:00:1f.3: enable codec wakeup
[   21.569291] snd_soc_skl 0000:00:1f.3: codec_mask = 0x0
[   21.569306] snd_hda_core:snd_hdac_set_codec_wakeup: snd_soc_skl 
0000:00:1f.3: disable codec wakeup
[   21.570856] snd_soc_skl 0000:00:1f.3: no hda codecs found!
[   21.570901] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: dynamically register DAI 0000:00:1f.3
[   21.570923] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: Registered DAI 'SSP0 Pin'
[   21.570927] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: dynamically register DAI 0000:00:1f.3
[   21.570947] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: Registered DAI 'SSP1 Pin'
[   21.570951] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: dynamically register DAI 0000:00:1f.3
[   21.570971] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: Registered DAI 'SSP2 Pin'
[   21.570976] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: dynamically register DAI 0000:00:1f.3
[   21.570996] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: Registered DAI 'SSP3 Pin'
[   21.571000] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: dynamically register DAI 0000:00:1f.3
[   21.571020] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: Registered DAI 'SSP4 Pin'
[   21.571024] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: dynamically register DAI 0000:00:1f.3
[   21.571044] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: Registered DAI 'SSP5 Pin'
[   21.571048] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: dynamically register DAI 0000:00:1f.3
[   21.571067] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: Registered DAI 'iDisp1 Pin'
[   21.571077] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: dynamically register DAI 0000:00:1f.3
[   21.571099] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: Registered DAI 'iDisp2 Pin'
[   21.571103] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: dynamically register DAI 0000:00:1f.3
[   21.571125] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: Registered DAI 'iDisp3 Pin'
[   21.571129] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: dynamically register DAI 0000:00:1f.3
[   21.571148] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: Registered DAI 'DMIC01 Pin'
[   21.571153] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: dynamically register DAI 0000:00:1f.3
[   21.571172] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: Registered DAI 'DMIC16k Pin'
[   21.571176] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: dynamically register DAI 0000:00:1f.3
[   21.571209] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: Registered DAI 'Analog CPU DAI'
[   21.571213] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: dynamically register DAI 0000:00:1f.3
[   21.571230] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: Registered DAI 'Alt Analog CPU DAI'
[   21.571233] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: dynamically register DAI 0000:00:1f.3
[   21.571250] snd_soc_core:snd_soc_register_dai: snd_soc_skl 
0000:00:1f.3: ASoC: Registered DAI 'Digital CPU DAI'
[   21.571566] snd_hda_core:snd_hdac_display_power: snd_soc_skl 
0000:00:1f.3: display power disable
[   21.571585] snd_soc_skl:skl_runtime_suspend: snd_soc_skl 
0000:00:1f.3: in skl_runtime_suspend


  reply	other threads:[~2020-03-10  9:31 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-05 14:53 [PATCH 0/7] ASoC: Intel: Skylake: Fix HDaudio and Dmic Cezary Rojewski
2020-03-05 14:53 ` [PATCH 1/7] ASoC: Intel: Skylake: Remove superfluous chip initialization Cezary Rojewski
2020-03-06 20:52   ` Pierre-Louis Bossart
2020-03-09 13:57     ` Cezary Rojewski
2020-03-09 16:48       ` Pierre-Louis Bossart
2020-03-09 17:43         ` Cezary Rojewski
2020-03-09 18:41           ` Pierre-Louis Bossart
2020-03-10 17:45   ` Applied "ASoC: Intel: Skylake: Remove superfluous chip initialization" to the asoc tree Mark Brown
2020-03-05 14:53 ` [PATCH 2/7] ASoC: Intel: Skylake: Select hda configuration permissively Cezary Rojewski
2020-03-06 20:57   ` Pierre-Louis Bossart
2020-03-09 13:47     ` Cezary Rojewski
2020-03-09 17:03       ` Pierre-Louis Bossart
2020-03-10  9:30         ` Cezary Rojewski [this message]
2020-03-10 17:45   ` Applied "ASoC: Intel: Skylake: Select hda configuration permissively" to the asoc tree Mark Brown
2020-03-05 14:53 ` [PATCH 3/7] ASoC: Intel: Skylake: Enable codec wakeup during chip init Cezary Rojewski
2020-03-10 17:44   ` Applied "ASoC: Intel: Skylake: Enable codec wakeup during chip init" to the asoc tree Mark Brown
2020-03-05 14:53 ` [PATCH 4/7] ASoC: Intel: Skylake: Shield against no-NHLT configurations Cezary Rojewski
2020-03-06 21:03   ` Pierre-Louis Bossart
2020-03-09 13:03     ` Cezary Rojewski
2020-03-09 17:01       ` Pierre-Louis Bossart
2020-03-09 17:38         ` Cezary Rojewski
2020-03-09 18:40           ` Pierre-Louis Bossart
2020-03-10 17:44   ` Applied "ASoC: Intel: Skylake: Shield against no-NHLT configurations" to the asoc tree Mark Brown
2020-03-05 14:53 ` [PATCH 5/7] ASoC: Intel: skl_hda_dsp: Enable Dmic configuration Cezary Rojewski
2020-03-06 14:46   ` Kai Vehmanen
2020-03-06 15:49     ` Pierre-Louis Bossart
2020-03-06 19:05       ` Cezary Rojewski
2020-03-06 19:49         ` Pierre-Louis Bossart
2020-03-06 19:58           ` Cezary Rojewski
2020-03-05 14:53 ` [PATCH 6/7] ASoC: Intel: Allow for ROM init retry on CNL platforms Cezary Rojewski
2020-03-10 17:44   ` Applied "ASoC: Intel: Allow for ROM init retry on CNL platforms" to the asoc tree Mark Brown
2020-03-05 14:53 ` [PATCH 7/7] ASoC: Intel: Skylake: Await purge request ack on CNL Cezary Rojewski
2020-03-10 17:44   ` Applied "ASoC: Intel: Skylake: Await purge request ack on CNL" to the asoc tree Mark Brown
2020-03-06 20:48 ` [PATCH 0/7] ASoC: Intel: Skylake: Fix HDaudio and Dmic Pierre-Louis Bossart
2020-03-09 11:38   ` Mark Brown
2020-03-09 14:02     ` Cezary Rojewski
2020-03-09 16:54       ` Mark Brown
2020-03-09 17:48         ` Cezary Rojewski
2020-03-09 17:52           ` Mark Brown
2020-03-10 16:03         ` Pierre-Louis Bossart
     [not found]           ` <2dc38392-760b-a5fc-fa00-98530729f2d3@intel.com>
2020-03-11 16:56             ` Mark Brown

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=2e668752-e020-baf5-bd1b-de41d8eb6d3a@intel.com \
    --to=cezary.rojewski@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=tiwai@suse.com \
    --cc=vkoul@kernel.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 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.