Commit Graph

110635 Commits

Author SHA1 Message Date
Takashi Iwai c70bfa8733 Merge branch 'topic/fix/hda' into topic/hda 2008-11-21 18:02:57 +01:00
Takashi Iwai d6752a532c ALSA: hda - mark Dell studio 1535 quirk
Fixed the quirk string for Dell studio 1535 (the product name wasn't
published at the time the patch was made).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-21 18:01:44 +01:00
Hannes Eder 42e81c991a ALSA: hda - fix sparse warning
Fix the following sparse warning:

sound/pci/hda/patch_nvhdmi.c:161:25: warning: symbol
'snd_hda_preset_nvhdmi' was not declared. Should it be static?

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-21 16:05:16 +01:00
Takashi Iwai 11b444d562 ALSA: hda - Move HD-audio Kconfig items to sound/pci/hda/Kconfig
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-21 09:32:40 +01:00
Takashi Iwai e7ee058cac ALSA: hda - Make CONFIG_SND_HDA_RECONFIG for codec reconfiguration
Make the codec re-configuration feature selectable via Kconfig,
CONFIG_SND_HDA_RECONFIG.
Also mark it as experimental (as it really is).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-21 09:26:20 +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
Takashi Iwai b94d3539de ALSA: hda - Fix double free of jack instances
The jack instances created in patch_sigmatel.c may be double-freed.
The device management code checks the invalid element, and thus there
is no real breakage, but it spews annoying warning messages.
But, we can't simply remove the release calls of these jack instances
because they have to be freed when the codec is re-configured.

Now, a new flag, bus->shutdown is introduced to indicate that the bus
is really being unloaded, i.e. the objects managed by the device
manager will be automatically deleted.  We release these objects only
when this flag isn't set.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-21 09:08:06 +01:00
Takashi Iwai 0623536ca3 ALSA: hda - Add missing static for snd_hda_eld_proc_new() inline funciton
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-21 08:54:54 +01:00
Takashi Iwai b0fc5e0434 ALSA: hda - Add a quirk for Dell Studio 15
Added the matching model=dell-m6 for Dell Studio 15 laptop.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-21 08:37:03 +01:00
Wu Fengguang acdda7915e ALSA: hda - support writing to the ELD proc file
Allow users to fix quicks of ELD ROMs by writing new values to the ELD proc
interface. The format is one or more lines of "name hex_value".

Users can add/remove/modify up to 32 SAD(Short Audio Descriptor) entries.

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-21 08:27:49 +01:00
Wu Fengguang db74210470 ALSA: hda: modify monitor name to be consistent with other ELD proc items
Rename "monitor name" to "monitor_name" to conform with the keyword style.

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-21 08:27:44 +01:00
Wu Fengguang 218b5ffc0d ALSA: hda - properly print ELD sample bits
Fix bugs on printing the ELD sample bits.

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-21 08:27:30 +01:00
Takashi Iwai 75a287d9a3 Merge branch 'topic/fix/hda' into topic/hda
Conflicts:
	sound/pci/hda/patch_sigmatel.c
2008-11-21 08:27:04 +01:00
Matthew Ranostay 3a7abfd2ba ALSA: hda: Add STAC_DELL_M4_3 quirk
Added STAC_DELL_M4_3 quirk for Dell systems, also reorganized the
board config switch to assign number of digital muxes, microphones,
and SPDIF muxes via the PCI quirk defined.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-21 08:17:00 +01:00
Takashi Iwai 1725b82a6e ALSA: hda - make laptop-eapd model back for AD1986A
The changes specific for Samsung laptops seem unapplicable to other
hardware models like ASUS.  The mic inputs are lost on such hardware
by the change 5d5d5f43f1.

This patch adds back the old laptop-eapd model, and create a new
model "samsung" for the new one specific to Samsung laptops with
automatic mic selection feature.

Reference: kernel bugzilla #12070
	http://bugzilla.kernel.org/show_bug.cgi?id=12070

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-21 02:25:48 +01:00
Matthew Ranostay 0253fdcd8a ALSA: hda: STAC_DELL_M6 EAPD
Add support for EAPD on system suspend and disabling EAPD on headphone jack
detection for STAC_DELL_M6 laptops.

This patch fixes the regressions, the silent output on HP of some Dell
laptops (see Novell bnc#446025):
	https://bugzilla.novell.com/show_bug.cgi?id=446025

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-20 17:11:10 +01:00
Vincent Petry 5b2d1ecac2 ALSA: hda: Added Realtek ALC888 model entry for Acer Aspire 4930G laptop
Added Realtek ALC888 model entry for the Acer Aspire 4930G laptop that
fixes the following features:
- internal microphone
- heaphone jack sense
- channel mode

Signed-off-by: Vincent Petry <PVince81@yahoo.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-20 08:22:24 +01:00
Wu Fengguang 41dda0fdd2 ALSA: azx_probe() cleanup
Replace 5 free-and-return-err blocks with goto-out-free ones.
This makes the main logic more outstanding.

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-20 08:17:15 +01:00
Takashi Iwai 8563964617 ALSA: hda - Show missing GPIO unsol bits
The GPIO unsolicited event bits are read but not shown in the proc file.
Let's fix it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-19 14:14:50 +01:00
Wu Fengguang ae8cb4caa3 ALSA: hda: compact ELD output messages
Strip out some ELD printk messages that end user won't care,
and make the output compact.

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-19 09:42:38 +01:00
Wu Fengguang d39b4352f2 ALSA: hda: make global snd_print_pcm_bits()
Introduce a global function snd_print_pcm_bits() and use it in the ELD code.

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-19 09:42:30 +01:00
Wu Fengguang 06f69d17a9 ALSA: hda: minor output message cleanups
Some minor user visible message cleanups.

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-19 09:42:21 +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
Matthew Ranostay c6798d2bd1 ALSA: hda: EAPD mute on suspend
Moved support for EAPD mute on suspend from stac92hd71xx_suspend
to the generic stac92xx_suspend function.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-19 07:37:23 +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 903b21d8b7 ALSA: hda: make global snd_print_channel_allocation()
code refactor: make a global function snd_print_channel_allocation().

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-19 07:35:28 +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
Takashi Iwai cd896c331d ALSA: hda - Allow multiple imux for matrix-type mixers of ALC codecs
Allow the multiple imux instances for matrix-type mixers like ALC882.
So far, only ALC260 used this feature, but other codecs may need a
similar stuff.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-18 12:36:33 +01:00
Takashi Iwai a581780aa1 Merge branch 'topic/fix/hda' into topic/hda 2008-11-18 10:57:07 +01:00
Takashi Iwai c5d08bb567 ALSA: hda - Fix resume of GPIO unsol event for STAC/IDT
Use cached write for setting the GPIO unsolicited event mask to be
restored properly at resume.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-18 10:55:36 +01:00
Takashi Iwai 80bf272468 ALSA: hda - Add quirks for HP Pavilion DV models
Added the quirk entries for HP Pavilion DV5 and DV7 with model=hp-m4.

Reference: Novell bnc#445321, bnc#445161
	https://bugzilla.novell.com/show_bug.cgi?id=445321
	https://bugzilla.novell.com/show_bug.cgi?id=445161

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-18 10:48:41 +01:00
Takashi Iwai 41c3b648bd ALSA: hda - Fix GPIO initialization in patch_stac92hd71bxx()
Fixed the GPIO mask and co initialization in patch_stac92hd71bxx()
so that the gpio_maks for HP_M4 model is set properly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-18 10:45:15 +01:00
Takashi Iwai af9f341a94 ALSA: hda - Fix restore of pin configs at resume for STAC/IDT codecs
Fixed the restore of pin configs at resume for some STAC/IDT codec
models.  These models set explicitly the pin configs after the default
init configs, and these aren't restored properly at resume.

This patch introduces two changes:
- Allocate always pin_configs array in stac_spec so that the driver
  can overwrite the value freely
- Introduce stac_change_pin_config() to change the pin config value

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-18 10:42:00 +01:00
Takashi Iwai 2c885878c1 ALSA: hda - Use init callback in stac92xx_resume()
Call the init callback and remove duplicated codes in stac92xx_resume().
This also fixes the missing initialization such as digital I/O pins.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-18 09:43:10 +01:00
Takashi Iwai e4973e1e5a ALSA: hda - Create jack detection elements in build_controls
The jack detection input elements should be created in build_controls
callback instead of init callback because init can be called multiple
times by suspend/resume and power-saving.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-18 09:43:05 +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 33deeca3bb ALSA: introduce snd_print_pcm_rates()
We want to share some code with print_pcm_rates(),
so extract a common routine snd_print_pcm_rates() from it.

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-18 07:38:51 +01:00
Wu Fengguang 2eca83ba9c ALSA: hda: remove redundant get_amp_nid()
Remove get_amp_nid(): it duplicates the one defined in hda_local.h

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-18 07:38:28 +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
Matthew Ranostay c0cea0d09d ALSA: hda: STAC_DELL_M6 EAPD
Add support for EAPD on system suspend and disabling EAPD on headphone jack
detection for STAC_DELL_M6 laptops.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-17 09:56:35 +01:00
Wu Fengguang 3ab909351a ALSA: hda: alc883 model for ASUS P5Q-EM boards
Add a new alc883 model ALC1200_ASUS_P5Q for ASUS P5Q-EM boards.
It is the same as ALC883_6ST_DIG except that the SPDIF digital
output nid is 0x10.

Tested-by: Andrei Tanas <andrei@tanas.ca>
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-17 09:51:09 +01:00
Takashi Iwai 8e5f262bfc ALSA: hda - Check model type instead of SSID in patch_92hd71bxx()
Check board preset model instead of codec->subsystem_id in
patch_92hd71bxx() so that other hardwares configured via the model
option work like the given model.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-15 19:28:54 +01:00
Takashi Iwai e2da9ba570 Merge branch 'topic/fix/hda' into topic/hda
Conflicts:
	sound/pci/hda/patch_sigmatel.c
2008-11-15 19:05:21 +01:00
Matthew Ranostay c39555d6ed ALSA: hda: STAC_VREF_EVENT value change
Changed value for STAC_VREF_EVENT from 0x40 to 0x00 because the
unsol response value is only 6-bits width and the former value
was 1<<6 which is an overrun.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-15 19:04:26 +01:00
Takashi Iwai 127e82e3bf ALSA: hda - Support Headphone and Speaker volumes control on VAIO
Split the bound Master control to individual Headphone and Speaker
volume controls for VAIO with STAC982x codecs.
The Master controls is still created as a vmaster.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-14 14:03:33 +01:00
Takashi Iwai cd80bc6f48 Merge branch 'topic/fix/hda' into topic/hda
Conflicts:
	sound/pci/hda/patch_sigmatel.c
2008-11-13 14:38:00 +01:00
Takashi Iwai 6a12afb564 ALSA: hda - Missing NULL check in hda_beep.c
Added a NULL check of input_allocate_device() in hda_beep.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-13 14:37:16 +01:00