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

167 Commits

Author SHA1 Message Date
Takashi Iwai 4a10079345 Merge branch 'fix/hda' into topic/hda 2009-03-18 07:50:56 +01:00
Takashi Iwai c673ba1c23 ALSA: hda - Workaround for buggy DMA position on ATI controllers
The position-buffer on ATI controllers are unreliable as well as
on VIA chips, thus the same workaround for DMA position reading as
VIA is useful for ATI.

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-18 07:46:21 +01:00
Takashi Iwai 09240cf429 ALSA: hda - Fix DMA mask for ATI controllers
ATI controllers (at least some SB0600 models) appear buggy to handle
64bit DMA.  As a workaround, reset GCAP bit0 and let the driver to
use only 32bit DMA on these controllers.

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-18 07:45:41 +01:00
Takashi Iwai 4c4531d64d ALSA: hda - Remove Toshiba probe_mask quirk
Revert the Toshiba probe_mask quirk for 2.6.29 kernel
(commit 38f1df27e3).
In the current tree, the digital-only codec is handled properly so
no codec conflict should occur.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-02 08:06:11 +01:00
Takashi Iwai b31b43e9fb Merge branch 'fix/hda' into topic/hda
Conflicts:
	sound/pci/hda/hda_intel.c
2009-03-02 08:04:10 +01:00
Takashi Iwai 38f1df27e3 ALSA: hda - Add probe_mask default for Toshiba laptop with ALC268
Some Toshiba laptops have another ALC268 codec on slot#3 that conflicts
with the primary codec.  The codec#3 is for the digital I/O, and should
be fixed by the driver, but it'd need a bunch of changes.

So, let's fix the probe problem temporarily by setting the default
probe_mask value.

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

Tested-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-02 07:55:52 +01:00
peerchen bedfcebb4f ALSA: hda - Add the Device IDs for MCP89 and remove IDs of MCP7B
Added the Device IDs for MCP89 HD audio controller.
Removed the IDs of MCP7B cause this chipset had been cancelled.

Signed-off-by: Peer Chen <peerchen@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-27 10:22:55 +01:00
Takashi Iwai e23573d7e3 Merge branch 'fix/hda' into topic/hda 2009-02-16 10:23:35 +01:00
Takashi Iwai d14a7e0bfc Revert "Sound: hda - Restore PCI configuration space with interrupts off"
This reverts commit 32e176c14d.

That commit caused a regression with suspend on Thinkpad SL300.

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

Tested-by:  Alexandre Rostovtsev <tetromino@gmail.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-16 10:16:27 +01:00
Takashi Iwai 20db7cb0ac ALSA: hda - Add forced codec-slots for ASUS W5F
ASUS W5F needs the fixed codec-slots to probe to override the BIOS
problem.

Tested-by: Giovanni Moser Frainer <giovanni@redix.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-13 08:19:30 +01:00
Takashi Iwai f1eaaeec11 ALSA: hda - Allow fixed codec-probe mask
Some devices have broken BIOS and they don't set the codec probe-bit
properly after cleared by the driver.  This makes the driver skipping
the necessary codec slots.

Since BIOS update isn't always easy, now the semantics of probe_mask
option is changed a bit.  When it contains the bit 8 (0x100), the
lower bits are used to probe that slots regardless of codec-probe bits
returned by the hardware.

For example, probe_mask=0x103 will force to probe the codec slot #0
and #1.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-13 08:16:55 +01:00
Takashi Iwai 6acaed38a3 ALSA: hda - Use own workqueue
snd-hda-intel driver used schedule_work() fot the delayed DMA pointer
updates, but this has several potential problems:
- it may block other eventsd works longer
- it may deadlock when probing fails and flush_scheduled_work() is
  called during probe callback (as probe callback itself could be
  invoked from eventd)

This patch adds an own workq for each driver instance to solve these
problems.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-12 10:33:56 +01:00
Takashi Iwai 8326e32c1e Merge branch 'topic/hda-resume-fix' into topic/hda 2008-12-20 23:41:18 +01:00
Takashi Iwai d4d9cd0338 ALSA: hda - Add probe_only option
Added probe_only module option to hd-audio driver.
This option specifies whether the driver creates and initializes the
codec-parser after probing.  When this option is set, the driver skips
the codec parsing and initialization but gives you proc and other
accesses.  It's useful to see the initial codec state for debugging.

The default of this value is off, so the default behavior is as same
as before.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-19 15:19:11 +01:00
Takashi Iwai 0ff555192a Merge branch 'fix/hda' into topic/hda 2008-12-19 08:22:57 +01:00
Takashi Iwai 5c0b9bec46 ALSA: hda - Fix a compile warning when CONFIG_PM=n
Fixed the compile warning regarding the unused function when built
with CONFIG_PM=n:
  sound/pci/hda/hda_intel.c:1905: warning: ‘snd_hda_codecs_inuse’ defined but not used

snd_hda_codecs_inuse() is used only in the resume callback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-11 11:48:33 +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 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 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 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
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
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
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 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
Takashi Iwai afecd78cd2 Merge branch 'topic/fix/hda' into topic/hda 2008-10-31 17:24:01 +01:00
Takashi Iwai 0552f29795 Merge branches 'topic/fix/hda' and 'topic/fix/misc' into for-linus 2008-10-29 16:40:00 +01:00
Takashi Iwai 0cbf00980f ALSA: hda - Add reboot notifier
The current snd-hda-intel driver seems blocking the power-off on some
devices like eeepc.  Although this is likely a BIOS problem, we can add
a workaround by disabling IRQ lines before power-off operation.
This patch adds the reboot notifier to achieve it.

The detailed problem description is found in bug#11889:
    http://bugme.linux-foundation.org/show_bug.cgi?id=11889

Tested-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-29 16:21:16 +01:00
Takashi Iwai 34c25350ac ALSA: hda - Remove old codec-probe limitation
Removed the old workaround to avoid the non-existing codec slot.
The current code should work without that workaround.  If any,
we can add a quirk table.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-28 11:44:34 +01:00
Arjan van de Ven 2f5ad54ea6 pci: use pci_ioremap_bar() in sound/
Use the newly introduced pci_ioremap_bar() function in sound/.
pci_ioremap_bar() just takes a pci device and a bar number, with the goal
of making it really hard to get wrong, while also having a central place
to stick sanity checks.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-21 09:31:10 +02:00
Takashi Iwai 176d5335fe ALSA: hda - Add infrastructure for dynamic stream allocation
Added the infrastructure for dynamic stream allocation on HD-audio.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-13 02:42:58 +02:00
Wei Ni dc9c8e218d ALSA: Fix for reading RIRB buffer on NVIDIA aza controller with AMD Phenom cpu
When read RIRB buffer immediately after RIRB interrupt received,
sometimes the data will be "0x0". If we wait for some time, the data
in buffer will be correct. This issue only occurred with AMD Phenom cpu.
So we set this "needs_damn_long_delay" flag.

Signed-off-by: Wei Ni <wni@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-10-10 13:41:36 +02:00
Takashi Iwai 2f5983f2aa ALSA: hda - allow probing of 4 codecs
Allow probing of 4 codecs on known good situations.
On some known bad situations, it should be avoided.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-09-09 09:10:49 +02:00
Joseph Chan 0e153474f4 ALSA: hda - Fix VIA recording problem
Add a workaround for bad DMA-position reporting on VIA chipset.

Signed-off-by: Joseph Chan <josephchan@via.com.tw>
[modified and cleaned up by tiwai]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-29 10:06:12 +02:00
Takashi Iwai fc4abee811 ALSA: hda - check page continuity
Check the continuity of allocated pages to reduce the BDL size as much
as possible so that it can use more than 1MB buffers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-25 09:57:40 +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 a62741cf77 ALSA: hda - disable delayed period-ack with bdl_pos_adj=0
When bdl_pos_adj=0 is given, disable the position-check and the delayed
period update mechanism.  Usually bdl_pos_adj=0 is set only for the
debugging purpose on really broken hardwares.  It's better to disable
the extra complexity in such a case.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-25 09:57:07 +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
Peer Chen 320dcc30f4 ALSA: hda_intel: enable snoop for nvidia HDA controller
Enable the snoop for nvidia hda controller to avoid data coherence issue.

Signed-off-by: Peer Chen <peerchen@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-08-21 10:46:46 +02:00
Libin Yang 9e6dd47bf3 ALSA: hda - support new AMD HDMI Audio (1002:970f)
Signed-off-by: Libin Yang <libin.yang@amd.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-08-12 15:33:44 +02:00
Seth Heasley b29c2360f1 ALSA: hda_intel: ALSA HD Audio patch for Intel Ibex Peak DeviceIDs
This patch adds the Intel Ibex Peak (PCH) HD Audio Controller DeviceIDs.

Signed-off by: Seth Heasley <seth.heasley@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-08-12 12:30:43 +02:00
Takashi Iwai e785d3d8fb ALSA: hda - Align BDL position adjustment parameter
It seems NVidia and other hardwares require the alignment for period
update timing.  For satisfying this condition, align the position
adjustment for delayed wake-up to the initial bdl_pos_adj value.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-07-16 12:03:24 +02:00
Takashi Iwai 766979e09d ALSA: hda - use upper_32_bits()
Use the standard upper_32_bits() instead of own macro.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-06-16 09:32:36 +02:00
Takashi Iwai 0c6341ace5 ALSA: hda - bdl_pos_adj=32 as default
Use bdl_pos_adj=32 as default except for Intel hardwares confirmed
to work with bdl_pos_adj=1.  Looks like ATI and NVidia require this
higher value.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-06-16 09:32:34 +02:00
Takashi Iwai a6a950a8a8 ALSA: hda - Add a warning if pending IRQ is found
The pending IRQ handling is a very hackish workaround and should be
avoided as much as possible via a larger bdl_pos_adj option value.
Put a warning message if this situation occurs so that the user may have
a chance to notice that something is wrong.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-06-13 16:47:23 +02:00
Takashi Iwai 5c0d7bc103 ALSA: hda - Fix bdl_pos_adj value for ATI SB chipsets
ATI SB controllers seem to report the DMA ahead in the amount of FIFO.
Thus bdl_pos_adj should be 32 for them as default.

Also, the default value is set to -1, which means to make the driver
to choose the appropriate value.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-06-13 16:34:25 +02:00
Takashi Iwai 555e219ffa ALSA: hda - bdl_pos_adj option to each instance
The option bdl_pos_adj should be provided for each card instance instead of
a global one because the value depends rather on each controller-chip.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-06-13 16:34:19 +02:00
Takashi Iwai d2e1c97331 ALSA: hda - remove position_fix=3
position_fix=3 is the option to correct the DMA position with the
FIFO size.  But, it never worked correctly, and we have now more other
workarounds for the DMA position fixes.  Thus better to remove it.

Also, change POS_FIX_NONE to POS_FIX_LPIB to represent its real role
better.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-06-13 16:30:43 +02:00
Takashi Iwai 675f25d4d3 ALSA: hda - Add bdl_pos_adj option
Added a new option, bdl_pos_adj, to adjust the delay of IRQ-wakeup
timing.

Most HD-audio hardwares have a problem that a BDL IRQ is issued before
actually the data and the DMA pointer are updated.
We have already a mechanism to force to delay snd_pcm_period_elapsed()
calls via workq, but this costs much CPU, and typically the delay is
within one sample.  Thus, it's more clever to adjust the BDL entries
instead.

The new option adds the size of the delay in frames.  As default,
it's set to 1 -- that is, one sample delay.  Even the hardware is
really correct, one sample delay is relatively harmless in comparison
with reporting wrong positions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-06-13 16:30:20 +02:00