public inbox for linux-sound@vger.kernel.org
 help / color / mirror / Atom feed
From: "Péter Ujfalusi" <peter.ujfalusi@linux.intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz,
	tiwai@suse.com, alsa-devel@alsa-project.org,
	linux-sound@vger.kernel.org,
	pierre-louis.bossart@linux.intel.com,
	kai.vehmanen@linux.intel.com, ranjani.sridharan@linux.intel.com
Subject: Re: [PATCH 1/2] ALSA: hda/hdmi: Add helper function to check if a device is HDMI codec
Date: Tue, 28 Nov 2023 14:16:29 +0200	[thread overview]
Message-ID: <30f05de0-f431-4972-9315-6b377cf43cf4@linux.intel.com> (raw)
In-Reply-To: <6710fd66-2a70-4948-aafb-2fcf3d6d2b25@linux.intel.com>



On 28/11/2023 13:58, Péter Ujfalusi wrote:
> 
> 
> On 28/11/2023 12:48, Takashi Iwai wrote:
>>> Well, it is a bit more 'interesting' from that angle.
>>> for patch two we needed:
>>> https://lore.kernel.org/linux-sound/20231124124015.15878-1-peter.ujfalusi@linux.intel.com/
>>
>> Ouch, this kind of information has to be mentioned in the patch
>> description.  Otherwise one would take only this series and face a
>> problem easily.  I can imagine such a problem on the stable tree.
> 
> OK, I will update the commit message
> 
>>> I would rather not risk to move the hdac_hda as Intel only using address
>>> 2 as HDMI indication - which I'm still not sure if it is Intel only or
>>> generic HDA convention.
>>
>> Sure, it doesn't sound right, either.
>>
>> Can we then add DAPM widgets and routes later conditionally instead of
>> having it in component driver definition?
> 
> The issue is with the DAIs. If I remove the dai registering from
> hdac_hda_dev_probe() to be done in hdac_hda_codec_probe() then the probe
> will not happen since we do not have the needed components/DAIs to probe
> the card.
> 
> If we don't have HDMI then the machine driver will substitute it with
> dummy-dai, but if we have HDMI then we are not going to probe at all.
> 
> It is a sort of chicken and egg situation, right?

I think I have found a workaround without the need to export a function,
it is going to be a single patch and should be OK for non Intel
platforms in the future.

struct hdac_hda_priv *hda_pvt = dev_get_drvdata(&hdev->dev);
..
if (hda_pvt->need_display_power)
	/* HDMI/DP */
else
	/* Non HDMI */

-- 
Péter

  reply	other threads:[~2023-11-28 12:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-27 13:02 [PATCH 0/2] ALSA/ASoC: hdmi/hdac_hda: Conditionally register dais Peter Ujfalusi
2023-11-27 13:02 ` [PATCH 1/2] ALSA: hda/hdmi: Add helper function to check if a device is HDMI codec Peter Ujfalusi
2023-11-27 13:18   ` Takashi Iwai
2023-11-27 14:12     ` Péter Ujfalusi
2023-11-27 14:31       ` Takashi Iwai
2023-11-27 14:45         ` Péter Ujfalusi
2023-11-27 15:20           ` Takashi Iwai
2023-11-27 15:40             ` Péter Ujfalusi
2023-11-27 15:43               ` Takashi Iwai
2023-11-28  9:10                 ` Péter Ujfalusi
2023-11-28  9:39                   ` Takashi Iwai
2023-11-28  9:53                     ` Péter Ujfalusi
2023-11-28 10:02                       ` Takashi Iwai
2023-11-28 10:16                         ` Péter Ujfalusi
2023-11-28 10:48                           ` Takashi Iwai
2023-11-28 11:58                             ` Péter Ujfalusi
2023-11-28 12:16                               ` Péter Ujfalusi [this message]
2023-11-28 13:02                                 ` Takashi Iwai
2023-11-27 13:02 ` [PATCH 2/2] ASoC: hdac_hda: Conditionally register dais for HDMI and Analog Peter Ujfalusi

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=30f05de0-f431-4972-9315-6b377cf43cf4@linux.intel.com \
    --to=peter.ujfalusi@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=tiwai@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox