dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

2267 Commits

Author SHA1 Message Date
Andres Salomon d6276b7802 ALSA: cs5535audio: create function for setting OLPC's Analog Input mode
Clean this stuff up a bit..

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-10 17:14:42 +01:00
Andres Salomon 1e2232bc70 ALSA: cs5535audio: decouple HPF from V_REFOUT in OLPC code
We shouldn't be touching V_REFOUT when we toggle HPF/analog input, so just
drop that code.

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-10 17:14:42 +01:00
Andres Salomon b91254e75c ALSA: cs5535audio: drop ec_analog_input flag for OLPC stuff
This is no longer necessary, as we're no longer doing indexed i/o commands.

Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-12-10 17:14:41 +01:00
Andres Salomon 3556d18465 ALSA: cs5535audio: invert EAPD for OLPC (newer than B3)
Fix an audible pop described in <http://dev.laptop.org/ticket/977>.  Originally
based upon fixes by Mitch Bradley and Chris Ball.

Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-12-10 17:14:40 +01:00
Jordan Crouse c8974be546 ALSA: cs5535audio: Use OLPC/Geode basic infrastructure
Use basic infrastructure code; geode_gpio* (rather than indexed i/o
EC access), and do an OLPC machine check in olpc_quirk.

[dilinger@debian.org: don't return failure in olpc_quirks if !OLPC]
[dilinger@debian.org: drop the <B2 workarounds; those machines are EOL'd]

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-12-10 17:14:39 +01:00
Jaya Kumar 57d4bf6d8e ALSA: cs5535audio: OLPC analog input support
This is a 2nd cut at adding support for OLPC analog input.

Signed-off-by: Jaya Kumar <jayakumar.lkml@gmail.com>
Signed-off-by: Andres Salomon <dilinger@debian.org>
2008-12-10 17:14:39 +01:00
Andres Salomon b6c52a2cdb ALSA: cs5535audio: suspend/resume callbacks are only defined with CONFIG_PM
snd_cs5535audio_suspend and snd_cs5535audio_resume are only defined when
CONFIG_PM is set; make that clear in the header file.

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-10 17:14:38 +01:00
Jaya Kumar b035ce0f26 ALSA: cs5535audio: turn off PCM properly if closing the audio device
As per <http://dev.laptop.org/ticket/1420>, we need to properly turn off
the PCM if we're closing the device in order to save power.  This also
causes the MIC led to turn off properly.

Signed-off-by: Jaya Kumar <jayakumar.lkml@gmail.com>
Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-10 17:14:37 +01:00
Andres Salomon 0bed7b292d ALSA: cs5535audio: stick AD1888 bitshift values into a header file
We'd like to use the High Pass Filter and V_REFOUT bitshift values elsewhere,
so stick them into a ac97_codec.h.

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-10 17:14:36 +01:00
Takashi Iwai 11d518e07d ALSA: hda - Add quirk for HP6730B laptop
Added model=laptop for HP 6730B laptop with AD1984A codec.
Reference: Novell bnc#457909
	https://bugzilla.novell.com/show_bug.cgi?id=457909

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: stable@kernel.org
2008-12-10 10:39:17 +01:00
Takashi Iwai 44411e07c2 ALSA: ca0106 - Check return value of pci_enable_device() in resume
The return value of pci_enable_device() must be checked even in resume
callback:
  sound/pci/ca0106/ca0106_main.c:1779: warning: ignoring return value of ‘pci_enable_device’, declared with attribute warn_unused_result

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-10 08:30:40 +01:00
Rafael J. Wysocki 32e176c14d Sound: hda - Restore PCI configuration space with interrupts off
Move the restoration of the standard PCI configuration registers
in the snd_hda_intel driver to a ->resume_early() callback executed
with interrupts disabled, since doing that with interrupts enabled
may lead to problems in some cases.

This patch addresses the regression from 2.6.26 tracked as
http://bugzilla.kernel.org/show_bug.cgi?id=12121 .

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-07 10:45:32 +01:00
Takashi Iwai 12dde4c6d6 ALSA: hda - Proper power-map toggling for input pins
The current code overrides the event type on input pins always to
PWR_EVENT.  Although this still works (PWR_EVENT and INSERT_EVENT
are handled samely), it'd be better to avoid such overrides.

Also, currently the unsol events are registered even for fixed pins
which will never raise the pin-detection event.

This patch fixes both issues.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-05 13:09:27 +01:00
Takashi Iwai e6e3ea25b1 ALSA: hda - Fix pin-detection in patch_sigmatel.c
The pin-detection function used in patch_sigmatel.c shouldn't be specific
to HP pin because it's used for input pins in general, too.

This patch fixes the detection function, removes the HP check from it
and moves to stac92xx_hp_detect().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-05 12:54:56 +01:00
Takashi Iwai 5da95273c2 ALSA: ca0106 - Add power-management support
Added the missing PM support for snd-ca0106 driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-04 15:25:03 +01:00
Takashi Iwai 4151d154ef ALSA: hda - Add forgotten module alias for Nvidia MCP67 HDMI
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-04 07:49:15 +01:00
Scott Waye e5f7343568 ALSA: hda - Add MCP67 HDMI support
Added id for MCP67 HDMI codec.

Signed-off-by: Scott Waye <scott@waye.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-04 07:43:18 +01:00
Peter Gruber 0f620830db ALSA: Reduce stall detection timeout in riptide.c
Reduce the command timeout to 0.5sec. Should be enough to allow a
working command interface but removes a RCU stall and slow resume on
some revisions where the AC97 revision detection stalls in resume.

Signed-off-by: Peter Gruber <nokos@gmx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-03 15:49:42 +01:00
Takashi Iwai 0640f84fac Merge branch 'topic/hda-modularize' into topic/hda 2008-12-03 14:43:14 +01:00
Takashi Iwai 16950e09cf ALSA: emu10k1 - Add capture boost mixer switch for Audigy
Due to the conversion (drop) from 24bit in the DSP to 16bit in AC97,
the maximum capture level on Audigy seems lower than it could be.

This patch adds a workaround to enable the artificial capture boost
switch.  When this switch is on, the whole analog capature level is
boost up.  However, this results in the lower capture resolution.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-02 09:31:16 +01:00
Mark Brown 1966bbd62c ALSA: ac97 - Add WM9715 to AC97 IDs
The WM9715 is software compatible with the WM9711 and WM9712.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-01 15:59:32 +01:00
Markus Bollinger ade9b2fb9b ALSA: pcxhr - change firmware filenames
- compatibility issue : change firmware filenames
  the pcxhr driver version <= 1.0.18a does not work
  with new firmware > 1.0.17. Keep the old firmware files
  and add new firmware files with different names

Signed-off-by: Markus Bollinger <bollinger@digigram.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-01 15:31:06 +01:00
Takashi Iwai 480cf663e6 ALSA: Fix a compile warning in cs46xx_lib.c
Fix a build warning
  sound/pci/cs46xx/cs46xx_lib.c:3643: warning: unused variable ‘i’
when CONFIG_SND_CS46XX_NEW_DSP=n.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-01 15:28:07 +01:00
Takashi Iwai 8c2f767bf3 ALSA: hda - Remove unnecessary caches for power states in patch_sigmatel.c
The power-state changes in patch_sigmatel.c are accessed via *_cached()
but they shouldn't be really cached.  Fixed to the normal write.

Also, stac92hd71xx_suspend and resume are no longer necessary as the
power-state changes are handled properly in the common routine.
Removed these hacks now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-01 11:54:35 +01:00
Takashi Iwai c9b46f9144 ALSA: hda - Use amp cache for SPDIF mute controls in patch_sigmatel.c
The amp switch of SPDIF outputs have to be cached in the amp cache
instead of codec cache.  Otherwise it conflicts with the IEC958
playback switch control in hda_codec.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-01 11:52:25 +01:00
Mauro Carvalho Chehab 58eec4235d ALSA: hda - More fixes on Gateway entries
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-30 11:09:20 +01:00
Mauro Carvalho Chehab 9cb36c2afc ALSA: patch_sigmatel: Add missing Gateway entries and autodetection
Gateway autodetection and entries are incomplete.

This patch adds the entries found at the .INI file for their driver version
5.10.5082.0.

It also uses the proper code to seek for notebook ID, since this is based on
codec subsystem ID on those devices.

This should provide a proper pinup for several gateways notebooks:
	Gateway M465-E Notebook [Part #1008637]
	Gateway M465-G Notebook [Part #1008667]
	Gateway NX260X Notebook [Part #1008794]
	Gateway NX100X Notebook [Part #1008798]
	Gateway E-100M Notebook [Part #1008799]
	Gateway E-100M G Notebook [Part #1008800]
	Gateway M255-E Notebook [Part #1008801]
	Gateway M255-G Notebook [Part #1008803]
	Gateway M285-E Convertible Notebook [Part #1008804]
	Gateway M285-G Convertible Notebook [Part #1008805]
	Gateway CX210S Convertible Notebook [Part #1008807]
	Gateway CX210X Convertible Notebook [Part #1008808]
	Gateway E-100M SB Notebook [Part #1008973]
	Gateway M255-E SB Notebook [Part #1008989]
	Gateway M285-E SB Convertible Notebook [Part #1008990]
	Gateway M465-E Notebook [Part #1009022]
	Gateway CX2724 Convertible Notebook [Part #1009036]
	Gateway MX1025 Notebook [Part #1009046]
	Gateway CX2720 Convertible Notebook [Part #1009063]
	Gateway CX2724h Convertible Notebook [Part #1009089]
	Gateway MX1023 Notebook [Part #1009097]
	Gateway MX1023h Notebook [Part #1009098]
	Gateway NX260X Notebook [Part #1009112]
	Gateway E-100M Notebook [Part #1009126]
	Gateway MX7533 Notebook [Part #1009146] [Part #1009163]
	Gateway CX210X Convertible Notebook [Part #1009346]
	Gateway NX570X Notebook [Part #1009442]
	Gateway NX570X Notebook [Part #1009448]
	Gateway NX270S Notebook [Part #1009550]
	Gateway MX6448 Notebook [Part #1013912R]
	Gateway MX6453 Notebook [Part #1013913R]
	Gateway MX6216 Notebook [Part #1013916R]
	Gateway MX6931 Notebook [Part #1013918R]
	Gateway CX2726 Convertible Notebook [Part #1013921R]
	Gateway MP8708 Notebook [Part #1013924R]
	Gateway MX6446 Notebook [Part #1013927R]
	Gateway MX6930 Notebook [Part #1013928R]
	Gateway MX6447 Notebook [Part #1013932R]
	Gateway MX6454 Notebook [Part #1013943R]
	Gateway MX6439 Notebook [Part #1013947R] [Part #1013955R] [Part #1013971R]
	Gateway MX6930h Notebook [Part #1013973R] [Part #1013974R] [Part #1013975R]
	Gateway MX6955 Notebook [Part #1014028R]
	Gateway MX6956 Notebook [Part #1014033R]
	Gateway MX6959 Notebook [Part #1014061R]
	Gateway MX6957 Notebook [Part #1014065R]
	Gateway MX6960 Notebook [Part #1014068R]
	Gateway MX6958 Notebook [Part #1014072R]
	Gateway NX570X Notebook [Part #1014077R]
	Gateway NX570XL Notebook [Part #1014078R]
	Gateway NX570QS Notebook [Part #1014079R]
	Gateway MX6961 Notebook [Part #1014080R] [Part #1014106R]
	Gateway MX6961h Notebook [Part #1014112R]
	Gateway NX270S Notebook [Part #1014120R]
	Gateway MX6431 Notebook [Part #1014121R]
	Gateway MX8710 Notebook [Part #2905895R]
	Gateway MX3702 Notebook [Part #2905898R]
	Blade-K8F GW UMA Single Core Motherboard w/RS485M and 1394 - Quanta (FRU) [Part #4006133R]

Since some entries conflict with existing pinups, I'm providing a separate
patch to fix those entries.

Tested only with Gateway MX6453.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-30 11:09:19 +01:00
Mauro Carvalho Chehab 2eda344546 ALSA: hda - Add a new function to seek for a codec ID
Gateway notebooks have their ID inside codec vendor ID, not at PCI ID. Due to
that, model auto-detection were not possible with the standard seek method.

This is what is found at lspci -vnn:

00:14.2 Audio device [0403]: ATI Technologies Inc SB450 HDA Audio [1002:437b] (rev 01)
        Subsystem: ATI Technologies Inc SB450 HDA Audio [1002:437b]

Yet, autodetection is possible, since the codec properly reflects the vendor at
the Subsystem ID:

$ cat /proc/asound/card0/codec#0 |head -4

Codec: SigmaTel STAC9250
Address: 0
Vendor Id: 0x83847634
Subsystem Id: 0x107b0367

This patch adds a new autodetection function that seeks for codec subsystem ID.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-30 11:09:09 +01:00
Takashi Iwai 36adba1fc7 ALSA: hda - Remove EXPERIMENTAL from CONFIG_SND_HDA_POWER_SAVE
It's mature enough now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-28 15:27:11 +01:00
Takashi Iwai ff7a326736 ALSA: hda - Don't export symbols when built-in kernel
The global functions in hda_codec.c and other core parts are only
for HD-audio codec and controller drivers.  When the HD-audio driver
is built in kernel, all stuff have to be statically linked, thus
we don't need any exports.

This patch introduces a conditional macro to do export only
when needed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-28 15:22:02 +01:00
Takashi Iwai 645f10c1ac ALSA: hda - Check MODULE instead of CONFIG_SND_HDA_INTEL_MODULE
Checking MODULE is more generic.
Also a cosmetic comment change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-28 15:07:37 +01:00
Clemens Ladisch de04b102bf ALSA: oxygen: add Claro halo support
Add support for the HT-Omega Claro halo (XT).

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-28 14:49:54 +01:00
Takashi Iwai 57a5ef483b ALSA: hda - Add quirk for Sony VAIO VGN-SR19XN
Added model=sony-assamd for Sony VAIO VGN-SR19XN with ALC262 codec.
Reference: Novell bnc#450080
	https://bugzilla.novell.com/show_bug.cgi?id=450080

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-28 14:46:28 +01:00
Takashi Iwai 56d17712d5 ALSA: hda - Clear codec->proc_widget_hook at reset
Clear the remaining pointer at snd_hda_codec_reset() to avoid Oops.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-28 14:41:09 +01:00
Takashi Iwai 2d34e1b3bb ALSA: hda - Add IDT/STAC-specific proc output
Added power-map and analog-loopback information to proc output for
IDT/STAC codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-28 14:40:55 +01:00
Takashi Iwai bb40abe223 ALSA: hda - Remove unused proc entry in hda_bus struct
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-28 12:57:38 +01:00
Takashi Iwai daead538e9 ALSA: hda - Add codec-specific proc hook
Added a hook for proc outputs of codec-specific stuff.

Moved realtek-specific coeff output into patch_realtek.c as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-28 12:55:36 +01:00
Takashi Iwai 11cd41b893 ALSA: hda - Fix build error with CONFIG_SND_HDA_POWER_SAVE
Moved power_save field initialization inside a proper ifdef
to fix a build error without CONFIG_SND_HDA_POWER_SAVE.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-28 07:22:18 +01:00
Takashi Iwai 1289e9e8b4 ALSA: hda - Modularize HD-audio driver
Split the monolithc HD-audio driver into several pieces:
 - snd-hda-intel   HD-audio PCI controller driver; loaded via udev
 - snd-hda-codec   HD-audio codec bus driver
 - snd-hda-codec-* Specific HD-audio codec drivers

When built as modules, snd-hda-codec (that is invoked by snd-hda-intel)
looks up the codec vendor ID and loads the corresponding codec module
automatically via request_module().

When built in a kernel, each codec drivers are statically hooked up
before probing the PCI.

This patch adds appropriate EXPORT_SYMBOL_GPL()'s and the module
information for each driver, and driver-linking codes between
codec-bus and codec drivers.

TODO:
  - Avoid EXPORT_SYMBOL*() when built-in kernel
  - Restore __devinit appropriately depending on the condition

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-27 15:47:11 +01:00
Julia Lawall 73f6a12ed1 ALSA: sound/pci/mixart/mixart.c: Add missing snd_card_free
The function snd_mixart_create creates a link between mgr and card that
allows snd_mixart_free to free card as well.  But if snd_mixart_create
fails, then the link has not been created and card has to be freed explicitly.

The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
statement S,S1;
position p1,p2,p3;
expression E,E1;
type T,T1;
expression *ptr != NULL;
@@

(
 if ((x@p1 = snd_card_new(...)) == NULL) S
|
 x@p1 = snd_card_new(...);
)
 ... when != snd_card_free(...,(T)x,...)
     when != if (...) { <+... snd_card_free(...,(T)x,...) ...+> }
     when != true x == NULL || ...
     when != x = E
     when != E = (T)x
     when any
(
 if (x == NULL || ...) S1
|
 if@p2 (...) {
  ... when != snd_card_free(...,(T1)x,...)
      when != if (...) { <+... snd_card_free(...,(T1)x,...) ...+> }
      when != x = E1
      when != E1 = (T1)x
(
  return \(0\|<+...x...+>\|ptr\);
|
  return@p3 ...;
)
}
)

@ script:python @
p1 << r.p1;
p3 << r.p3;
@@

print "* file: %s snd_card_new: %s return: %s" % (p1[0].file,p1[0].line,p3[0].line)

// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-27 15:42:15 +01:00
Takashi Iwai 30d72e9f61 ALSA: hda - Fix creation of automatic capture mixers
Fixed a wrong boundary check of num_adc_nids in set_capture_mixer()
in patch_realtek.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-27 15:25:34 +01:00
Takashi Iwai 529bd6c4a6 ALSA: hda - Fix PCM reconfigure
The reconfiguration of PCM affected all PCM streams on the bus, but
this this should be done rather only for the target codec.

This patch does the following:
- introduce bitmap indicating the PCM device usages on a hda_bus
- refactor the PCM build functions
- fix __devinit prefix in some fucntions
- add a proper ifdef around HDA-reconfig-specific functions

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-27 14:17:01 +01:00
Takashi Iwai fee2fba358 ALSA: hda - Move power_save option to hda_intel.c
Move power_save option into hda_intel.c, and make a field in hda_bus,
instead of keeping module parameters in separate files.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-27 12:43:28 +01:00
Takashi Iwai 986862bdf1 ALSA: hda - make some functions static
Minor clean ups: move snd_hda_codecs_inuse() into hda_intel.c and
make static.  Also, make snd_hda_query_supported_pcm() static
as it's used only in hda_codec.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-27 12:40:13 +01:00
Takashi Iwai e7dd8c1bda Merge branch 'topic/misc' into topic/pcsp-fix
Conflicts:
	sound/drivers/pcsp/pcsp_lib.c
2008-11-26 14:12:42 +01:00
Qinghuang Feng 4f199629b0 ALSA: sound/pci/hda/hda_codec.c: cleanup kernel-doc
There is no argument named @state in snd_hda_resume,
remove its' comment.

Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-26 08:14:41 +01:00
Takashi Iwai b6283534a3 Merge branch 'topic/fix/hda' into for-linus 2008-11-25 17:21:32 +01:00
Takashi Iwai b0e6481a9a ALSA: hda - Really fix bits value in proc output
The fix in 82894b6f6f resulted in zero
due to wrong mask and bit shifts.  Now fixed really.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-25 16:07:01 +01:00
Takashi Iwai eefe93b995 Merge branch 'topic/fix/hda' into topic/hda
Conflicts:
	sound/pci/hda/patch_sigmatel.c
2008-11-25 15:20:57 +01:00
Takashi Iwai 661cd8fb52 ALSA: hda - Check model for Dell 92HD73xx laptops
Check the model type instead of PCI SSID for detection of the mic types
on Dell laptops with IDT 92HD73xx codecs.  In this way, a new laptop
can be tested via model module option.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-25 15:18:29 +01:00
Takashi Iwai c65574abad 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-25 15:17:08 +01:00
Takashi Iwai 95026623da ALSA: hda - No 'Headphone as Line-out' swich without line-outs
STAC/IDT driver creates "Headphone as Line-Out" switch even if there
is no line-out pins on the machine.  For devices only with headpohnes
and speaker-outs, this switch shouldn't be created.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-25 15:15:05 +01:00
Takashi Iwai ee09543c86 ALSA: hda - Add quirk for MSI 7260 mobo
Added preset model=targa-dig for MSI 7260 mobo.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-25 15:03:38 +01:00
Markus Bollinger c0193f39f4 ALSA: pcxhr - add support for pcxhr stereo sound cards (mixer part)
- add support for pcxhr stereo cards mixer controls
- adjust tlv db scales to real dBu values
- fix bug with monitoring volume control pcxhr_monitor_vol_put
- do some cleanup

Signed-off-by: Markus Bollinger <bollinger@digigram.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-25 12:53:24 +01:00
Markus Bollinger 7628700e08 ALSA: pcxhr - add support for pcxhr stereo sound cards (firmware support)
- Add support for pcxhr stereo cards and their firmware
- autorize sound cards without analog IO
- do some cleanup

Signed-off-by: Markus Bollinger <bollinger@digigram.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-25 12:28:06 +01:00
Markus Bollinger 9d948d2700 ALSA: pcxhr - add support for pcxhr stereo sound cards (core change)
- Add support for pcxhr stereo cards
- minor bugfixes : period and buffer size consraints
- fix PLL register values
- do some clean up

Signed-off-by: Markus Bollinger <bollinger@digigram.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-25 12:27:03 +01:00
Markus Bollinger 93bf5d8753 ALSA: pcxhr - add support for pcxhr stereo sound cards
- Add support for pcxhr stereo cards
- do some clean up

Signed-off-by: Markus Bollinger <bollinger@digigram.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-25 12:26:46 +01:00
Takashi Iwai c6e4c66613 ALSA: hda - Assign unsol tags dynamically in patch_sigmatel.c
Since we need to handle many unsolicited events assigned to different
widgets, allocate the event dynamically using the existing events
array, and use the tag appropriately instead of combination of fixed
number and widget nid.  (Note that widget nid can be over 4 bits!)

Also, replaced the call of unsol_event handler with a dedicated
function to be more readable.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-25 11:58:19 +01:00
Takashi Iwai 0e19e7d2bf Merge branch 'topic/fix/hda' into topic/hda
Conflicts:
	sound/pci/hda/patch_sigmatel.c
2008-11-25 11:56:25 +01:00
Takashi Iwai f73d35853e ALSA: hda - Fix AFG power management on IDT 92HD* codecs
The AFG pin power-mapping isn't properly set for the fixed I/O pins
on IDT 92HD* codecs.  This resulted in the low power mode after the
boot until any jack detection is executed, thus no output from the
speaker.

This patch fixes the power mapping for the fixed pins, and also fixes
the GPIO bits and digital I/O pin settings properly in stac92xx_ini().

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-25 11:53:50 +01:00
Takashi Iwai 82894b6f6f ALSA: hda - Fix proc pcm rate bits
Show only the relevant bits in the PCM rate bits as in the earlier version.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-25 11:42:54 +01:00
Takashi Iwai 9e97697666 ALSA: hda - Fix caching of SPDIF status bits
SPDIF status bits controls are written via snd_hda_codec_write()
without caching.  This causes a regression at resume that the bits
are lost.

Simply replacing it with the cached version fixes the problem.

Reference:
	http://lkml.org/lkml/2008/11/24/324

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-25 10:31:44 +01:00
Takashi Iwai ef1681d82f ALSA: hda - Add probe_mask quirk for Medion MD96630
Medion MD96630 has ALC268 codec on slot#2 although it's not used
for any purpose.  This codec conflicts with the primiary codec ALC888
on slot#0, and gives mixer errors.

This patch adds a corresponding entry to probe_mask blacklist.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-24 17:29:28 +01:00
Vincent Petry ef8ef5fb10 ALSA: hda: Added an ALC888 model entry for Fujitsu-Siemens Amilo Xa3530
This patch fixes the bug 0004240: ALC888 - Intel HDA - Headphone Controlling.
It is made against the 2008-11-23 snapshot.

Added Realtek ALC888 model entry for the Fujitsu-Siemens Amilo Xa3530
laptop. It has 4 jacks: HP out, Mic-in, Line-in and Line-out/Side/SPDIF
(this one is on the laptop side, the other ones are on the rear).

Model detection works.
Headphone jack sense works now.
Front mic works now, was same as Acer Aspire 4930G.
Added channel mode from 2 to 8 channels.

In 2ch and 4ch modes, the front is also sent to the Line-out/side jack
for convenience instead of just muting the Line-out/side jack like other
models do.

When using the Mic-in jack as CLFE, the sound is very low (bug?). To
work it around, in 6ch mode the CLFE channel is duplicated to the
Line-out/side jack because this one has a better amp.

Cc: manu@frogged.de
Signed-off-by: Vincent Petry <PVince81@yahoo.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-24 08:10:07 +01:00
Takashi Iwai a9cb5c9053 ALSA: hda - No 'Headphone as Line-out' swich without line-outs
STAC/IDT driver creates "Headphone as Line-Out" switch even if there
is no line-out pins on the machine.  For devices only with headpohnes
and speaker-outs, this switch shouldn't be created.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-24 07:51:11 +01:00
Wu Fengguang 4805286bff ALSA: hda - fix build warning when CONFIG_PROC_FS=n
Fix "defined but not used" build warning by moving eld_versoin_names[]
and cea_edid_version_names[] into hdmi_print_eld_info().

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-22 11:16:15 +01:00
Wu Fengguang 9415e1c418 ALSA: hda - fix DisplayPort naming
DisplayPort is a digital display interface standard put forth by
the Video Electronics Standards Association (VESA). It defines a
new license-free, royalty-free, digital audio/video interconnect,
intended to be used primarily between a computer and its display monitor,
or a computer and a home-theater system.

				- From Wikipedia, the free encyclopedia

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-22 11:16:04 +01:00
Wu Fengguang acb0599388 ALSA: hda - ELD proc interface write updates
- rename ELD proc write routine to hdmi_write_eld_info()
- support modifying WMAPro's profile

Write to some ELD fields (monitor_name, manufacture_id, product_id,
eld_version, edid_version) are deliberately not supported, since that
won't correct wrong behaviors and only leads to confusions.

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-22 11:15:21 +01:00
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 b20222667d ALSA: hda - Fix build without CONFIG_PROC_FS
snd_print_pcm_rates() and snd_print_pcm_bits() are used by both
hda_proc.c and hda_eld.c, thus they have to be defined in the common
place.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-21 21:24:03 +01:00
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 c879c634c9 Merge branches 'topic/fix/hda' and 'topic/fix/sound-core' into for-linus 2008-11-21 08:39:36 +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 ef71b1b875 Merge branches 'topic/fix/hda' and 'topic/fix/misc' into for-linus 2008-11-18 13:49:39 +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
Julia Lawall d6f35e3f0d ALSA: sound/pci/pcxhr/pcxhr.c: introduce missing kfree and pci_disable_device
Error handling code following a kzalloc should free the allocated data.
The error handling code is adjusted to call pci_disable_device(pci); as
well, as done later in the function

The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,l;
position p1,p2;
expression *ptr != NULL;
@@

(
if ((x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...)) == NULL) S
|
x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
)
<... when != x
     when != if (...) { <+...x...+> }
x->f = E
...>
(
 return \(0\|<+...x...+>\|ptr\);
|
 return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-15 19:07:29 +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
Takashi Iwai 4d4e9bb339 ALSA: hda - Add digital beep playback switch for STAC/IDT codecs
The digital beep widget may have no mute control, and always enabling
the beep is ofen pretty annoying, especially on laptops.

This patch adds a mixer control "PC Beep Playback Switch" when there
is no mixer amp mute is found, and controls it on software.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-13 14:37:14 +01:00
Yang, Libin c4da29ca08 ALSA: hda - support detecting HD Audio devices with PCI class code
The patch uses HD Audio PCI class code to detect AMD HD Audio cards.

Signed-off-by: Libin Yang <libin.yang@amd.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-13 11:07:07 +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
Jaroslav Kysela 972d4c50fb ALSA: hdsp/hdspm: remove card->id from rawmidi device name
The card->id (card text identification) can be changed at runtime.
It might be confusing to have old text identification in device name.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-12 17:07:46 +01:00
Takashi Iwai 24924f884c Merge branch 'topic/fix/hda' into for-linus 2008-11-12 10:06:31 +01:00
Takashi Iwai 90d0be2fc3 Merge branch 'topic/fix/hda' into topic/hda
Conflicts:
	sound/pci/hda/patch_sigmatel.c
2008-11-12 10:02:04 +01:00
Takashi Iwai d7a8943635 ALSA: hda - Fix IDT/STAC multiple HP detection
Due to the recent change for multiple HP as line-out switch, only
one of the multiple headphons (usually a wrong one) is toggled
and the other pins are still disabled.  This causes the silent output
problem on some Dell laptops.

Also, the hp_switch check is screwed up when a line-in or a mic-in
jack exists.  This is added as an additional output, but hp_switch
check doesn't take it into account.

This patch fixes these issues: simplify hp_switch check by using
the NID instead of bool, and clean up / fix the toggle of HP pins
in unsol event handler code.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-12 10:00:56 +01:00
Takashi Iwai 4f1e6bc364 ALSA: hda - Fix input pin initialization for STAC/IDT codecs
The input pins are sometimes not initialized properly because
of the optimization check of the current pinctl code.

Force to initialize the mic input pins so that they can be set up
properly even if they were in a weird state.  But keep other input
pins if already set up as input, since this could be an extra mic
pin.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-11 18:00:53 +01:00
Takashi Iwai 355a0ec471 ALSA: hda - Add missing analog-mux mixer creation for STAC9200
The creation of analog-mux mixer element is missing in
patch_stac9200() due to the dynamic allocation patch.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-11 16:46:19 +01:00
Takashi Iwai 6b425660f4 Merge branches 'topic/fix/misc' and 'topic/fix/hda' into for-linus 2008-11-10 17:58:46 +01:00
Travis Place 254248313a ALSA: hda - Make the HP EliteBook 8530p use AD1884A model laptop
Added a QUIRK to patch_analog.c for the HP Elitebook 8530p
(IDs 0x103c:0x30e7) to use AD1884A model 'laptop' by default.
Playback and Capture confirmed working.

Signed-off-by: Travis Place <wishie@wishie.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-10 17:57:14 +01:00
Takashi Iwai f43aa025b7 ALSA: hda - Fix another cache list management
Fix another silly bug in the amp cache list management.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-10 16:24:26 +01:00
Tim Blechmann 3ae7e2e229 ALSA: hdsp: check for iobox and upload firmware during ioctl
currently, the error message when trying to run hdspmixer or hdspconf
if the breakout box is not connected is somehow misleading, since it
asks the user to upload the firmware.

this patch adds a test, whether the breakout box is connected and
tries to upload the firmware in the case, that it is not present, e.g.
because of power failures of the breakout box.

[Minor coding-style fixes by tiwai]

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-09 12:55:18 +01:00
Tim Blechmann 00c9ddd1d4 ALSA: HDSP: check for io box before uploading firmware
currently the hdsp driver tries to upload the firmware, even if the
io box is not connected. this patch adds a check for the io box
before trying to upload the firmware.
thus instead of messages complaining about the fifo status and firmware
loading failure, the driver gives a message that no multiface or
digiface is connected.

[A minor coding-style fix by tiwai]

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-09 12:50:52 +01:00
Michel Marti 65b92e5cbc ALSA: hda - Add another HP model (6730s) for AD1884A
Added model=laptop for another HP machine (103c:3614) with AD1884A
codec.

Signed-off-by: Michel Marti <mma@objectxp.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-09 12:47:12 +01:00
Takashi Iwai 0edb945430 ALSA: hda - Fix probe errors on Dell Studio Desktop
BIOS on Dell Studio Desktop tells wrong codec probe masks.
This patch gives the preset mask value to avoid invalid access.
Reference: Novell bug#440907
	https://bugzilla.novell.com/show_bug.cgi?id=440907

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-07 14:53:09 +01:00
Takashi Iwai 30cde0aacc ALSA: hda - Fix ALC260 hp3013 master switch
The master switch doesn't influence on NID 0x15, the headphone jack
on HP 3013 model because alc260_hp_master_update() ignores the passed
arguments.

Also, corrected the wrong arguments of hp3013 (0x10 and 0x15) although
this doesn't change any behavior.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-07 14:51:15 +01:00
Takashi Iwai 0774023172 Merge branch 'topic/fix/hda' into topic/hda 2008-11-07 09:06:45 +01:00
Takashi Iwai 63cf123bf5 Merge branch 'topic/fix/misc' into topic/misc 2008-11-07 09:06:05 +01:00
Takashi Iwai ea2da6e898 ALSA: hda - Fix broken hash chain allocation
The chaining for amp hash got broken due to the rewrite with
snd_array.  Fixed now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-07 00:51:36 +01:00
Takashi Iwai b910d9ae5b ALSA: hda - Add max allocation check in array allocator
Added a check for max allocation size in snd_array_new() for a
debugging purpose.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-07 00:26:52 +01:00
Takashi Iwai c217429b14 ALSA: hda - Add missing NULL check in amp hash allocation
Added the missing NULL check from allocator in get_alloc_hash().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-07 00:23:30 +01:00
Tony Vroon 64154835c5 ALSA: hda - Add lifebook model for Realtek ALC269
The widget layout of the Fujitsu Lifebook S6420 (which is ICH9M-based
and uses an ALC269) is similar but not identical to the Lifebook
S6410/E8410 (which are ICH8M-based and use an ALC262).

It is named lifebook as fujitsu is in use for Amilo machines. This builds
on the Quanta FL1 work and supports all analog inputs & outputs that I am
aware of.  Microphone autoswitch is implemented. The laptop mic port takes
precedence over the dock mic port if both happen to have a jack plugged in.
This made sense to me as a design decision (imagine a presentation
environment with the dock fully wired in and the presenter quickly wanting
to override the mic with a headset).

There is mention of a digital audio path on the codec graph, so perhaps
the headphone socket is dual-function analog/digital. I will follow up
with another patch if I can acquire equipment to test this.

Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-06 17:32:34 +01:00
Takashi Iwai 6ce4a3bc1b ALSA: hda - Make codec-probing more robust
When an error occurs during the codec probing, typically accessing to an
non-existing codec slot, the controller chip gets often screwed up and
can no longer communicate with the codecs.

This patch adds a preparation phase just to probe codec addresses before
actually creating codec instances.  If any error occurs during this
probing phase, the driver resets the controller to recover.

This will (hopefully) fix the famous "single_cmd" errors.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-06 17:29:48 +01:00
Takashi Iwai 33fa35ed0d ALSA: hda - simplify hda_bus ops callbacks
The hda_bus ops callback take struct hda_bus pointer.
Also, the command callback takes the composed command word, instead of
each small bits in arguments.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-06 16:50:40 +01:00