Commit Graph

15 Commits (03284c8f23440479de79e8cbf368085ea872884e)

Author SHA1 Message Date
Wu Fengguang 03284c8f23 ALSA: hda - make HDMI messages more user friendly
- make some messages more user friendly
- add message prefix "HDMI:" to indicate the problem's domain
  (also easier to do `dmesg | grep HDMI` ;-)

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-22 11:14:48 +01:00
Wu Fengguang cc02b83c90 ALSA: hda - report selected CA index for Audio InfoFrame
Print some CA selecting info, which could be valuable for debugging when
something goes wrong.

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-22 11:14:32 +01:00
Wu Fengguang b83923a393 ALSA: hda - minor HDMI code cleanups
Some minor code cleanups.

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-22 11:14:18 +01:00
Takashi Iwai f208dba97f ALSA: hda - Release ELD proc file
Release ELD proc file when reconfigured so that no leak occurs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-21 09:17:30 +01:00
Wu Fengguang 5b87ebb7a7 ALSA: hda: rename sink_eld to hdmi_eld
Rename struct sink_eld to hdmi_eld.

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-19 09:42:07 +01:00
Wu Fengguang 4e19c58f27 ALSA: hda: minor code cleanups
Some minor code cleanups.

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-19 09:41:59 +01:00
Wu Fengguang 9c8641e8ee ALSA: hda: HDMI channel mapping cleanups
Refactor the channel mapping code for consistent naming
and make it more informed about channel allocations.

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-19 07:35:44 +01:00
Wu Fengguang 698544de8a ALSA: hda: HDMI channel allocations for audio infoframe
To play a 3+ channels LPCM/DSD stream via HDMI,

	- HDMI sink must tell HDMI source about its speaker placements
	  (via ELD, speaker-allocation field)
	- HDMI source must tell the HDMI sink about channel allocation
	  (via audio infoframe, channel-allocation field)

(related docs: HDMI 1.3a spec section 7.4, CEA-861-D section 7.5.3 and 6.6)

This patch attempts to set the CA(channel-allocation) byte in the audio infoframe
according to
	- the number of channels in the current stream
	- the speakers attached to the HDMI sink

A channel_allocations[] line must meet the following two criteria to be
considered as a valid candidate for CA:
	1) its number of allocated channels = substream->runtime->channels
	2) its speakers are a subset of the available ones on the sink side

If there are multiple candidates, the first one is selected.  This simple
policy shall cheat the sink into playing music, but may direct data to the
wrong speakers.

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-19 07:35:36 +01:00
Wu Fengguang 5457a98039 ALSA: hda: make standalone hdmi_fill_audio_infoframe()
code refactor: make a standalone function hdmi_fill_audio_infoframe().

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-19 07:35:21 +01:00
Wu Fengguang 5f1e71b1cc ALSA: ELD proc interface for HDMI sinks
Create /proc/asound/card<card_no>/eld#<codec_no> to reflect the audio
configurations and capabilities of the attached HDMI sink.

Some notes:

- Shall we show an empty file if the ELD content is not valid?
  Well it's not that simple. There could be partially populated ELD,
  and there may be malformed ELD provided by buggy drivers/monitors.
  So expose ELD as it is.

- The ELD retrieval routines rely on the Intel HDA interface,
  others are/could be universal and independent ones.

- How do we name the proc file?
  If there are going to be two HDMI pins per codec, then the current naming
  scheme (eld#<codec no>) will fail. Luckily the user space dependencies should
  be minimal, so it would be trivial to do the rename if that happens.

- The ELD proc file content is designed to be easy for scripts and human reading.
  Its lines all have the pattern:
	  <item_name>\t[\t]*<item_value>
  where <item_name> is a keyword in c language, while <item_value> could be any
  contents, including white spaces. <item_value> could also be a null value.

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-18 07:39:12 +01:00
Wu Fengguang 7f4a9f4342 ALSA: create hda_eld.c for ELD routines and proc interface
ELD handling routines can be shared by all HDMI codecs,
and they are large enough to make a standalone source file.

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-18 07:39:03 +01:00
Wu Fengguang 796359d150 ALSA: hda-intel: reorder HDMI audio enabling sequence
Reorder HDMI audio enabling sequence so that
	1) the sink knows about the coming audio stream
	2) unmute
	3) start transferring audio samples

The theory is that in the path A=>B=>C, we first make C ready, and then
enable B, and lastly allow A to send audio samples.

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-17 10:03:41 +01:00
Wu Fengguang 3a95cb972b ALSA: handle SiI1392 HDMI codec in patch_intelhdmi.c
Move the handling of SiI1392 HDMI codec from patch_atihdmi.c to
patch_intelhdmi.c, which makes our ASUS P5E-VM HDMI board work.

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-13 07:55:40 +01:00
Takashi Iwai beb0b9cf78 ALSA: hda - Fix unused function in patch_intelhdmi.c
Add a proper ifdef to shut out a compile warning:
   CC [M]  sound/pci/hda/patch_intelhdmi.o
sound/pci/hda/patch_intelhdmi.c:286: warning: ‘hdmi_get_dip_index’ defined but \
not used

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-05 07:58:25 +01:00
Wu, Fengguang 91504877c5 ALSA: hda - Intel HDMI audio support
Add support for Intel G45 integrated HDMI audio codecs.

This initial release supports:
	- 2 channel stereo sound output
	- report monitor's ELD information

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-05 07:54:03 +01:00