Re: [Intel-gfx] [PATCH v5 0/4] Haswell HDMI/DP audio enable

2012-08-08 Thread Paul Menzel
Dear Wang,


first is Wang your first name?

Am Mittwoch, den 08.08.2012, 11:03 +0800 schrieb Wang Xingchao:
 This patch series enable HDMI audio on Haswell platform, not DP audio.
 The DP enablement will come after the DP patches are upstream.
 
 I tested this patch on Sharkbay machine and i could hear clear sound from
 HDMI port.

Could you please add if that was a TV or a receiver?

 V2 patches fixed one warning and some type errors.
 
 V3 patches changes:
 - change some registers definitions
 - use macro for IBX/CPT/HSW to get registers
 - remove some unused variable intended to use in TODO list.
 
 v4 patches changes:
 - remove alsa related hack patch
 
 v5 patches changes:
 - change comments stype
 - split IBX/CTP registers patch into seperate one

• sep*a*rate

 - remove unused register definition
 
 Here're some notes useful for you to test the patches on Sharkbay machine:
 I please make sure your branch include below three commits in Takashi's 
 sound tree, othersiwe there's no proper Haswell ID and HDMI ID.  

• White space at the end.
• other*wise*

 For the upstream tree, please refer to sound git tree
 
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
 You can just pull for-linus branch.
 The all commits above are found in 3.6-rc1.
 
 e926f2c850c472f813f9bab486c68a3fe0b03ae4
 1c76684d2752b3a24bb7da183cc18e5d126dbcc9
 bdbe34dece4942f4d8df9865dba7785bb813366a
 
 II No sound from HDMI/DP.
 we found it's not stable in current stage, sometimes you may not heard sound
 from HDMI or DP port, but most of the time you can heard clear sound. After
 some investigation, we suspect the HDA verb didnot really make codec 

did not

 change,and we regard the GPU register as the right one. (see III explanation)
 the easy way is to use intel_audio_dump to compare related registers, and make
 sure the port is enabled and unmute, otherwise there's no sound.
 intel_audio_tools has no support on Haswell yet, i wrote patches to make that
 happen, if you need the patches, please feel free to let me know. Here's part
 of the snapshot about port enable and mute status from intel_audio_dump:
 
 AUD_PORT_EN_HD_CFG  Port_B_Out_Enable 1
 AUD_PORT_EN_HD_CFG  Port_C_Out_Enable 1
 AUD_PORT_EN_HD_CFG  Port_D_Out_Enable 1
 AUD_PORT_EN_HD_CFG  Port_B_Amp_Mute_Status1
 AUD_PORT_EN_HD_CFG  Port_C_Amp_Mute_Status0
 AUD_PORT_EN_HD_CFG  Port_D_Amp_Mute_Status1
 
 you can see from above message, the Port C is enabled and unmute, that's what
 we expect.
 
 III HDA Codec dependency. When you found there's no sound from HDMI, please
 use intel_audio_dump to check Port enable/mute status in II and also check
 related Pipe/Transcoder/DDI port status. Sometimes the pipe and transcoder was
 disabled in dpms and will not work anymore, that results in the HDMI port no
 sound. HDA codec's three converters are somehow hardwired to audio Pipes and
 if you choose the pipe, that means the regarding Codec converter should be
 enabled too, and only one digital Pin's HDA verbs could work, that depends on
 whehter your Pin select the converter as input. Here's one example about the

whe*th*er

 Pipe/Transcoder/DDI port(Pipe B, DDI Port C):
 
 DDI_BUF_CTL_A 0x0080  DDI Buffer Controler A
 DDI_BUF_CTL_B 0x  DDI Buffer Controler B
 DDI_BUF_CTL_C 0x8000  DDI Buffer Controler C
 DDI_BUF_CTL_D 0x  DDI Buffer Controler D
 DDI_BUF_CTL_E 0x8002  DDI Buffer Controler E
 PIPE_CONF_A   0xc000  PIPE Configuration A
 PIPE_CONF_B   0xc000  PIPE Configuration B
 PIPE_CONF_C   0x  PIPE Configuration C
 PIPE_CONF_EDP 0x  PIPE Configuration EDP
 PIPE_DDI_FUNC_CTL_A   0xc4034002  PIPE DDI Function Control A
 PIPE_DDI_FUNC_CTL_B   0xa0035000  PIPE DDI Function Control B
 PIPE_DDI_FUNC_CTL_C   0x0003  PIPE DDI Function Control C
 PIPE_DDI_FUNC_CTL_EDP 0x0003  PIPE DDI Function Control EDP
 
 Wang Xingchao (3):

The line above should be removed.

 Wang Xingchao (4):
   drm/i915: HSW audio registers definition
   drm/i915: write eld info for HDMI audio
   drm/i915: Haswell HDMI audio enable
   drm/i915: use _PIPE macro for IBX/CPT register definition
 
  drivers/gpu/drm/i915/i915_reg.h  |   71 
 ++
  drivers/gpu/drm/i915/intel_ddi.c |6 ++-
  drivers/gpu/drm/i915/intel_display.c |   52 -
  3 files changed, 118 insertions(+), 11 deletions(-)


Thanks,

Paul


signature.asc
Description: This is a digitally signed message part
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH v5 0/4] Haswell HDMI/DP audio enable

2012-08-08 Thread Wang, Xingchao


 -Original Message-
 From: Paul Menzel [mailto:paulepan...@users.sourceforge.net]
 Sent: Wednesday, August 08, 2012 3:15 PM
 To: Wang, Xingchao
 Cc: intel-gfx@lists.freedesktop.org; ti...@suse.de; Fu, Michael; Wu,
 Fengguang
 Subject: Re: [Intel-gfx] [PATCH v5 0/4] Haswell HDMI/DP audio enable
 
 Dear Wang,
 
 
 first is Wang your first name?
 
Yes. :)

 Am Mittwoch, den 08.08.2012, 11:03 +0800 schrieb Wang Xingchao:
  This patch series enable HDMI audio on Haswell platform, not DP audio.
  The DP enablement will come after the DP patches are upstream.
 
  I tested this patch on Sharkbay machine and i could hear clear sound
  from HDMI port.
 
 Could you please add if that was a TV or a receiver?
 

I tested the patch on Haswell Based Machine with a monitor hasing HDMI ports, 
this is the eld information from the monitor:
cat /proc/asound/card0/eld#0.*
monitor_present 0
eld_valid   0
monitor_present 1
eld_valid   1
monitor_nameDELL 2408WFP
connection_type HDMI
eld_version [0x2] CEA-861D or below
edid_version[0x3] CEA-861-B, C or D
manufacture_id  0xac10
product_id  0xa02c
port_id 0x0
support_hdcp0
support_ai  1
audio_sync_delay0
speakers[0x1] FL/FR
sad_count   1
sad0_coding_type[0x1] LPCM
sad0_channels   2
sad0_rates  [0xe0] 32000 44100 48000
sad0_bits   [0xe] 16 20 24
monitor_present 0
eld_valid   0

  V2 patches fixed one warning and some type errors.
 
  V3 patches changes:
  - change some registers definitions
  - use macro for IBX/CPT/HSW to get registers
  - remove some unused variable intended to use in TODO list.
 
  v4 patches changes:
  - remove alsa related hack patch
 
  v5 patches changes:
  - change comments stype
  - split IBX/CTP registers patch into seperate one
 
 • sep*a*rate
 
  - remove unused register definition
 
  Here're some notes useful for you to test the patches on Sharkbay machine:
  I please make sure your branch include below three commits in
  I Takashi's
  sound tree, othersiwe there's no proper Haswell ID and HDMI ID.
 
 • White space at the end.
 • other*wise*
 
  For the upstream tree, please refer to sound git tree
 
 git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
  You can just pull for-linus branch.
  The all commits above are found in 3.6-rc1.
 
  e926f2c850c472f813f9bab486c68a3fe0b03ae4
  1c76684d2752b3a24bb7da183cc18e5d126dbcc9
  bdbe34dece4942f4d8df9865dba7785bb813366a
 
  II No sound from HDMI/DP.
  we found it's not stable in current stage, sometimes you may not heard
  sound from HDMI or DP port, but most of the time you can heard clear
  sound. After some investigation, we suspect the HDA verb didnot really
  make codec
 
 did not
 
  change,and we regard the GPU register as the right one. (see III
  explanation) the easy way is to use intel_audio_dump to compare
  related registers, and make sure the port is enabled and unmute, otherwise
 there's no sound.
  intel_audio_tools has no support on Haswell yet, i wrote patches to
  make that happen, if you need the patches, please feel free to let me
  know. Here's part of the snapshot about port enable and mute status from
 intel_audio_dump:
 
  AUD_PORT_EN_HD_CFG  Port_B_Out_Enable   1
  AUD_PORT_EN_HD_CFG  Port_C_Out_Enable   1
  AUD_PORT_EN_HD_CFG  Port_D_Out_Enable   1
  AUD_PORT_EN_HD_CFG  Port_B_Amp_Mute_Status  1
  AUD_PORT_EN_HD_CFG  Port_C_Amp_Mute_Status  0
  AUD_PORT_EN_HD_CFG  Port_D_Amp_Mute_Status  1
 
  you can see from above message, the Port C is enabled and unmute,
  that's what we expect.
 
  III HDA Codec dependency. When you found there's no sound from HDMI,
  III please
  use intel_audio_dump to check Port enable/mute status in II and also
  check related Pipe/Transcoder/DDI port status. Sometimes the pipe and
  transcoder was disabled in dpms and will not work anymore, that
  results in the HDMI port no sound. HDA codec's three converters are
  somehow hardwired to audio Pipes and if you choose the pipe, that
  means the regarding Codec converter should be enabled too, and only
  one digital Pin's HDA verbs could work, that depends on whehter your
  Pin select the converter as input. Here's one example about the
 
 whe*th*er
 
  Pipe/Transcoder/DDI port(Pipe B, DDI Port C):
 
  DDI_BUF_CTL_A 0x0080  DDI Buffer Controler A
  DDI_BUF_CTL_B 0x  DDI Buffer Controler B
  DDI_BUF_CTL_C 0x8000  DDI Buffer Controler C
  DDI_BUF_CTL_D 0x  DDI Buffer Controler D
  DDI_BUF_CTL_E 0x8002  DDI Buffer Controler E
  PIPE_CONF_A   0xc000  PIPE Configuration A
  PIPE_CONF_B   0xc000  PIPE Configuration B
  PIPE_CONF_C   0x  PIPE Configuration C

[Intel-gfx] [PATCH v5 0/4] Haswell HDMI/DP audio enable

2012-08-07 Thread Wang Xingchao
This patch series enable HDMI audio on Haswell platform, not DP audio.
The DP enablement will come after the DP patches are upstream.

I tested this patch on Sharkbay machine and i could hear clear sound from
HDMI port.

V2 patches fixed one warning and some type errors.

V3 patches changes:
- change some registers definitions
- use macro for IBX/CPT/HSW to get registers
- remove some unused variable intended to use in TODO list.

v4 patches changes:
- remove alsa related hack patch

v5 patches changes:
- change comments stype
- split IBX/CTP registers patch into seperate one
- remove unused register definition

Here're some notes useful for you to test the patches on Sharkbay machine:
I please make sure your branch include below three commits in Takashi's 
sound tree, othersiwe there's no proper Haswell ID and HDMI ID.  

For the upstream tree, please refer to sound git tree

   git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
You can just pull for-linus branch.
The all commits above are found in 3.6-rc1.

e926f2c850c472f813f9bab486c68a3fe0b03ae4
1c76684d2752b3a24bb7da183cc18e5d126dbcc9
bdbe34dece4942f4d8df9865dba7785bb813366a

II No sound from HDMI/DP.
we found it's not stable in current stage, sometimes you may not heard sound
from HDMI or DP port, but most of the time you can heard clear sound. After
some investigation, we suspect the HDA verb didnot really make codec 
change,and we regard the GPU register as the right one. (see III explanation)
the easy way is to use intel_audio_dump to compare related registers, and make
sure the port is enabled and unmute, otherwise there's no sound.
intel_audio_tools has no support on Haswell yet, i wrote patches to make that
happen, if you need the patches, please feel free to let me know. Here's part
of the snapshot about port enable and mute status from intel_audio_dump:

AUD_PORT_EN_HD_CFG  Port_B_Out_Enable   1
AUD_PORT_EN_HD_CFG  Port_C_Out_Enable   1
AUD_PORT_EN_HD_CFG  Port_D_Out_Enable   1
AUD_PORT_EN_HD_CFG  Port_B_Amp_Mute_Status  1
AUD_PORT_EN_HD_CFG  Port_C_Amp_Mute_Status  0
AUD_PORT_EN_HD_CFG  Port_D_Amp_Mute_Status  1

you can see from above message, the Port C is enabled and unmute, that's what
we expect.

III HDA Codec dependency. When you found there's no sound from HDMI, please
use intel_audio_dump to check Port enable/mute status in II and also check
related Pipe/Transcoder/DDI port status. Sometimes the pipe and transcoder was
disabled in dpms and will not work anymore, that results in the HDMI port no
sound. HDA codec's three converters are somehow hardwired to audio Pipes and
if you choose the pipe, that means the regarding Codec converter should be
enabled too, and only one digital Pin's HDA verbs could work, that depends on
whehter your Pin select the converter as input. Here's one example about the
Pipe/Transcoder/DDI port(Pipe B, DDI Port C):

DDI_BUF_CTL_A 0x0080  DDI Buffer Controler A
DDI_BUF_CTL_B 0x  DDI Buffer Controler B
DDI_BUF_CTL_C 0x8000  DDI Buffer Controler C
DDI_BUF_CTL_D 0x  DDI Buffer Controler D
DDI_BUF_CTL_E 0x8002  DDI Buffer Controler E
PIPE_CONF_A   0xc000  PIPE Configuration A
PIPE_CONF_B   0xc000  PIPE Configuration B
PIPE_CONF_C   0x  PIPE Configuration C
PIPE_CONF_EDP 0x  PIPE Configuration EDP
PIPE_DDI_FUNC_CTL_A   0xc4034002  PIPE DDI Function Control A
PIPE_DDI_FUNC_CTL_B   0xa0035000  PIPE DDI Function Control B
PIPE_DDI_FUNC_CTL_C   0x0003  PIPE DDI Function Control C
PIPE_DDI_FUNC_CTL_EDP 0x0003  PIPE DDI Function Control EDP

Wang Xingchao (3):

Wang Xingchao (4):
  drm/i915: HSW audio registers definition
  drm/i915: write eld info for HDMI audio
  drm/i915: Haswell HDMI audio enable
  drm/i915: use _PIPE macro for IBX/CPT register definition

 drivers/gpu/drm/i915/i915_reg.h  |   71 ++
 drivers/gpu/drm/i915/intel_ddi.c |6 ++-
 drivers/gpu/drm/i915/intel_display.c |   52 -
 3 files changed, 118 insertions(+), 11 deletions(-)

-- 
1.7.9.5

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH v5 0/4] Haswell HDMI/DP audio enable

2012-08-07 Thread Wang Xingchao
This patch series enable HDMI audio on Haswell platform, not DP audio.
The DP enablement will come after the DP patches are upstream.

I tested this patch on Sharkbay machine and i could hear clear sound from
HDMI port.

V2 patches fixed one warning and some type errors.

V3 patches changes:
- change some registers definitions
- use macro for IBX/CPT/HSW to get registers
- remove some unused variable intended to use in TODO list.

v4 patches changes:
- remove alsa related hack patch

v5 patches changes:
- change comments stype
- split IBX/CTP registers patch into seperate one
- remove unused register definition

Here're some notes useful for you to test the patches on Sharkbay machine:
I please make sure your branch include below three patches in Takashi's 
sound tree, othersiwe there's no proper Haswell ID and HDMI ID.  
http://git.alsa-project.org/?p=alsa-kmirror.git;a=commitdiff;h=79fc901301d6115b11457e8240ed6abc4b3f5c65
http://git.alsa-project.org/?p=alsa-kmirror.git;a=commitdiff;h=e269cee227a2b2297b79bfc71094c709b9387061
http://git.alsa-project.org/?p=alsa-kmirror.git;a=commitdiff;h=cb192625233496ac3d96cce667ebf4e322dab678

II No sound from HDMI/DP.
we found it's not stable in current stage, sometimes you may not heard sound
from HDMI or DP port, but most of the time you can heard clear sound. After
some investigation, we suspect the HDA verb didnot really make codec 
change,and we regard the GPU register as the right one. (see III explanation)
the easy way is to use intel_audio_dump to compare related registers, and make
sure the port is enabled and unmute, otherwise there's no sound.
intel_audio_tools has no support on Haswell yet, i wrote patches to make that
happen, if you need the patches, please feel free to let me know. Here's part
of the snapshot about port enable and mute status from intel_audio_dump:

AUD_PORT_EN_HD_CFG  Port_B_Out_Enable   1
AUD_PORT_EN_HD_CFG  Port_C_Out_Enable   1
AUD_PORT_EN_HD_CFG  Port_D_Out_Enable   1
AUD_PORT_EN_HD_CFG  Port_B_Amp_Mute_Status  1
AUD_PORT_EN_HD_CFG  Port_C_Amp_Mute_Status  0
AUD_PORT_EN_HD_CFG  Port_D_Amp_Mute_Status  1

you can see from above message, the Port C is enabled and unmute, that's what
we expect.

III HDA Codec dependency. When you found there's no sound from HDMI, please
use intel_audio_dump to check Port enable/mute status in II and also check
related Pipe/Transcoder/DDI port status. Sometimes the pipe and transcoder was
disabled in dpms and will not work anymore, that results in the HDMI port no
sound. HDA codec's three converters are somehow hardwired to audio Pipes and
if you choose the pipe, that means the regarding Codec converter should be
enabled too, and only one digital Pin's HDA verbs could work, that depends on
whehter your Pin select the converter as input. Here's one example about the
Pipe/Transcoder/DDI port(Pipe B, DDI Port C):

DDI_BUF_CTL_A 0x0080  DDI Buffer Controler A
DDI_BUF_CTL_B 0x  DDI Buffer Controler B
DDI_BUF_CTL_C 0x8000  DDI Buffer Controler C
DDI_BUF_CTL_D 0x  DDI Buffer Controler D
DDI_BUF_CTL_E 0x8002  DDI Buffer Controler E
PIPE_CONF_A   0xc000  PIPE Configuration A
PIPE_CONF_B   0xc000  PIPE Configuration B
PIPE_CONF_C   0x  PIPE Configuration C
PIPE_CONF_EDP 0x  PIPE Configuration EDP
PIPE_DDI_FUNC_CTL_A   0xc4034002  PIPE DDI Function Control A
PIPE_DDI_FUNC_CTL_B   0xa0035000  PIPE DDI Function Control B
PIPE_DDI_FUNC_CTL_C   0x0003  PIPE DDI Function Control C
PIPE_DDI_FUNC_CTL_EDP 0x0003  PIPE DDI Function Control EDP

Wang Xingchao (3):

Wang Xingchao (4):
  drm/i915: HSW audio registers definition
  drm/i915: write eld info for HDMI audio
  drm/i915: Haswell HDMI audio enable
  drm/i915: use _PIPE macro for IBX/CPT register definition

 drivers/gpu/drm/i915/i915_reg.h  |   71 ++
 drivers/gpu/drm/i915/intel_ddi.c |6 ++-
 drivers/gpu/drm/i915/intel_display.c |   52 -
 3 files changed, 118 insertions(+), 11 deletions(-)

-- 
1.7.9.5

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx