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

102 Commits

Author SHA1 Message Date
Takashi Iwai 12c2a682b5 Merge branch 'topic/misc' into for-linus 2010-03-01 12:38:49 +01:00
Clemens Ladisch bf30a4309d ALSA: via82xx: add quirk for D1289 motherboard
Add a headphones-only quirk for the Fujitsu Siemens D1289.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-and-tested-by: Marc Haber <mh+alsa201002@zugschlus.de>
Cc: <stable@kernel.org>

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-02-22 11:15:11 +01:00
Alexey Dobriyan cebe41d4b8 sound: use DEFINE_PCI_DEVICE_TABLE
Use DEFINE_PCI_DEVICE_TABLE() to make PCI device ids go to
.devinit.rodata section, so they can be discarded in some cases,
and make them const.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-09 11:08:33 +01:00
Clemens Ladisch 3d00941371 sound: via82xx: deactivate DXS controls of inactive streams
Activate the DXS volume controls only when the corresponding stream is
being used.  This makes the behaviour consistent with the other drivers
that have per-stream volume controls.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 12:39:22 +01:00
Clemens Ladisch 2fb930b53f sound: via82xx: move DXS volume controls to PCM interface
The "VIA DXS" controls are actually volume controls that apply to the
four PCM substreams, so we better indicate this connection by moving the
controls to the PCM interface.

Commit b452e08e73 in 2.6.30 broke the
restoring of these volumes by "alsactl restore" that most distributions
use; the renaming in this patch cures that regression by preventing
alsactl from applying the old, wrong volume levels to the new controls.
http://bugzilla.kernel.org/show_bug.cgi?id=14151
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=532613

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-06 14:58:58 +02:00
Joe Perches 28d27aae94 sound: Use PCI_VDEVICE
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-25 08:52:49 +02:00
Simon Arlott 115551d98e ALSA: via82xx: add option to disable 500ms delay in snd_via82xx_codec_wait
There's a large 500ms delay in snd_via82xx_codec_wait() that, at least
on my hardware, appears to be unnecessary. The rest of the init of
the card works without logging any warnings or errors and both audio
and mixer settings work.

This adds an "nodelay" parameter to disable this (undocumented in the
code) large delay improving bootup time by 489-500ms.

[    1.034217] initcall alsa_card_via82xx_init+0x0/0x16 returned 0 after 505757 usecs
vs.
[    0.533136] initcall alsa_card_via82xx_init+0x0/0x16 returned 0 after 15915 usecs

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-22 07:54:58 +02:00
Clemens Ladisch b452e08e73 sound: via82xx: fix DXS volume range
With 5 bits and 1.5 dB per step, the DXS volume range is only 48 dB.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-05 16:01:32 +02:00
Takashi Iwai e0d2054fd3 Merge branch 'topic/misc' into for-linus 2009-03-24 00:35:50 +01:00
Takashi Iwai a85165c66c ALSA: via82xx - Clean up quirk list
Use SND_PCI_QUIRK_VENDOR() macro.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-09 17:20:19 +01:00
Takashi Iwai ee419653a3 ALSA: Fix missing KERN_* prefix to printk in sound/pci
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-05 16:11:31 +01:00
Takashi Iwai e58de7baf7 ALSA: Convert to snd_card_create() in sound/pci/*
Convert from snd_card_new() to the new snd_card_create() function
in sound/pci/*.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-12 15:20:55 +01:00
Takashi Iwai 5503600a1c ALSA: via82xx - check continuous pages in buffer setup
Check continuous pages in the buffer set up so that the number of
BDL is reduced.  Also increased the max buffer size.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-25 09:57:43 +02:00
Takashi Iwai a2e3961d0a ALSA: via82xx - ignore buffer preallocation errors
The errors at buffer preallocations aren't fatal and safe to ignore.
The buffer will be allocated dynamically when opened.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-25 09:57:41 +02:00
Takashi Iwai 77a23f2695 ALSA: Clean up SG-buffer helper functions and macros
Clean up SG-buffer helper functions and macros.  Helpers take substream
as arguments now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-25 09:57:18 +02:00
Takashi Iwai da3cec35dd ALSA: Kill snd_assert() in sound/pci/*
Kill snd_assert() in sound/pci/*, either removed or replaced with
if () with snd_BUG_ON().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-13 11:46:38 +02:00
Walter Sheets 942fd1ebf6 ALSA: via82xx - Add VIA audio device #1841 to ac97_quirk list
Signed-off-by: Walter Sheets <w41ter@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-07-10 09:31:17 +02:00
Jeff Garzik f000fd8093 [ALSA] Fix synchronize_irq() bugs, redundancies
free_irq() calls synchronize_irq() for you, so there is no need for
drivers to manually do the same thing (again).  Thus, calls where
sync-irq immediately precedes free-irq can be simplified.

However, during this audit several bugs were noticed, where free-irq is
preceded by a "irq >= 0" check... but the sync-irq call is not covered
by the same check.

So, where sync-irq could not be eliminated completely, the missing check
was added.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:40 +02:00
Takashi Iwai 9004acc70e [ALSA] Remove sound/driver.h
This header file exists only for some hacks to adapt alsa-driver
tree.  It's useless for building in the kernel.  Let's move a few
lines in it to sound/core.h and remove it.
With this patch, sound/driver.h isn't removed but has just a single
compile warning to include it.  This should be really killed in
future.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:48 +01:00
Marcin Ślusarz 757d5a7561 [ALSA] via82xx: minor optimization in snd_via82xx_free
via82xx: minor optimization in snd_via82xx_free
don't check X, when we just checked !X before goto

Signed-off-by: Marcin Ślusarz <marcin.slusarz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:35 +01:00
Takashi Iwai 9674513d60 [ALSA] via82xx - Fix quirk for Shuttle AK32VN
Fix quirk for Shuttle AK32VN.  It works better with DXS_SRC, and needs
HP_ONLY ac97 quirk.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:10 +01:00
Jaroslav Kysela c1017a4cdb [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2007-10-16 16:51:18 +02:00
Takashi Iwai 11be265f7f [ALSA] via82xx - Add DXS quirk for Shuttle AK31v2
Shuttle AK31v2 works well with dxs_support=5 (ALSA bug#2926).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:51:11 +02:00
Rene Herman d86d01935a [ALSA] alsa-kernel: schedule_timeout() fixes
Fix schedule_timeout() use in alsa-kernel. Mostly just
	schedule_timeout(1) --> schedule_timeout_uninterruptible(1)
The wavefront_synth one fixes the surrounding loop as well. In ymfpci_main,
delete a superfluous set_current_state() and in soc/soc-dapm.c replace an
_interruptible with _uninterruptible in some debug code; it's not waiting
for signals.

Signed-off-by: Rene Herman <rene.herman>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:50:54 +02:00
Takashi Iwai a5ce88909d [ALSA] Clean up with common snd_ctl_boolean_*_info callbacks
Clean up codes using the new common snd_ctl_boolean_*_info() callbacks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:57:45 +02:00
Takashi Iwai e65365de5b [ALSA] Fix invalid schedule_timeout_interruptible()
Fixed the invalid use of schedule_timeout_interruptible() without
checking pending signals.  Simply replaced with schedule_timeout().
Suggestions thanks to Jeff Garzik.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20 11:11:36 +02:00
Auke Kok 44c10138fd PCI: Change all drivers to use pci_device->revision
Instead of all drivers reading pci config space to get the revision
ID, they can now use the pci_device->revision member.

This exposes some issues where drivers where reading a word or a dword
for the revision number, and adding useless error-handling around the
read. Some drivers even just read it for no purpose of all.

In devices where the revision ID is being copied over and used in what
appears to be the equivalent of hotpath, I have left the copy code
and the cached copy as not to influence the driver's performance.

Compile tested with make all{yes,mod}config on x86_64 and i386.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Acked-by: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-11 16:02:10 -07:00
Takashi Iwai 0cb29ea0d4 [ALSA] Add even more 'const' to everything related to TLV
Mark TLV data as 'const'
Signed-of-by: Philipp Matthias Hahn <pmhahn@pmhahn.de>

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:03:19 +01:00
Takashi Iwai 9d74958a84 [ALSA] via82xx - Use quirk list helper function
Clean up dxs_support quirk list using snd_pci_quirk_lookup().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:01:54 +01:00
Takashi Iwai f1a63a38d2 [ALSA] ac97 - Suppress power-saving mode on non-supporting drivers
Don't enable power-saving mode on drivers that don't support
it.  The supporting drivers set AC97_SCAP_POWER_SAVE to scaps
at creation of ac97 instance.
Currently enable on the following drivers: intel8x0, intel8x0m,
atiixp, atiixp-modem, via82xx and via82xx-modem.
Also, a bit clean up of power-saving stuff:
- Don't create an own workq
- Remove superfluous ifdefs

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:01:09 +01:00
Takashi Iwai 437a5a4606 [ALSA] Remove IRQF_DISABLED for shared PCI irqs
Fix IRQ flags for PCI devices.
The shared IRQs for PCI devices shouldn't be allocated with
IRQF_DISABLED.  Also, when MSI is enabled, IRQF_SHARED shouldn't
be used.
The patch removes unnecessary cast in request_irq and free_irq,
too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-12-20 08:55:57 +01:00
Andreas Mohr 082d6c673c [ALSA] via82xx: add __devinitdata
add __devinitdata to struct whitelist, since it's used within
a __devinit function.
Add const attribute to iterator variable, too.
Compile-tested (no section warnings etc.) and run-tested
on vt8233, 2.6.18-mm3 (hopefully applies well to current ALSA).

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-12-20 08:55:29 +01:00
Takashi Iwai 30b35399ce [ALSA] Various fixes for suspend/resume of ALSA PCI drivers
- Check the return value of pci_enable_device() and request_irq()
  in the suspend.  If any error occurs there, disable the device
  using snd_card_disconnect().
- Call pci_set_power_state() properly with pci_choose_state().
- Fix the order to call pci_set_power_state().
- Removed obsolete house-made PM codes in some drivers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-10-22 10:51:10 +02:00
David Howells 7d12e780e0 IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.

The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around.  On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).

Where appropriate, an arch may override the generic storage facility and do
something different with the variable.  On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.

Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions.  Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller.  A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.

I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.

This will affect all archs.  Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

	struct pt_regs *old_regs = set_irq_regs(regs);

And put the old one back at the end:

	set_irq_regs(old_regs);

Don't pass regs through to generic_handle_irq() or __do_IRQ().

In timer_interrupt(), this sort of change will be necessary:

	-	update_process_times(user_mode(regs));
	-	profile_tick(CPU_PROFILING, regs);
	+	update_process_times(user_mode(get_irq_regs()));
	+	profile_tick(CPU_PROFILING);

I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().

Some notes on the interrupt handling in the drivers:

 (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
     the input_dev struct.

 (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
     something different depending on whether it's been supplied with a regs
     pointer or not.

 (*) Various IRQ handler function pointers have been moved to type
     irq_handler_t.

Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-10-05 15:10:12 +01:00
Takashi Iwai 7058c04200 [ALSA] Added TLV support to VIA82xx driver
Added the TLV support to VIA82xx driver for addition of
dB range information.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:42:56 +02:00
Takashi Iwai b7c6b03405 [ALSA] via82xx - Add dxs_support entry for a FSC machine
Added dxs_support=5 entry for a FSC machine.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:39:00 +02:00
Takashi Iwai 6dbe662874 [ALSA] Add experimental support of aggressive AC97 power-saving mode
Added CONFIG_SND_AC97_POWER_SAVE kernel config to enable the support
of aggressive AC97 power-saving mode.  In this mode, the AC97
powerdown register bits are dynamically controlled at each open/close
of PCM streams.
The mode is activated via power_save option for snd-ac97-codec
driver.  As default it's off.  It can be turned on/off on the fly
via sysfs, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:37:08 +02:00
Takashi Iwai f40b68903c [ALSA] Fix section mismatch errors in ALSA PCI drivers
Fixed 'section mismatch' errors in ALSA PCI drivers:
- removed invalid __devinitdata from pci id tables
- fix/remove __devinit of functions called in suspend/resume

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-07-12 20:08:01 +02:00
Thomas Gleixner 65ca68b300 [PATCH] irq-flags: sound: Use the new IRQF_ constants
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-02 13:58:54 -07:00
Karsten Wiese 396f739e21 [ALSA] via82xx - Default to variable samplerate enabled for MSI K8T Neo2-FI
Default to variable samplerate enabled for MSI K8T Neo2-FI
No crackles here with 44100.

Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:34:27 +02:00
Daniel T Chen d4199f0175 [ALSA] Add hp_only quirk for pci id [161f:2032] to via82xx
http://www.kernel.org/git/?p=linux/kernel/git/bcollins/ubuntu-dapper.git;a=commitdiff;h=eae2cc78de39502595f67b7fc1f821f5963bb8ae
UpstreamStatus: Not merged
Christian Bjalevik reports in LP#38546 that his sound chipset requires
the 'hp_only' quirk to allow him to control sound volume correctly when
headphones are inserted. This patch adds the appropriate pci id to the
via82xx ALSA driver so that the quirk is applied automatically, thereby
removing the need for users to modify /etc/modprobe.d/alsa-base (or to
unload and reload snd-via82xx with ac97_quirk=hp_only).
This patch closes LP#38546.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:34:26 +02:00
Takashi Iwai 302e4c2f9e [ALSA] Change an arugment of snd_mpu401_uart_new() to bit flags
Change the 5th argument of snd_mpu401_uart_new() to bit flags
instead of a boolean.  The argument takes bits that consist of
MPU401_INFO_XXX flags.
The callers that used the value 1 there are replaced with
MPU401_INFO_INTEGRATED.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:33:56 +02:00
Takashi Iwai bf850204a7 [ALSA] Remove unneeded read/write_size fields in proc text ops
Remove unneeded read/write_size fields in proc text ops.
snd_info_set_text_ops() is fixed, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:33:09 +02:00
Takashi Iwai a769577b37 [ALSA] via82xx - Use DXS_SRC as default for VIA8235/8237/8251 chips
Use DXS_SRC as the default value for dxs_support option for
VIA8235/8237/8251 chips.  These new chips should work well with SRC.
For VIA8233/A/C, the old default DXS_48K is still used to be sure.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-04-27 21:10:52 +02:00
Henrik Kretzschmar 396c9b928d [ALSA] add __devinitdata to all pci_device_id
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-04-27 21:10:34 +02:00
Bastiaan Jacques c6cc0e3b0c [ALSA] via82xx: tweak VT8251 workaround
Move the workaround for the VT8251 up a bit, and check for STAT_EOL
rather than STAT_ACTIVE. This resolves issues some people were having
with certain ALSA clients (and allows the STAT_ACTIVE check to do what
it was intended to do).
This change was suggested by Andrew Daviel.

Signed-off-by: Bastiaan Jacques <b.jacques@planet.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-04-27 21:10:25 +02:00
Bastiaan Jacques 8263c65fbe [ALSA] via82xx: add support for VIA VT8251 (AC'97)
Add support for VIA VT8251 AC'97. Includes a workaround which ensures sound
won't stop playing after one second of playback.

Signed-off-by: Bastiaan Jacques <b.jacques@planet.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-04-27 21:10:21 +02:00
Takashi Iwai a26e9d9dc7 [ALSA] via82xx - Add a dxs entry for ECS K8T890-A
Modules: VIA82xx driver

Added a dxs_support entry for ECS K8T890-A board.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-04-12 11:34:07 +02:00
Takashi Iwai c04d092bde [ALSA] via82xx - Add dxs entry for EPoX EP-8KRAI
Added the dxs_support entry for EPoX EP-8KRAI (ALSA bug#1423).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-31 17:58:56 +02:00
Takashi Iwai 42611c02ac [ALSA] via82xx - Add dxs entry for ASRock mobo
Modules: VIA82xx driver

Add dxs_support entry for ASRock mobo.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22 10:33:40 +01:00