Skip to contentSkip to conversation

Signalling no-audio for HDMI

DISCUSSION Christian König 4 participants 9 messages Mar 30, 2010 – Apr 10, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

Quoted 5 lines
Quoted 5 lines

It seems your TV refuses to use audio from analog stereo cable, when it detects audio enabled over/in HDMI (just enabled, even purely silent as in your case). And it seems we enable HDMI mode even when you use radeon.audio=0.

Quoted 7 lines
Quoted 3 lines

I've no idea what could affect this between 2.6.33-rc8 and 2.6.33 (stable). The list of changes for drm/radeon taken from
http://lkml.org/lkml/2010/2/24/301 :

It doesn't seem to be the kernel, actually. I already tried with booting rc8
and it is the same. Must be one of the other parts, then...

I also have no idea which change caused this, but the fix is rather simple, just also disable the HDMI encoders when the audio codec gets disabled by the module option. A patch is attached.

Quoted 1 line

Can you provide "lspci" output by the way?

This is the second laptop where I see this strange configuration. From the video drivers point of view everything is present (audio codec, HDMI encoders, etc...), but the audio codec doesn't seems to be connected to the PCI bus, so alsa can't see it.

I have no idea how we could auto detect this case, but the attached patch should be a good workaround.

Christian.

Quoted 1 line

From 7226ccea04d48383fbf00577b8861461bcae2b02 Mon Sep 17 00:00:00 2001

From: =?utf-8?q?Christian=20K=C3=B6nig?= <chrissi@zweiundvierzig.(none)>
Date: Tue, 30 Mar 2010 19:19:20 +0200
Subject: [PATCH] drm/radeon/kms: disable HDMI encoders when audio codec is disabled

Also disable the HDMI encoders if the audio codec is disabled by the module option. This fixes a strange bug, where an enabled HDMI encoder disables an external audio input at the TV.

---
 drivers/gpu/drm/radeon/radeon_encoders.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/radeon/radeon_encoders.c +3 -3
index 7f43476..05f62ec 100644
@@ -611,7 +611,7 @@ atombios_get_encoder_mode(struct drm_encoder *encoder)
 	switch (connector->connector_type) {
 	case DRM_MODE_CONNECTOR_DVII:
 	case DRM_MODE_CONNECTOR_HDMIB: /* HDMI-B is basically DL-DVI; analog works fine */
-		if (drm_detect_hdmi_monitor(radeon_connector->edid))
+		if (drm_detect_hdmi_monitor(radeon_connector->edid) && radeon_audio)
 			return ATOM_ENCODER_MODE_HDMI;
 		else if (radeon_connector->use_digital)
 			return ATOM_ENCODER_MODE_DVI;
@@ -621,7 +621,7 @@ atombios_get_encoder_mode(struct drm_encoder *encoder)
 	case DRM_MODE_CONNECTOR_DVID:
 	case DRM_MODE_CONNECTOR_HDMIA:
 	default:
-		if (drm_detect_hdmi_monitor(radeon_connector->edid))
+		if (drm_detect_hdmi_monitor(radeon_connector->edid) && radeon_audio)
 			return ATOM_ENCODER_MODE_HDMI;
 		else
 			return ATOM_ENCODER_MODE_DVI;
@@ -635,7 +635,7 @@ atombios_get_encoder_mode(struct drm_encoder *encoder)
 		if ((dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) ||
 		    (dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_eDP))
 			return ATOM_ENCODER_MODE_DP;
-		else if (drm_detect_hdmi_monitor(radeon_connector->edid))
+		else if (drm_detect_hdmi_monitor(radeon_connector->edid) && radeon_audio)
 			return ATOM_ENCODER_MODE_HDMI;
 		else
 			return ATOM_ENCODER_MODE_DVI;
Signature · 1 line
1.6.3.3

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev

--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel

#1 lore raw

Am Dienstag 30 März 2010 19:30:38 schrieb Christian König:

Quoted 19 lines
Quoted 5 lines
Quoted 5 lines

It seems your TV refuses to use audio from analog stereo cable, when it detects audio enabled over/in HDMI (just enabled, even purely silent as in your case). And it seems we enable HDMI mode even when you use radeon.audio=0.

Quoted 7 lines
Quoted 3 lines

I've no idea what could affect this between 2.6.33-rc8 and 2.6.33 (stable). The list of changes for drm/radeon taken from
http://lkml.org/lkml/2010/2/24/301 :

It doesn't seem to be the kernel, actually. I already tried with booting rc8
and it is the same. Must be one of the other parts, then...

I also have no idea which change caused this, but the fix is rather simple, just also disable the HDMI encoders when the audio codec gets disabled by the module option. A patch is attached.

Quoted 1 line

Can you provide "lspci" output by the way?

Quoted 7 lines

This is the second laptop where I see this strange configuration. From the video drivers point of view everything is present (audio codec, HDMI encoders, etc...), but the audio codec doesn't seems to be connected to the PCI bus, so alsa can't see it.

I have no idea how we could auto detect this case, but the attached patch should be a good workaround.

Yes. But didn't work. I will test something else (different computer with definitely DVI-only) or maybe you have some other ideas.

Thanks.

HS

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--

#2 lore raw

2010/3/30 Hendrik Sattler <[email protected]>:

Quoted 25 lines

Am Dienstag 30 März 2010 19:30:38 schrieb Christian König:

Quoted 24 lines
Quoted 5 lines
Quoted 5 lines

It seems your TV refuses to use audio from analog stereo cable, when it detects audio enabled over/in HDMI (just enabled, even purely silent as in your case). And it seems we enable HDMI mode even when you use radeon.audio=0.

Quoted 7 lines
Quoted 3 lines

I've no idea what could affect this between 2.6.33-rc8 and 2.6.33 (stable). The list of changes for drm/radeon taken from
http://lkml.org/lkml/2010/2/24/301 :

It doesn't seem to be the kernel, actually. I already tried with booting rc8
and it is the same. Must be one of the other parts, then...

I also have no idea which change caused this, but the fix is rather simple, just also disable the HDMI encoders when the audio codec gets disabled by the module option. A patch is attached.

Quoted 1 line

Can you provide "lspci" output by the way?

This is the second laptop where I see this strange configuration. From the video drivers point of view everything is present (audio codec, HDMI encoders, etc...), but the audio codec doesn't seems to be connected to the PCI bus, so alsa can't see it.

Quoted 5 lines
Quoted 2 lines

I have no idea how we could auto detect this case, but the attached patch should be a good workaround.

Yes. But didn't work. I will test something else (different computer with definitely DVI-only) or maybe you have some other ideas.

Some TVs always assume audio will come over hdmi if the port is in use. There may be an option in your TV's setup menus to disable that.

Alex

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--

#3 lore raw
In reply to Christian König
Quoted 18 lines · Christian König

Hi,

Quoted 5 lines
Quoted 5 lines

It seems your TV refuses to use audio from analog stereo cable, when it detects audio enabled over/in HDMI (just enabled, even purely silent as in your case). And it seems we enable HDMI mode even when you use radeon.audio=0.

Quoted 7 lines
Quoted 3 lines

I've no idea what could affect this between 2.6.33-rc8 and 2.6.33 (stable). The list of changes for drm/radeon taken from
http://lkml.org/lkml/2010/2/24/301 :

It doesn't seem to be the kernel, actually. I already tried with booting rc8
and it is the same. Must be one of the other parts, then...

I also have no idea which change caused this, but the fix is rather simple, just also disable the HDMI encoders when the audio codec gets disabled by the module option. A patch is attached.

Quoted 8 lines
Quoted 1 line

Can you provide "lspci" output by the way?

This is the second laptop where I see this strange configuration. From the video drivers point of view everything is present (audio codec, HDMI encoders, etc...), but the audio codec doesn't seems to be connected to the PCI bus, so alsa can't see it.

I have no idea how we could auto detect this case, but the attached patch should be a good workaround.

We should probably also only enable the audio timer when we enable audio otherwise it just keeps the CPU awake.

Alex

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--

#4 lore raw

2010/3/30 Alex Deucher <[email protected]>:

Quoted 26 lines
Quoted 24 lines · Christian König

Hi,

Quoted 5 lines
Quoted 5 lines

It seems your TV refuses to use audio from analog stereo cable, when it detects audio enabled over/in HDMI (just enabled, even purely silent as in your case). And it seems we enable HDMI mode even when you use radeon.audio=0.

Quoted 7 lines
Quoted 3 lines

I've no idea what could affect this between 2.6.33-rc8 and 2.6.33 (stable). The list of changes for drm/radeon taken from
http://lkml.org/lkml/2010/2/24/301 :

It doesn't seem to be the kernel, actually. I already tried with booting rc8
and it is the same. Must be one of the other parts, then...

I also have no idea which change caused this, but the fix is rather simple, just also disable the HDMI encoders when the audio codec gets disabled by the module option. A patch is attached.

Quoted 1 line

Can you provide "lspci" output by the way?

This is the second laptop where I see this strange configuration. From the video drivers point of view everything is present (audio codec, HDMI encoders, etc...), but the audio codec doesn't seems to be connected to the PCI bus, so alsa can't see it.

Quoted 5 lines
Quoted 2 lines

I have no idea how we could auto detect this case, but the attached patch should be a good workaround.

We should probably also only enable the audio timer when we enable audio otherwise it just keeps the CPU awake.

Could you explain "when we enable audio", please?

Signature · 13 lines
Rafał

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel
#5 lore raw
Quoted 27 lines · Rafał Miłecki

2010/3/30 Alex Deucher <[email protected]>:

Quoted 26 lines
Quoted 24 lines · Christian König

Hi,

Quoted 5 lines
Quoted 5 lines

It seems your TV refuses to use audio from analog stereo cable, when it detects audio enabled over/in HDMI (just enabled, even purely silent as in your case). And it seems we enable HDMI mode even when you use radeon.audio=0.

Quoted 7 lines
Quoted 3 lines

I've no idea what could affect this between 2.6.33-rc8 and 2.6.33 (stable). The list of changes for drm/radeon taken from
http://lkml.org/lkml/2010/2/24/301 :

It doesn't seem to be the kernel, actually. I already tried with booting rc8
and it is the same. Must be one of the other parts, then...

I also have no idea which change caused this, but the fix is rather simple, just also disable the HDMI encoders when the audio codec gets disabled by the module option. A patch is attached.

Quoted 1 line

Can you provide "lspci" output by the way?

This is the second laptop where I see this strange configuration. From the video drivers point of view everything is present (audio codec, HDMI encoders, etc...), but the audio codec doesn't seems to be connected to the PCI bus, so alsa can't see it.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

I have no idea how we could auto detect this case, but the attached patch should be a good workaround.

We should probably also only enable the audio timer when we enable audio otherwise it just keeps the CPU awake.

Could you explain "when we enable audio", please?

No need to have the timer running if we aren't currently using hdmi audio (e.g., dpms off, analog encoder in use, digital encoder in non-hdmi mode, etc.). So probably turn it on/off when we dpms on/off a digital output in hdmi mode.

Alex

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel

#6 lore raw
In reply to Alex Deucher

Am Dienstag, den 30.03.2010, 16:51 -0400 schrieb Alex Deucher:

Quoted 2 lines

We should probably also only enable the audio timer when we enable audio otherwise it just keeps the CPU awake.

It was the original intention of this option to disable the polling workaround. It's really a bug if this isn't working as intended.

I will check that, another thing is that we should only enable it if we have a HDMI capable device connected.

Christian.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--

#7 lore raw

2010/3/30 Christian König <[email protected]>:

Quoted 5 lines

Am Dienstag, den 30.03.2010, 16:51 -0400 schrieb Alex Deucher:

Quoted 2 lines

We should probably also only enable the audio timer when we enable audio otherwise it just keeps the CPU awake.

It was the original intention of this option to disable the polling workaround. It's really a bug if this isn't working as intended.

AFAIK it works fine.

Quoted 2 lines

I will check that, another thing is that we should only enable it if we have a HDMI capable device connected.

This is something we could add. However I start considering looking blindly for ACK signal for audio IRQ. With some huge luck I could find it and we won't need timer anymore ;)

Signature · 13 lines
Rafał

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel
#8 lore raw
In reply to Christian König

Am Dienstag 30 März 2010 19:30:38 schrieb Christian König:

Quoted 4 lines

This is the second laptop where I see this strange configuration. From the video drivers point of view everything is present (audio codec, HDMI encoders, etc...), but the audio codec doesn't seems to be connected to the PCI bus, so alsa can't see it.

Now I finally know what you mean (found an example lspci snippet of what it should be[1], although I have a different chip). Is there some quirk that can be used to enable that connection to the PCI bus? Maybe someone with connection to AMD can ask them?
If that's the missing peace to get HDMI-Audio instead of an extra stereo cable, this would be even better :)

[1]: http://osdir.com/ml/fedora-list/2009-05/msg01502.html

HS

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--