* [PATCH 1/3] introduce i830_hdmi_priv.has_hdmi_sink
2008-11-07 6:23 [PATCH 0/3] enable HDMI audio output for HDMI monitors V2 Wu Fengguang
@ 2008-11-07 6:23 ` Wu Fengguang
[not found] ` <20081112072747.GD14627@zhen-devel.sh.intel.com>
2008-11-07 6:23 ` [PATCH 2/3] enable Intel G45 integrated HDMI audio output Wu Fengguang
` (3 subsequent siblings)
4 siblings, 1 reply; 7+ messages in thread
From: Wu Fengguang @ 2008-11-07 6:23 UTC (permalink / raw)
To: Wang Zhenyu; +Cc: alsa-devel, linux-gfx, xorg
[-- Attachment #1: has-hdmi-sink.patch --]
[-- Type: text/plain, Size: 1760 bytes --]
HDMI is compatible with DVI, and we've seen many boards that
use HDMI port for DVI output.
So Zhenyu proposed this flag: i830_hdmi_priv.has_hdmi_sink
to indicate the presence of HDMI capable monitors.
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
---
src/i830_hdmi.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
--- xf86-video-intel.orig/src/i830_hdmi.c
+++ xf86-video-intel/src/i830_hdmi.c
@@ -38,6 +38,8 @@ struct i830_hdmi_priv {
uint32_t output_reg;
uint32_t save_SDVO;
+
+ Bool has_hdmi_sink;
};
static int
@@ -142,6 +144,8 @@ i830_hdmi_detect(xf86OutputPtr output)
xf86OutputStatus status;
xf86MonPtr edid_mon;
+ dev_priv->has_hdmi_sink = FALSE;
+
/* For G4X desktop chip, PEG_BAND_GAP_DATA 3:0 must first be written 0xd.
* Failure to do so will result in spurious interrupts being
* generated on the port when a cable is not attached.
@@ -180,6 +184,16 @@ i830_hdmi_detect(xf86OutputPtr output)
edid_mon = xf86OutputGetEDID (output, intel_output->pDDCBus);
if (!edid_mon || !DIGITAL(edid_mon->features.input_type))
status = XF86OutputStatusDisconnected;
+
+ if (xf86MonitorIsHDMI(edid_mon))
+ dev_priv->has_hdmi_sink = TRUE;
+
+ if (pI830->debug_modes)
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "%s monitor detected on HDMI-%d\n",
+ dev_priv->has_hdmi_sink ? "HDMI" : "DVI",
+ (dev_priv->output_reg == SDVOB) ? 1 : 2);
+
xfree(edid_mon);
return status;
}
@@ -232,6 +246,7 @@ i830_hdmi_init(ScrnInfoPtr pScrn, int ou
dev_priv = (struct i830_hdmi_priv *)(intel_output + 1);
dev_priv->output_reg = output_reg;
+ dev_priv->has_hdmi_sink = FALSE;
intel_output->dev_priv = dev_priv;
intel_output->type = I830_OUTPUT_HDMI;
--
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 2/3] enable Intel G45 integrated HDMI audio output
2008-11-07 6:23 [PATCH 0/3] enable HDMI audio output for HDMI monitors V2 Wu Fengguang
2008-11-07 6:23 ` [PATCH 1/3] introduce i830_hdmi_priv.has_hdmi_sink Wu Fengguang
@ 2008-11-07 6:23 ` Wu Fengguang
2008-11-07 6:23 ` [PATCH 3/3] enable Intel G35 SDVO " Wu Fengguang
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Wu Fengguang @ 2008-11-07 6:23 UTC (permalink / raw)
To: Wang Zhenyu; +Cc: alsa-devel, linux-gfx, xorg
[-- Attachment #1: audio-enable.patch --]
[-- Type: text/plain, Size: 1040 bytes --]
Enable audio output for the integrated HDMI of Intel G45 chipset
by introducing the SDVO_AUDIO_ENABLE bit.
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
---
src/i810_reg.h | 1 +
src/i830_hdmi.c | 4 ++++
2 files changed, 5 insertions(+)
--- xf86-video-intel.orig/src/i810_reg.h
+++ xf86-video-intel/src/i810_reg.h
@@ -1296,6 +1296,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN
/** Requird for HDMI operation */
#define SDVO_NULL_PACKETS_DURING_VSYNC (1 << 9)
#define SDVO_BORDER_ENABLE (1 << 7)
+#define SDVO_AUDIO_ENABLE (1 << 6)
/** New with 965, default is to be set */
#define SDVO_VSYNC_ACTIVE_HIGH (1 << 4)
/** New with 965, default is to be set */
--- xf86-video-intel.orig/src/i830_hdmi.c
+++ xf86-video-intel/src/i830_hdmi.c
@@ -80,6 +80,10 @@ i830_hdmi_mode_set(xf86OutputPtr output,
SDVO_BORDER_ENABLE |
SDVO_VSYNC_ACTIVE_HIGH |
SDVO_HSYNC_ACTIVE_HIGH;
+
+ if (dev_priv->has_hdmi_sink)
+ sdvox |= SDVO_AUDIO_ENABLE;
+
if (intel_crtc->pipe == 1)
sdvox |= SDVO_PIPE_B_SELECT;
--
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 3/3] enable Intel G35 SDVO HDMI audio output
2008-11-07 6:23 [PATCH 0/3] enable HDMI audio output for HDMI monitors V2 Wu Fengguang
2008-11-07 6:23 ` [PATCH 1/3] introduce i830_hdmi_priv.has_hdmi_sink Wu Fengguang
2008-11-07 6:23 ` [PATCH 2/3] enable Intel G45 integrated HDMI audio output Wu Fengguang
@ 2008-11-07 6:23 ` Wu Fengguang
2008-11-10 18:18 ` [PATCH 0/3] enable HDMI audio output for HDMI monitors V2 Adam Jackson
2008-11-13 2:05 ` Wang, Zhenyu Z
4 siblings, 0 replies; 7+ messages in thread
From: Wu Fengguang @ 2008-11-07 6:23 UTC (permalink / raw)
To: Wang Zhenyu; +Cc: Ma Ling, alsa-devel, linux-gfx, xorg
[-- Attachment #1: a --]
[-- Type: text/plain, Size: 1664 bytes --]
From: Ma Ling <ling.ma@intel.com>
Set the SDVO_AUDIO_ENABLE bit to enable SDVO HDMI audio output of the
Intel G35 chipset.
Signed-off-by: Ma Ling <ling.ma@intel.com>
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
---
src/i830_sdvo.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
--- xf86-video-intel.orig/src/i830_sdvo.c
+++ xf86-video-intel/src/i830_sdvo.c
@@ -1019,7 +1019,7 @@ i830_sdvo_mode_set(xf86OutputPtr output,
struct i830_sdvo_priv *dev_priv = intel_output->dev_priv;
xf86CrtcPtr crtc = output->crtc;
I830CrtcPrivatePtr intel_crtc = crtc->driver_private;
- uint32_t sdvox;
+ uint32_t sdvox = 0;
int sdvo_pixel_multiply;
struct i830_sdvo_in_out_map in_out;
struct i830_sdvo_dtd input_dtd;
@@ -1041,8 +1041,10 @@ i830_sdvo_mode_set(xf86OutputPtr output,
&in_out, sizeof(in_out));
status = i830_sdvo_read_response(output, NULL, 0);
- if (dev_priv->is_hdmi)
+ if (dev_priv->is_hdmi) {
i830_sdvo_set_avi_infoframe(output, mode);
+ sdvox |= SDVO_AUDIO_ENABLE;
+ }
i830_sdvo_get_dtd_from_mode(&input_dtd, mode);
@@ -1090,11 +1092,11 @@ i830_sdvo_mode_set(xf86OutputPtr output,
/* Set the SDVO control regs. */
if (IS_I965G(pI830)) {
- sdvox = SDVO_BORDER_ENABLE |
+ sdvox |= SDVO_BORDER_ENABLE |
SDVO_VSYNC_ACTIVE_HIGH |
SDVO_HSYNC_ACTIVE_HIGH;
} else {
- sdvox = INREG(dev_priv->output_device);
+ sdvox |= INREG(dev_priv->output_device);
switch (dev_priv->output_device) {
case SDVOB:
sdvox &= SDVOB_PRESERVE_MASK;
--
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 0/3] enable HDMI audio output for HDMI monitors V2
2008-11-07 6:23 [PATCH 0/3] enable HDMI audio output for HDMI monitors V2 Wu Fengguang
` (2 preceding siblings ...)
2008-11-07 6:23 ` [PATCH 3/3] enable Intel G35 SDVO " Wu Fengguang
@ 2008-11-10 18:18 ` Adam Jackson
2008-11-13 2:05 ` Wang, Zhenyu Z
4 siblings, 0 replies; 7+ messages in thread
From: Adam Jackson @ 2008-11-10 18:18 UTC (permalink / raw)
To: Wu Fengguang; +Cc: alsa-devel, linux-gfx, xorg
[-- Attachment #1.1: Type: text/plain, Size: 676 bytes --]
On Fri, 2008-11-07 at 14:23 +0800, Wu Fengguang wrote:
> Hello,
>
> We can now enjoy music on HDMI monitors that are attached to Intel G35/G45
> chipsets with the following X.org intel driver patches
>
> [PATCH 1/3] introduce i830_hdmi_priv.has_hdmi_sink
> [PATCH 2/3] enable Intel G45 integrated HDMI audio output
> [PATCH 3/3] enable Intel G35 SDVO HDMI audio output
>
> _and_ the corresponding ALSA patch posted at
> http://mailman.alsa-project.org/pipermail/alsa-devel/2008-November/012158.html
>
> The patches are tested OK on Intel DG45ID board, HP 2230s notebook and
> ASUS P5E-VM board.
Patch series looks good to me.
- ajax
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
[-- Attachment #2: Type: text/plain, Size: 143 bytes --]
_______________________________________________
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 0/3] enable HDMI audio output for HDMI monitors V2
2008-11-07 6:23 [PATCH 0/3] enable HDMI audio output for HDMI monitors V2 Wu Fengguang
` (3 preceding siblings ...)
2008-11-10 18:18 ` [PATCH 0/3] enable HDMI audio output for HDMI monitors V2 Adam Jackson
@ 2008-11-13 2:05 ` Wang, Zhenyu Z
4 siblings, 0 replies; 7+ messages in thread
From: Wang, Zhenyu Z @ 2008-11-13 2:05 UTC (permalink / raw)
To: Wu Fengguang
Cc: alsa-devel@alsa-project.org, linux-gfx@linux.intel.com,
xorg@lists.freedesktop.org
[-- Attachment #1.1: Type: text/plain, Size: 2955 bytes --]
On 2008.11.07 14:23:38 +0800, Wu Fengguang wrote:
> Hello,
>
> We can now enjoy music on HDMI monitors that are attached to Intel G35/G45
> chipsets with the following X.org intel driver patches
>
> [PATCH 1/3] introduce i830_hdmi_priv.has_hdmi_sink
> [PATCH 2/3] enable Intel G45 integrated HDMI audio output
> [PATCH 3/3] enable Intel G35 SDVO HDMI audio output
>
> _and_ the corresponding ALSA patch posted at
> http://mailman.alsa-project.org/pipermail/alsa-devel/2008-November/012158.html
>
> The patches are tested OK on Intel DG45ID board, HP 2230s notebook and
> ASUS P5E-VM board.
Pushed xf86-video-intel patches. Thanks!
If you have HDMI output with intel graphics chips, you can test this now.
- alsa patch is within above mail, or get it from
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
- after loading snd_hda_intel, 'aplay -l' should give you a list of devices
that contains Intel HDMI device. Use that device for PCM. Current supports
G35/G45/GM45.
- build xf86-video-intel git master to enable HDMI audio within video driver.
>
> Since the HDMI audio requires both audio and video driver support to function
> well, I'd like to provide an overview here.
>
> 1) driver components:
> A) ALSA: audio driver (the above link)
> B) Xorg: audio output enabling (this patchset)
> C) Xorg: EDID/ELD information (patches to be submitted by Ma Ling)
>
> 2) summary of the feature sets:
> - basic 2-channel audio:
> (A) is required, (B) is mostly required, (C) is not needed
> - 2+ multichannel audio:
> not tested yet; in theory we need (C) to get HDMI monitor's
> speaker allocation configuration; there are also bandwidth
> constraints that should be coordinated between audio/video
> drivers in the future.
> - non-LPCM audio:
> not tested yet; need more work in ALSA code.
>
> 3) summary of the work flow:
> - basic audio output: (A) and (B)
> - ALSA HDMI driver: enable pin out and unmute
> - ALSA HDMI driver: fill audio infoframe and enable its transmission
> - Xorg intel driver: enable audio output
> - ELD info for advanced audio capabilities: (A) and (C)
> - Xorg xserver: get/parse/store EDID extensions
> - Xorg xserver: transform EDID into ELD
> - Xorg intel driver: feed ELD to hardware
> - Xorg intel driver: set ELD-Valid flag to inform audio driver of new ELD
> - ALSA HDMI driver: response to unsolicited response triggered by ELDV
> - ALSA HDMI driver: get ELD from hardware
> - ALSA HDMI driver: parse and show ELD info
> - ALSA HDMI driver: update hardware capabilities/constraints
> according to ELD (TBD)
>
> That describes my understandings of HDMI audio, comments and discussions are
> warmly welcome.
>
> Thank you,
> Fengguang
> --
--
Open Source Technology Center, Intel ltd.
$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
[-- Attachment #2: Type: text/plain, Size: 143 bytes --]
_______________________________________________
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg
^ permalink raw reply [flat|nested] 7+ messages in thread