* DP/HDMI Jack and Pipewire
@ 2025-11-07 10:15 Srinivas Kandagatla
2025-11-08 9:21 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: Srinivas Kandagatla @ 2025-11-07 10:15 UTC (permalink / raw)
To: Mark Brown, Takashi Iwai
Cc: linux-sound, wtaymans, arun, Jaroslav Kysela, lkml,
Krzysztof Kozlowski, Dmitry Baryshkov
Hi Everyone,
On Qualcomm platforms we have an issue enabling Display port on a full
Distro setup with pipewire and wireplumber in place.
The issue is that Display port Audio IP on Qualcomm SoC is powered off
if there is no Display connected. It make sense to keep it in this low
power mode when there is no use. And the DP IP is not expecting any data
in this state and any attempt to configure or send data would result in
error from DSP.
However, we create PCM devices and jacks for all audio sinks and
sources, including DisplayPort DAI links. When PipeWire starts up
without any awareness of jack state it probes all available PCM devices,
including the DisplayPort ones. Since no display is connected, the
prepare callback for DP fails, leading PipeWire to mark the sound card
as unusable. Consequently, it abandons entire sound card, including
other valid audio sinks. I have also started discussing this issue with
pipewire [1]
What is the expected pcm device behavior when DP jack is not connected?
Two possibilities:
1. Consume the data even when the Display is not connected. I see that
in Intel case it sinks the data somewhere and gives the user an
experience that the data is getting consumed.
2. Throw an error to user if they attempt to configure or send the data
to this disconnected pcm.
Also what userspace ABI to for such usecase?
This is blocking end-to-end DP audio enablement on Qualcomm SoCs.
Not sure if this is right approach or will work but somehow we back the
pcm devices with disconnected jack state to use dummy pcm ops instead of
actual pcm ops?
This should at least keep the pipewire happy. Is this the right approach?
[1]: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/4938
Thanks,
Srini
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: DP/HDMI Jack and Pipewire
2025-11-07 10:15 DP/HDMI Jack and Pipewire Srinivas Kandagatla
@ 2025-11-08 9:21 ` Takashi Iwai
2025-11-09 11:43 ` Jaroslav Kysela
0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2025-11-08 9:21 UTC (permalink / raw)
To: Srinivas Kandagatla
Cc: Mark Brown, Takashi Iwai, linux-sound, wtaymans, arun,
Jaroslav Kysela, lkml, Krzysztof Kozlowski, Dmitry Baryshkov
On Fri, 07 Nov 2025 11:15:50 +0100,
Srinivas Kandagatla wrote:
>
> Hi Everyone,
>
> On Qualcomm platforms we have an issue enabling Display port on a full
> Distro setup with pipewire and wireplumber in place.
>
> The issue is that Display port Audio IP on Qualcomm SoC is powered off
> if there is no Display connected. It make sense to keep it in this low
> power mode when there is no use. And the DP IP is not expecting any data
> in this state and any attempt to configure or send data would result in
> error from DSP.
>
> However, we create PCM devices and jacks for all audio sinks and
> sources, including DisplayPort DAI links. When PipeWire starts up
> without any awareness of jack state it probes all available PCM devices,
> including the DisplayPort ones. Since no display is connected, the
> prepare callback for DP fails, leading PipeWire to mark the sound card
> as unusable. Consequently, it abandons entire sound card, including
> other valid audio sinks. I have also started discussing this issue with
> pipewire [1]
>
>
> What is the expected pcm device behavior when DP jack is not connected?
>
> Two possibilities:
>
> 1. Consume the data even when the Display is not connected. I see that
> in Intel case it sinks the data somewhere and gives the user an
> experience that the data is getting consumed.
>
> 2. Throw an error to user if they attempt to configure or send the data
> to this disconnected pcm.
>
>
> Also what userspace ABI to for such usecase?
>
> This is blocking end-to-end DP audio enablement on Qualcomm SoCs.
>
> Not sure if this is right approach or will work but somehow we back the
> pcm devices with disconnected jack state to use dummy pcm ops instead of
> actual pcm ops?
> This should at least keep the pipewire happy. Is this the right approach?
>
>
> [1]: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/4938
>
> Thanks,
> Srini
I believe this has been a long-standing problem even for HD-audio.
The HD-audio HDMI driver does open and process without actual pin
setup for allowing the probe by PA/PW with the assumption of some
basic PCM parameters. It was introduced in the commit
42b2987079eca0238b576c08af1144ed5bd52188
ALSA: hda - hdmi playback without monitor in dynamic pcm bind mode
So I find using a dummy ops would make sense (assuming it's actually
enough to convince PA/PW).
thanks,
Takashi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: DP/HDMI Jack and Pipewire
2025-11-08 9:21 ` Takashi Iwai
@ 2025-11-09 11:43 ` Jaroslav Kysela
0 siblings, 0 replies; 3+ messages in thread
From: Jaroslav Kysela @ 2025-11-09 11:43 UTC (permalink / raw)
To: Takashi Iwai, Srinivas Kandagatla
Cc: Mark Brown, Takashi Iwai, linux-sound, wtaymans, arun, lkml,
Krzysztof Kozlowski, Dmitry Baryshkov
On 11/8/25 10:21, Takashi Iwai wrote:
> On Fri, 07 Nov 2025 11:15:50 +0100,
> Srinivas Kandagatla wrote:
>>
>> Hi Everyone,
>>
>> On Qualcomm platforms we have an issue enabling Display port on a full
>> Distro setup with pipewire and wireplumber in place.
>>
>> The issue is that Display port Audio IP on Qualcomm SoC is powered off
>> if there is no Display connected. It make sense to keep it in this low
>> power mode when there is no use. And the DP IP is not expecting any data
>> in this state and any attempt to configure or send data would result in
>> error from DSP.
>>
>> However, we create PCM devices and jacks for all audio sinks and
>> sources, including DisplayPort DAI links. When PipeWire starts up
>> without any awareness of jack state it probes all available PCM devices,
>> including the DisplayPort ones. Since no display is connected, the
>> prepare callback for DP fails, leading PipeWire to mark the sound card
>> as unusable. Consequently, it abandons entire sound card, including
>> other valid audio sinks. I have also started discussing this issue with
>> pipewire [1]
>>
>>
>> What is the expected pcm device behavior when DP jack is not connected?
>>
>> Two possibilities:
>>
>> 1. Consume the data even when the Display is not connected. I see that
>> in Intel case it sinks the data somewhere and gives the user an
>> experience that the data is getting consumed.
>>
>> 2. Throw an error to user if they attempt to configure or send the data
>> to this disconnected pcm.
>>
>>
>> Also what userspace ABI to for such usecase?
>>
>> This is blocking end-to-end DP audio enablement on Qualcomm SoCs.
>>
>> Not sure if this is right approach or will work but somehow we back the
>> pcm devices with disconnected jack state to use dummy pcm ops instead of
>> actual pcm ops?
>> This should at least keep the pipewire happy. Is this the right approach?
>>
>>
>> [1]: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/4938
>>
>> Thanks,
>> Srini
>
> I believe this has been a long-standing problem even for HD-audio.
> The HD-audio HDMI driver does open and process without actual pin
> setup for allowing the probe by PA/PW with the assumption of some
> basic PCM parameters. It was introduced in the commit
> 42b2987079eca0238b576c08af1144ed5bd52188
> ALSA: hda - hdmi playback without monitor in dynamic pcm bind mode
>
> So I find using a dummy ops would make sense (assuming it's actually
> enough to convince PA/PW).
Or the pipewire/pulseaudio should not go beyond SNDRV_PCM_STATE_SETUP for
probing and just do enumeration using hw parameters given from the driver. At
least for UCM, the devices should be defined properly. PW/PA should allow open
only when the associated Jack control signalized the availability of the PCM
device.
IMHO it's not reponsibility for the kernel driver to accept such incorrect
scenarios. The PCM API is straight for this.
Jaroslav
--
Jaroslav Kysela <perex@perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-11-09 11:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-07 10:15 DP/HDMI Jack and Pipewire Srinivas Kandagatla
2025-11-08 9:21 ` Takashi Iwai
2025-11-09 11:43 ` Jaroslav Kysela
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.