Commit Graph

66 Commits

Author SHA1 Message Date
Ralf Baechle 623ec04798 [ALSA] hda_intel: build fix
CC [M]  sound/pci/hda/hda_intel.o
sound/pci/hda/hda_intel.c:1508: error: position_fix_list causes a section type conflict
Gcc like its __devinitdata readable not const, it seems.  An alternative
fix would be to remove the __devinitdata attribute but that would result
in slight runtime bloat.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11 16:55:49 +02:00
Joachim Deguara 5f1545bc45 [ALSA] hda-intel - Fix HDA buffer alignment
From the HDA spec it appears that the buffers written to the BDL and
sent to a codec must be 128 byte aligned (section 4.5.1).  The alignment
was not happening especially when playing 6 channels.  This patch set
the alignment of buffers and periods to 128 bytes.

Signed-off-by: Joachim Deguara <joachim.deguara@amd.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-03-16 15:02:15 +01:00
Takashi Iwai a9995a3557 [ALSA] hda-intel - Fix codec probe with ATI contorllers
ATI controllers may have up to 4 codecs while ICH up to 3.
Thus the earlier fix to change AZX_MAX_CODECS to 3 cause a regression
on some devices that have the audio codec at bit#3.
Now max codecs is defined according to the driver type, either 3 or 4.
Currently 4 is set only to ATI chips.  Other might need the same
change, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-03-14 08:24:17 +01:00
Takashi Iwai 3372a153c2 [ALSA] hda-intel - Add black/whitelist for position_fix option
Some devices are known to require position_fix=1 or 2 to make the
driver working correctly.  Otherwise the sound gets weird effects,
such as stutters.
Now a black/whitelist is introduced to indicate the position_fix
value explicitly for such misbehaving hardwares.  As a first example,
Dell D820 is listed there.  More will come later likely...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:03:32 +01:00
Takashi Iwai 7ed07a740b [ALSA] hda-intel - Don't try to probe invalid codecs
Fix the max number of codecs detected by HD-intel (and compatible)
controllers to 3.  Some hardware reports extra bits as if
connected, and the driver gets confused to probe unexisting codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:03:05 +01:00
Takashi Iwai 69e1341897 [ALSA] hda-intel - Disable INTX when MSI is used
Call pci_intx() to disable/enable INTX when MSI is used/unused.
Nvidia and AMD boards seem to have problems with MSI when INTX
isn't disabled.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:01:41 +01:00
Jaroslav Kysela b66b3cfe6c [ALSA] hda_intel: increase maximum DMA buffer size to 1024MB
See ALSA bug#2481 .

Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:00:12 +01:00
Jason Gaston f9cc8a8b18 [ALSA] hda_intel: ALSA HD Audio patch for Intel ICH9
This patch adds the Intel ICH9 HD Audio controller DID's for ALSA.

Signed-off-by: Jason Gaston <jason.d.gaston@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-01-09 09:06:16 +01:00
Peer Chen 5b005a0126 [ALSA] Audio: Add nvidia HD Audio controllers of MCP67 support to hda_intel.c
Add the support for HD audio controllers of MCP51,MCP55,MCP61,MCP65 & MCP67.

Signed-off-by: Peer Chen <pchen@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-01-09 09:06:12 +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
Takashi Iwai 134a11f0c3 [PATCH] ALSA: hda-intel - Disable MSI support by default
Disable MSI support on HD-audio driver as default since there are too
many broken devices.

The module option is changed from disable_msi to enable_msi, too.  For
turning MSI support on, pass enable_msi=1, instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-14 16:04:27 -08:00
Takashi Iwai 68e7fffc0f [ALSA] hda-intel - Add check of MSI availabity
Check the availability of MSI and turn off MSI automatically when it's
not available on the hardware.  MSI seems broken on some hardwares
but the kernel doesn't know exactly, thus we have to turn the MSI
feature off on the sound driver manually.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-10-23 14:10:34 +02:00
Felix Kuehling 5b15c95f88 [ALSA] hda_intel: add ATI RS690 HDMI audio support
This patch adds support for the HDMI codec of the ATI RS690 IGP northbridge.

Signed-off-by: Felix Kuehling <fkuehlin@ati.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-10-22 10:51:12 +02: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
Dan Cyr f3838ba920 [ALSA] hda-intel - New pci id for Nvidia MCP61
Added the new PCI id to support Nvidia MCP61 in snd-hda-intel driver.

Signed-off-by: Dan Cyr <rabidfly@hotmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-10-06 20:22:57 +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 5c79b1f887 [ALSA] hda-intel - A slight cleanup of timeout check in azx_get_response()
A slight cleanup of timeout check in azx_get_response() to check
jiffies for HZ-independent timeout.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:48:06 +02:00
Takashi Iwai 43001c9515 [ALSA] hda-intel - Fix suspend/resume with MSI
Fixed suspend/resume with MSI enablement.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:47:00 +02:00
Takashi Iwai e08a007d10 [ALSA] hda-codec - Fix SPDIF device number of ALC codecs
Assign the SPDIF always to the secondary device (dev#1) to keep
the same configuration.  Move the optional capture device to the
third device (dev#2).
hda_intel now just ignores the NULL entries in the pcm arrays
from codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:46:46 +02:00
Takashi Iwai dafbbb1fdb [ALSA] hda-intel - Fix pci_disable_msi() call
Fix the order to call pci_disable_msi() to be after free_irq().
(Otherwise pci_disable_msi() bugs you.)
Also, added a description of disable_msi option to documentation.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:46:42 +02:00
Pavel Machek 927fc86602 [ALSA] sound/pci/hda/intel_hda: small cleanups
Cleanup whitespace.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:45:28 +02:00
Takashi Iwai 929861c669 [ALSA] hda-intel - Remove volatile
Removed volatile from the position buffer pointer.
Also, use synchronize_irq() instead of unreliable msleep(1)
in the driver remove callback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:45:22 +02:00
Stephen Hemminger 7376d013fc [ALSA] intel_hda: MSI support
Simple patch to enable Message Signalled Interrupts for the HDA Intel
audio controller.  Tested with:
 Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller (rev 03)
MSI is better because it means audio doesn't end up sharing IRQ with USB.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:42:47 +02:00
Takashi Iwai e96224ae97 [ALSA] hda-intel - Switch to polling mode for CORB/RIRB communication
Automatically switch to polling mode for CORB/RIRB communication
if the irq-driven mode seems not working well.  If the polling
mode still doesn't work, switch to single_cmd mode as fallback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:42:10 +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
Takashi Iwai f079c25ab8 [ALSA] hda-intel - Fix race in remove
Call iounmap after free_irq to avoid invalid accesses in the
shared irq.  The patch is taken from
	https://bugzilla.novell.com/show_bug.cgi?id=167869

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:34:07 +02:00
Felix Kuehling 778b6e1b2d [ALSA] hda - Add support for the ATI RS600 HDMI audio device
Add support for the ATI RS600 HDMI audio device. It has a one-stream
pure digital stereo codec that isn't handled by the generic codec
support.

Signed-off-by: Felix Kuehling <fkuehlin@ati.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:33:41 +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
Felix Kuehling 89be83f8ee [ALSA] hda-intel - Add support of ATI SB600
This patch adds support for high definition audio on ATI SB600.

Signed-off-by: Felix Kuehling <fkuehlin@ati.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-31 17:59:01 +02:00
Takashi Iwai 1a56f8d662 [ALSA] hda-intel - Auto-correction of the DMA position mode
Modules: HDA Intel driver

Switch the method to measure the current DMA position automatically
from position-buffer mode to LPIB-read mode with a sanity check.
Some hardwares seems to have problem with the position buffer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22 10:30:14 +01:00
Takashi Iwai 111d3af5f5 [ALSA] hda-intel - Automatic correction to single_cmd mode
Modules: HDA Codec driver,HDA Intel driver

Switch to single_cmd mode automatically as a fallback when CORB/RIRB
communication doesn't work well.  It may make the driver working on
some devices with broken BIOS/ACPI support.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22 10:29:53 +01:00
Ingo Molnar 62932df8fb [ALSA] semaphore -> mutex (PCI part)
Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22 10:25:29 +01:00
Takashi Iwai 27346166a9 [ALSA] hda-intel - Add single_cmd option for debugging
Modules: Documentation,HDA Intel driver

Added single_cmd module option for debugging in the case CORB/RIRB
doesn't work well (e.g. due to wrong irq routings).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22 10:22:51 +01:00
Jason Gaston d298139361 [ALSA] hda-intel - patch for Intel ICH8
Modules: HDA Intel driver

This patch adds the Intel ICH8 HD Audio DID to the hda_intel.c audio driver.

Signed-off-by: Jason Gaston <Jason.d.gaston@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-22 16:24:00 +01:00
Matt Porter 954fa19ab7 [ALSA] hda-intel - Fix HDA probe_mask default
Modules: HDA Intel driver

The probe_mask module parameter comment notes that the intended
default is -1. Fix it to be so, otherwise all codecs are skipped
and init fails.

Signed-off-by: Matt Porter <mporter@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:29:54 +01:00
Takashi Iwai 606ad75fb5 [ALSA] hda-intel - Use position buffer as default
Modules: HDA Intel driver

- Use the position buffer for obtaining the current DMA position
  as default.  This seems more stable than others.
- Add probe_mask module option (mainly for test boards with multiple
  codecs).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:29:43 +01:00
Takashi Iwai 421a12520d [ALSA] hda-intel - Fix PM support
Modules: HDA Intel driver

Fix PM support on HDA-Intel driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:27:51 +01:00
Takashi Iwai a98f90fd82 [ALSA] Remove xxx_t typedefs: HDA-Intel
Modules: HDA Intel driver

Remove xxx_t typedefs from the HDA-Intel driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:19:09 +01:00
Randy Dunlap 362775e212 [ALSA] sound/hda: rate-limit timeout message
Modules: HDA Intel driver

Rate-limit the azx_get_response timeout message.  A continuous 2 per second
is too much.

Signed-off-by: Randy Dunlap <randy_d_dunlap@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:15:48 +01:00
Greg Kroah-Hartman 249bb070f5 [PATCH] PCI: removed unneeded .owner field from struct pci_driver
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-11-10 16:09:17 -08:00
Takashi Iwai 698444f317 [ALSA] Fix the type of enable module option
Fix the type of enable module option to bool.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-11-04 13:19:16 +01:00
Takashi Iwai 2b3e584b92 [ALSA] Add dummy obsoleted module options for backward compatibility
Added dummay obsoleted module options for backward compatibility
(to reduce possible bugzilla entries :)

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-11-04 13:17:28 +01:00
Clemens Ladisch b7fe462204 [ALSA] highlanderize motherboard AC97/HDA drivers
Remove the code for supporting eight cards from the integrated
controller drivers because There Can Be Only One controller of
each type per mainboard.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2005-11-04 13:17:16 +01:00
Sasha Khapyorsky 6632d198c6 [ALSA] dev_class=SNDRV_PCM_CLASS_MODEM for modem PCMs
dev_class=SNDRV_PCM_CLASS_MODEM for all supported softmodem PCMs

Signed-off-by: Sasha Khapyorsky <sashak@smlink.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-11-04 13:16:56 +01:00
Vinod G da3fca2199 [ALSA] hda-intel - Add NVidia support
Modules: HDA Intel driver

This patch is to make the Intel HDA code work for NVIDIA azalia controller.

Modified by Takashi Iwai <tiwai@suse.de>

Signed-off-by: Vinod G. <vinodg@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-11-04 13:15:45 +01:00
Takashi Iwai e8dede5a13 [ALSA] hda-intel - Disable DMA position auto-correction
HDA Intel driver
Disable the auto-correction of DMA position temporarily.
It doesn't work as expected yet...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-10-07 14:45:30 +02:00
Clemens Ladisch 3bcd4649bc [ALSA] set owner field in struct pci_driver
AD1889 driver,ALS4000 driver,ATIIXP driver,ATIIXP-modem driver
AZT3328 driver,BT87x driver,CMIPCI driver,CS4281 driver
ENS1370/1+ driver,ES1938 driver,ES1968 driver,FM801 driver
Intel8x0 driver,Intel8x0-modem driver,Maestro3 driver,RME32 driver
RME96 driver,SonicVibes driver,VIA82xx driver,VIA82xx-modem driver
ALI5451 driver,au88x0 driver,CS46xx driver,EMU10K1/EMU10K2 driver
HDA Intel driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
MIXART driver,NM256 driver,RME HDSP driver,RME9652 driver
Trident driver,Digigram VX222 driver,YMFPCI driver
Set the module owner field in each driver's struct pci_driver to get
the driver symlink in the sysfs device directory.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2005-09-12 11:12:34 +02:00
Takashi Iwai e560d8d836 [ALSA] Replace with kzalloc() - pci stuff
AD1889 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
Intel8x0-modem driver,Maestro3 driver,SonicVibes driver,VIA82xx driver
VIA82xx-modem driver,AC97 Codec,AK4531 codec,au88x0 driver
CA0106 driver,CS46xx driver,EMU10K1/EMU10K2 driver,HDA Codec driver
HDA generic driver,HDA Intel driver,ICE1712 driver,ICE1724 driver
KORG1212 driver,MIXART driver,NM256 driver,Trident driver,YMFPCI driver
Replace kcalloc(1,..) with kzalloc().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-09-12 10:48:16 +02:00
Takashi Iwai a28f1cda0d [ALSA] hda-intel - Fix modem PCM creation
HDA Intel driver
Fix a bug of modem PCM creation (due to a typo).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-09-12 10:47:18 +02:00