Commit Graph

2839 Commits (799e64f05f4bfaad2bb3165cab95c8c992a1c296)

Author SHA1 Message Date
Takashi Iwai 3d2aa66dda Merge branch 'topic/ctxfi' into for-linus
* topic/ctxfi:
  ALSA: ctxfi - Fix deadlock with xfi-timer
  ALSA: ctxfi - Replace atc lock to mutex
2009-06-16 17:38:40 +02:00
Takashi Iwai 8dca419721 ALSA: ctxfi - Fix deadlock with xfi-timer
The PCM x-fi native update routine can cause deadlocks when the
trigger(START) is called while the stream is running.

This patch fixes the deadlock by just postponing the pcm period update
to the next possible wake-up.  Also it adds the flip of ti->running
flag (just to be sure as now).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-15 14:52:55 +02:00
Takashi Iwai f708eb1d71 ALSA: intel8x0 - Fix PCM position craziness
The PCM pointer callback sometimes returns invalid positions and this
screws up the hw_ptr updater in PCM core.  Especially since now the
jiffies check is optional with xrun_debug, the invalid position is
handled as is, and causes serious sound skips, etc.

This patch simplifies the position-fix strategy in intel8x0 to be more
robust:
- just falls back to the last position if bogus position is detected
- another sanity check for the backward move of the position due to
  a race of register update and the base-index update

This patch is applicable also for 2.6.30.

Tested-by: David Miller <davem@davemloft.net>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-15 12:36:06 +02:00
Linus Torvalds 489f7ab6c1 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (31 commits)
  trivial: remove the trivial patch monkey's name from SubmittingPatches
  trivial: Fix a typo in comment of addrconf_dad_start()
  trivial: usb: fix missing space typo in doc
  trivial: pci hotplug: adding __init/__exit macros to sgi_hotplug
  trivial: Remove the hyphen from git commands
  trivial: fix ETIMEOUT -> ETIMEDOUT typos
  trivial: Kconfig: .ko is normally not included in module names
  trivial: SubmittingPatches: fix typo
  trivial: Documentation/dell_rbu.txt: fix typos
  trivial: Fix Pavel's address in MAINTAINERS
  trivial: ftrace:fix description of trace directory
  trivial: unnecessary (void*) cast removal in sound/oss/msnd.c
  trivial: input/misc: Fix typo in Kconfig
  trivial: fix grammo in bus_for_each_dev() kerneldoc
  trivial: rbtree.txt: fix rb_entry() parameters in sample code
  trivial: spelling fix in ppc code comments
  trivial: fix typo in bio_alloc kernel doc
  trivial: Documentation/rbtree.txt: cleanup kerneldoc of rbtree.txt
  trivial: Miscellaneous documentation typo fixes
  trivial: fix typo milisecond/millisecond for documentation and source comments.
  ...
2009-06-14 13:46:25 -07:00
Takashi Iwai e46b0c8c08 ALSA: hda - Add quirk for Acer Aspire 6935G
Added model=acer-aspire-8930g for Acer Aspire 6935G (1025:0146).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-13 10:16:43 +02:00
Takashi Iwai 635c265f32 ALSA: ctxfi - Replace atc lock to mutex
The spinlock in atc can cause a sleep in lock:

Kernel failure message 1:
BUG: sleeping function called from invalid context at mm/slub.c:1599
in_atomic(): 0, irqs_disabled(): 1, pid: 2537, name: gstreamer-prope
Pid: 2537, comm: gstreamer-prope Tainted: P
2.6.29.4-167.fc11.x86_64 #1
Call Trace:
  [<ffffffff8103ff0f>] __might_sleep+0x10b/0x110
  [<ffffffff810cd734>] __kmalloc+0x73/0x130
  [<ffffffffa0b4b142>] ? daio_rsc_init+0xaa/0x125 [snd_ctxfi]
  [<ffffffffa0b4b212>] dao_rsc_init+0x55/0x1c0 [snd_ctxfi]
  [<ffffffffa0b4b3d2>] dao_rsc_reinit+0x55/0x5d [snd_ctxfi]
  [<ffffffff813abd6c>] ? _spin_lock_irqsave+0x32/0x3b
  [<ffffffffa0b454fe>] atc_spdif_out_passthru+0x92/0x136 [snd_ctxfi]
  ...

Since the lock path is no critical path, it can be gracefully
replaced with a mutex.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-13 10:12:59 +02:00
Takashi Iwai 31d496aaee Merge branch 'topic/lx6464es' into for-linus
* topic/lx6464es:
  ALSA: lx6464es - support standard alsa module parameters
2009-06-12 20:03:11 +02:00
Takashi Iwai f8be792d51 Merge branch 'topic/hda' into for-linus
* topic/hda:
  ALSA: hda - add quirk for STAC92xx (SigmaTel STAC9205)
2009-06-12 20:03:09 +02:00
Martin Olsson 19af5cdb7c trivial: fix typo milisecond/millisecond for documentation and source comments.
Signed-off-by: Martin Olsson <martin@minimum.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-06-12 18:01:46 +02:00
Martin Olsson 98a1708de1 trivial: fix typos s/paramter/parameter/ and s/excute/execute/ in documentation and source comments.
Signed-off-by: Martin Olsson <martin@minimum.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-06-12 18:01:46 +02:00
Thadeu Lima de Souza Cascardo 4b512d26f4 trivial: typo (en|dis|avail|remove)bale -> (en|dis|avail|remove)able
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-06-12 18:01:45 +02:00
Tim Blechmann de0525ca34 ALSA: lx6464es - support standard alsa module parameters
trivial patch to support the alsa module parameters `index', `id'
and `enable'

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-11 16:03:34 +02:00
Simos Xenitellis a5c0f88678 ALSA: hda - add quirk for STAC92xx (SigmaTel STAC9205)
A quirk is required for 8086:284b (rev 03) [Subsystem: 161f:2073].
The following has been tested with Alsa 1.0.20 (git master).

Background details can be found at
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4561
http://forum.ubuntu-gr.org/viewtopic.php?f=38&t=5290

Tested-by: Theodora Iliopoulou <th30dr@gmail.com>
Signed-off-by: Simos Xenitellis <simos@gnome.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-10 19:54:24 +02:00
Takashi Iwai 4ef279205a Merge branch 'topic/seq-kconfig-cleanup' into for-linus
* topic/seq-kconfig-cleanup:
  ALSA: clean up the logic for building sequencer modules
2009-06-10 07:26:48 +02:00
Takashi Iwai 87cb14a5f4 Merge branch 'topic/riptide' into for-linus
* topic/riptide:
  ALSA: riptide - Fix joystick resource handling
  ALSA: riptide - Code clean up
2009-06-10 07:26:44 +02:00
Takashi Iwai 4ad75433c2 Merge branch 'topic/pcm-subclass-fix' into for-linus
* topic/pcm-subclass-fix:
  ALSA: Remove invalid GENERIC_MIX PCM sublass
2009-06-10 07:26:43 +02:00
Takashi Iwai 9dea75c709 Merge branch 'topic/oxygen' into for-linus
* topic/oxygen:
  sound: virtuoso: add Xonar Essence ST support
  sound: virtuoso: enable HDAV S/PDIF input
  sound: virtuoso: add another DX PCI ID
  sound: oxygen: reset DMA when stream is closed
2009-06-10 07:26:39 +02:00
Takashi Iwai 8c3ff3a7fb Merge branch 'topic/misc' into for-linus
* topic/misc:
  ALSA: sgio2audio.c: clean up checking
  ALSA: burgundy: timeout message is off by one.
  ALSA: bt87x - Add a quirk entry for Askey Computer Corp. MagicTView'99
  ALSA: parisc/harmony: fix printk format warning
  ALSA: keywest: Get rid of useless i2c_device_name() macro
2009-06-10 07:26:37 +02:00
Takashi Iwai ed8cc176c9 Merge branch 'topic/maya44' into for-linus
* topic/maya44:
  ALSA: ice1724 - Add ESI Maya44 support
  ALSA: ice1724 - Allow spec driver to create own routing controls
  ALSA: ice1724 - Add PCI postint to reset sequence
  ALSA: ice1724 - Clean up definitions of DMA records
  ALSA: ice1724 - Check error in set_rate function
2009-06-10 07:26:36 +02:00
Takashi Iwai 03cece06c4 Merge branch 'topic/lx6464es' into for-linus
* topic/lx6464es:
  ALSA: Add missing description of lx6464es to ALSA-Configuration.txt
  ALSA: lx6464es - Disable lx_message_send()
  ALSA: lx6464es - Use snd_card_create()
  ALSA: lx6464es - driver for the digigram lx6464es interface
2009-06-10 07:26:34 +02:00
Takashi Iwai 3c2fcf36d7 Merge branch 'topic/hdsp' into for-linus
* topic/hdsp:
  ALSA: hdsp - Add a comment about external firmwares for hdsp
  ALSA: hdsp: allow firmware loading from inside the kernel
2009-06-10 07:26:32 +02:00
Takashi Iwai 81ad969dbf Merge branch 'topic/hda' into for-linus
* topic/hda: (51 commits)
  ALSA: hda - Fix the previous tagra-8ch patch
  ALSA: hda - Add 7.1 support for MSI GX620
  ALSA: support Sony Vaio TT
  ALSA: hda_intel: fix build error when !PM
  ALSA: hda - More Aspire 8930G fixes
  ALSA: hda - Acer Aspire 8930G support
  ALSA: hda - Limit codec-verb retry to limited hardwares
  ALSA: hda - Add codec bus reset and verb-retry at critical errors
  ALSA: hda - Reorder and clean-up ALC268 quirk table
  ALSA: hda - fix audio on LG R510
  ALSA: hda - Macbook[Pro] 5 6ch support
  ALSA: hda-intel: improve initialization for ALC262_HP_BPC model
  ALSA: hda - Jack Mode changes for Sigmatel boards
  ALSA: hda - Support NVIDIA 8 channel HDMI audio
  ALSA: hda - Fix a typo in the previous patch
  ALSA: hda - Fix reverted LED setup for HP
  ALSA: hda - Add more register bits definitions
  ALSA: hda - Always sync writes in single_cmd mode
  ALSA: hda - Support sync after writing a verb
  ALSA: hda - Allow concurrent RIRB access in single_cmd mode
  ...
2009-06-10 07:26:31 +02:00
Takashi Iwai 2f0dabcc5f Merge branch 'topic/emu10k1' into for-linus
* topic/emu10k1:
  ALSA: emu10k1 - Fix minimum periods for efx playback
2009-06-10 07:26:29 +02:00
Takashi Iwai 19b1a15a3d Merge branch 'topic/div64-cleanup' into for-linus
* topic/div64-cleanup:
  ALSA: Clean up 64bit division functions
2009-06-10 07:26:28 +02:00
Takashi Iwai e618a5609e Merge branch 'topic/ctxfi' into for-linus
* topic/ctxfi: (35 commits)
  ALSA: ctxfi - Clear PCM resources at hw_params and hw_free
  ALSA: ctxfi - Check the presence of SRC instance in PCM pointer callbacks
  ALSA: ctxfi - Add missing start check in atc_pcm_playback_start()
  ALSA: ctxfi - Add use_system_timer module option
  ALSA: ctxfi - Fix wrong model id for UAA
  ALSA: ctxfi - Clean up probe routines
  ALSA: ctxfi - Fix / clean up hw20k2 chip code
  ALSA: ctxfi - Fix possible buffer pointer overrun
  ALSA: ctxfi - Remove useless initializations and cast
  ALSA: ctxfi - Fix DMA mask for emu20k2 chip
  ALSA: ctxfi - Make volume controls more intuitive
  ALSA: ctxfi - Optimize the native timer handling using wc counter
  ALSA: ctxfi - Add missing inclusion of linux/math64.h
  ALSA: ctxfi - Set device 0 for mixer control elements
  ALSA: ctxfi - Clean up / optimize
  ALSA: ctxfi - Set periods_min to 2
  ALSA: ctxfi - Use native timer interrupt on emu20k1
  ALSA: ctxfi - Fix previous fix for 64bit DMA
  ALSA: ctxfi - Fix endian-dependent codes
  ALSA: ctxfi - Allow 64bit DMA
  ...
2009-06-10 07:26:27 +02:00
Takashi Iwai a963203c18 Merge branch 'topic/ca0106' into for-linus
* topic/ca0106:
  ALSA: ca0106 - Fix master volume scale
  ALSA: ca0106 - Add missing card->mixername field setup
  ALSA: ca0106 - Add missing registrations of vmaster controls
2009-06-10 07:26:22 +02:00
Takashi Iwai 1d479f89ec Merge branch 'topic/au88x0' into for-linus
* topic/au88x0:
  ALSA: au88x0: fix wrong period_elapsed() call
  ALSA: au88x0: fix .pointer callback
2009-06-10 07:26:21 +02:00
Takashi Iwai a5990dc5b9 ALSA: ctxfi - Clear PCM resources at hw_params and hw_free
Currently the PCM resources are allocated only once and ever in prepare
callback, assuming that the PCM parameters are never changed.  But it's
not true.

This patch adds the call of atc->pcm_release_resources() at hw_params
and hw_free callbacks to assure that the PCM setup is done correctly
for each h/w parameter changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-09 08:19:02 +02:00
Takashi Iwai 5242bc7613 ALSA: ctxfi - Check the presence of SRC instance in PCM pointer callbacks
The SRC instances may not exist when PCM pointer callback is called at
the state before initialization is finished.  Add the NULL check just
to be sure.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-09 08:17:14 +02:00
Takashi Iwai c399f3be82 ALSA: ctxfi - Add missing start check in atc_pcm_playback_start()
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-09 08:16:20 +02:00
Takashi Iwai 04145f2bfb ALSA: ctxfi - Add use_system_timer module option
Added use_system_timer module option to force to use the system timer
instead of emu20k1 timer irq for debugging.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 21:32:26 +02:00
Takashi Iwai 09521d2e3e ALSA: ctxfi - Fix wrong model id for UAA
CTUAA should be checked instead of CTHENDRIX.  The latter is for 20k2 chip.
Also, fixed the detection of UAA/HENDRIX models by fixing the mask bits.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 18:30:37 +02:00
Takashi Iwai 9470195a9c ALSA: ctxfi - Clean up probe routines
Clean up probe routines and model detection routines so that the driver
won't call and check the PCI subsystem id at each time.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 18:10:32 +02:00
Takashi Iwai f03ecf5053 ALSA: hda - Fix the previous tagra-8ch patch
- Fix a typo in the patch
- Adapted to follow the recent change for unsol event handling

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 16:38:17 +02:00
David Heidelberger 64a8be7435 ALSA: hda - Add 7.1 support for MSI GX620
Added 7.1 support for MSI GX620 and jack quirk.

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

Signed-off-by: David Heidelberger <d.okias@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 16:18:31 +02:00
Takashi Iwai 806d31d738 ALSA: emu10k1 - Fix minimum periods for efx playback
EFX playback stream should have periods_min = 2 to avoid the buffer
position overflow (due to restrictions of the pcm-indirect helper).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 15:50:42 +02:00
Takashi Iwai d362af62ed ALSA: ctxfi - Fix / clean up hw20k2 chip code
- Clean up Hungarian coding style
- Don't use static variables for I2C information; this unables to use
  multiple instances.  Now they are stored in struct hw20k2 fields.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 15:31:22 +02:00
Takashi Iwai af8500bbbd ALSA: ctxfi - Fix possible buffer pointer overrun
Fix possible buffer pointer overruns.  Back to zero when it's equal
or over the buffer size.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 15:07:46 +02:00
Takashi Iwai 514eef9c2a ALSA: ctxfi - Remove useless initializations and cast
Remove useless variable initializations and cast at the beginning of
functions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 14:57:57 +02:00
Takashi Iwai 4836ac6554 ALSA: ctxfi - Fix DMA mask for emu20k2 chip
Allow 64bit DMA mask for emu20k2 chip, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 14:51:24 +02:00
Takashi Iwai d436dd063b ALSA: ctxfi - Make volume controls more intuitive
Change the volume control to dB scale (as the raw data seems so).
Also added the TLV dB-scale information.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 13:50:18 +02:00
Takashi Iwai c4865679df ALSA: ca0106 - Fix master volume scale
The master volume dB scale was wrongly defined as 0.50dB setp while
it must be 0.25dB step.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 12:57:17 +02:00
Takashi Iwai 54de6bc8b2 ALSA: ctxfi - Optimize the native timer handling using wc counter
Optimize the timer update routine to look up wall clock once instead of
checking the position of each stream at each timer update.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 12:38:54 +02:00
Takashi Iwai 28cd4aa43d ALSA: ctxfi - Add missing inclusion of linux/math64.h
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-05 18:07:12 +02:00
Takashi Iwai 3f7440a6b7 ALSA: Clean up 64bit division functions
Replace the house-made div64_32() with the standard div_u64*() functions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-05 17:45:17 +02:00
Takashi Iwai 032abb519c ALSA: ctxfi - Set device 0 for mixer control elements
Mixer control elements are usually assigned to device 0.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-05 16:44:25 +02:00
Takashi Iwai 2a36f67f8c ALSA: ctxfi - Clean up / optimize
- Use static tables instead of assigining each funciton pointer
- Add __devinit* to appropriate places; pcm, mixer and timer cannot be
  marked because they are kept in the function table that lives long
- Move create_alsa_devs function out of struct ct_atc to mark it
  __devinit

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-05 16:44:24 +02:00
Takashi Iwai 775ffa1d3e ALSA: ctxfi - Set periods_min to 2
Set 2 to minimal periods of playback pcm setups, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-05 16:44:22 +02:00
Takashi Iwai b7bbf87608 ALSA: ctxfi - Use native timer interrupt on emu20k1
emu20k1 has a native timer interrupt based on the audio clock, which
is more accurate than the system timer (from the synchronization POV).
This patch adds the code to handle this with multiple streams.

The system timer is still used on emu20k2, and can be used also for
emu20k1 easily by changing USE_SYSTEM_TIMER to 1 in cttimer.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-05 16:44:13 +02:00
Takashi Iwai 6bc5874a1d ALSA: ctxfi - Fix previous fix for 64bit DMA
Remove unneeded substitution to 32bit int to make it really working.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-05 12:18:37 +02:00
Guido Günther 3e1647c5b5 ALSA: support Sony Vaio TT
with BIOS probing only we offer a non functional headphone swith and
volume slider.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-05 12:12:26 +02:00
Takashi Iwai 42a0b31827 ALSA: ctxfi - Fix endian-dependent codes
The UAA-mode check in hwct20k1.c is implemented with the endian-dependent
codes.  Fix to be more portable (and readable).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-05 09:29:22 +02:00
Takashi Iwai 6d74b86d3c ALSA: ctxfi - Allow 64bit DMA
emu20kx chips support 64bit address PTE.  Allow the DMA bit mask to
accept 64bit address, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-05 09:26:41 +02:00
Alexander Beregalov 65f7598311 ALSA: hda_intel: fix build error when !PM
Fix this build error when CONFIG_PM is not set:
ound/pci/hda/hda_intel.c: In function 'azx_bus_reset':
sound/pci/hda/hda_intel.c:1270: error: implicit declaration of function 'snd_pcm_suspend_all'
sound/pci/hda/hda_intel.c:1271: error: implicit declaration of function 'snd_hda_suspend'
sound/pci/hda/hda_intel.c:1272: error: implicit declaration of function 'snd_hda_resume'

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-04 14:21:11 +02:00
Hector Martin 018df41861 ALSA: hda - More Aspire 8930G fixes
Enable all three capture channels, including the missing nid 7 which is
the only one capable of capturing DMIC input

Enable Headphone amp for the HP jack. This causes a volume boost for
headphones, but does not cause any noticeable effect for light loads
like other amps, so there is no need to make it configurable.

Add Input Mix capture mux setting to capture the output of the playback
input mux (that is, what goes out the speakers except for PCM)

Hack another coef register because the stereo DMIC for some reason
produces a nonstandard sum/difference signal. I found a bit to make it
just use the sum signal for both channels, which makes it behave like a
standard mono microphone. The stereo is useless anyway (they're 1cm apart).

Tested working: Three capture channels, mic in, line in, DMIC.

Tested not working: CD. Not sure why, might be unconnected in the actual
hardware or a CD drive issue.

Also looked at SPDIF. It appears to work (emitter lights up inside the
HP out jack) but I lack a proper miniTOSLINK cable to test it.

Signed-off-by: Hector Martin <hector@marcansoft.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-04 00:13:40 +02:00
Takashi Iwai 3f08a0e4ab ALSA: bt87x - Add a quirk entry for Askey Computer Corp. MagicTView'99
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 17:39:52 +02:00
Takashi Iwai eeaf100d25 ALSA: ca0106 - Add missing card->mixername field setup
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 16:06:26 +02:00
Takashi Iwai bd05dbd3b2 Merge branch 'topic/ctxfi-fix' into topic/ctxfi 2009-06-02 15:55:22 +02:00
Takashi Iwai c76157d928 ALSA: ctxfi - Support SG-buffers
Use SG-buffers instead of contiguous pages.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 15:54:47 +02:00
Takashi Iwai cd391e206f ALSA: ctxfi - Remove PAGE_SIZE limitation
Remove the limitation of PAGE_SIZE to be 4k by defining the own
page size and macros for 4k.  8kb page size could be natively supported,
but it's disabled right now for simplicity.

Also, clean up using upper_32_bits() macro.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 15:54:46 +02:00
Takashi Iwai d2b9b96c51 ALSA: ctxfi - Fix supported PCM formats
The device seems supporting only U8, S16, S24_3LE, S32.  Other linear
formats result in bad outputs.

Also, added the support for 32bit float format, which wasn't listed
in the original code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 15:54:46 +02:00
Takashi Iwai 8372d4980f ALSA: ctxfi - Fix PCM device naming
PCM names for surround streams should be also fixed as well as the mixer
element names.  Also, a bit clean up for PCM name setup.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 15:54:46 +02:00
Takashi Iwai 6585db943a ALSA: ctxfi - Fix surround mixer names
We usually pick up "Surround" mixer for the rear output, and "Side"
for the extra surround.  Fix the channel mapping to follow it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 15:54:46 +02:00
Takashi Iwai 822fa19b5c ALSA: ALSA: ctxfi - Release PCM resources at each prepare call
The prepare callback can be called multiple times, thus it needs to
release and acquire the resource again by itself at the second or later
call.

Simply add pcm_release_resources() at the beginning of each prepare
callback in ctatc.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 15:54:46 +02:00
Takashi Iwai 9a83b7453c ALSA: Remove invalid GENERIC_MIX PCM sublass
SNDRV_PCM_SUBCLASS_GENERIC_MIX is mostly for h/w multi-stream playback
devices, but ca0106 and emu10k1x don't support it (unlike emu10k1).
We shouldn't set that flag to avoid confusion.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 14:23:05 +02:00
Takashi Iwai 3c4dbda003 Merge branch 'topic/hda-ctl-reset' into topic/hda 2009-06-02 12:15:48 +02:00
Takashi Iwai 601e1cc5df ALSA: ca0106 - Add missing registrations of vmaster controls
Although the vmaster controls are created, they aren't registered thus
they don't appear in the real world.  Added the missing snd_ctl_add()
calls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2009-06-02 11:37:01 +02:00
Hector Martin 3b315d70b0 ALSA: hda - Acer Aspire 8930G support
Short story: this laptop has 5.1 built-in speakers which you *really*
want to use (the not-so-"sub" woofer is what makes the audio above
average for a laptop), so 6-channel support is important (plus a decent
asound.conf to upmix stereo). It also has the 3 typical jacks that ought
to have a selectable mode. And it's based on ALC889, which sucks.

Rationale/explanations:

The const_channel_count stuff was added because, for a laptop like this,
you always have 6 channels available (internal speakers) but still need
to set the mode for the 3 external jacks. Therefore, the device always
needs to be in 6-channel mode but there still needs to be a mixer
control for the jack mode. You could use line/mic-in at the same time as
the 6 internal speakers, for example. You might be tempted to make it
even smarter by dynamically switching the max channel count when
headphones are plugged in (therefore muting the internal speakers and
reducing the physical channel count to the jack channel mode), but as a
user I consider this to be harmful because I want the audio to blow up
to 6 channels / upmixed as soon as I unplug the headphones, and having
opened the device while in 2-channel mode would prevent this from
working (and always making 6-channel mode available doesn't do any harm).

The hardware needs EAPD turned on and the DACs routed to the internal
speaker pins, so the patch adds those verbs.

The ALC889 CLFE and subsequent (side/aux, here unused) DACs do NOT work
by default, at least here. I wasted much time trying to talk to
Realtek/pshou about this, but they just kept sending me useless updates
to patch_realtek.c that did nothing relevant. In the end I gave up and
brute forced the issue by trying to flip every bit in the proprietary
coefficient registers, and eventually found the two magic registers that
need to be cleared to enable all DACs. I have only heard Acer users
complain, but that might be because ALC889 is pretty new and using 5.1
(and noticing the missing center/lfe channels) might not be that common.
If this is a generalized issue with all ALC889 systems then those verbs
should probably be moved to a common verb array.

The internal mic is untested and probably doesn't work.

These settings will probably work for other Acer Gemstone laptops with
the same 5.1 speaker config. When identified, those should be added to
the PCI subsystem ID list.

Signed-off-by: Hector Martin <hector@marcansoft.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 10:58:37 +02:00
Takashi Iwai 67fbf88063 ALSA: ctxfi - Fix a typo in MODULE_LICENSE
A space has to be put between GPL and v2.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 09:18:26 +02:00
Takashi Iwai 8a4259bf89 ALSA: ctxfi - Fix Oops at mmapping
Replace a spinlock with a mutex protecting the vm block list at
mmap / munmap calls, which caused Oops like below:

BUG: sleeping function called from invalid context at mm/slub.c:1599
in_atomic(): 0, irqs_disabled(): 1, pid: 32065, name: xine
Pid: 32065, comm: xine Tainted: P           2.6.29.4-75.fc10.x86_64 #1
Call Trace:
  [<ffffffff81040685>] __might_sleep+0x105/0x10a
  [<ffffffff810c9fae>] kmem_cache_alloc+0x32/0xe2
  [<ffffffffa08e3110>] ct_vm_map+0xfa/0x19e [snd_ctxfi]
  [<ffffffffa08e1a07>] ct_map_audio_buffer+0x4c/0x76 [snd_ctxfi]
  [<ffffffffa08e2aa5>] atc_pcm_playback_prepare+0x1d7/0x2a8 [snd_ctxfi]
  [<ffffffff8105ef3f>] ? up_read+0x9/0xb
  [<ffffffff81186b61>] ? __up_read+0x7c/0x87
  [<ffffffffa08e36a6>] ct_pcm_playback_prepare+0x39/0x60 [snd_ctxfi]
  [<ffffffffa0886bcb>] snd_pcm_do_prepare+0x16/0x28 [snd_pcm]
  [<ffffffffa08867c7>] snd_pcm_action_single+0x2d/0x5b [snd_pcm]
  [<ffffffffa08881f3>] snd_pcm_action_nonatomic+0x52/0x6a [snd_pcm]
  [<ffffffffa088a723>] snd_pcm_common_ioctl1+0x404/0xc79 [snd_pcm]
  [<ffffffff810c52c8>] ? alloc_pages_current+0xb9/0xc2
  [<ffffffff810c9402>] ? new_slab+0x1a5/0x1cb
  [<ffffffff810ab9ea>] ? vma_prio_tree_insert+0x23/0xc1
  [<ffffffffa088b411>] snd_pcm_playback_ioctl1+0x213/0x230 [snd_pcm]
  [<ffffffff810b6c20>] ? mmap_region+0x397/0x4c9
  [<ffffffffa088bd9b>] snd_pcm_playback_ioctl+0x2e/0x36 [snd_pcm]
  [<ffffffff810ddc64>] vfs_ioctl+0x2a/0x78
  [<ffffffff810de130>] do_vfs_ioctl+0x462/0x4a2
  [<ffffffff81029cef>] ? default_spin_lock_flags+0x9/0xe
  [<ffffffff81374647>] ? trace_hardirqs_off_thunk+0x3a/0x6c
  [<ffffffff810de1c5>] sys_ioctl+0x55/0x77
  [<ffffffff8101133a>] system_call_fastpath+0x16/0x1b

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 08:40:51 +02:00
Takashi Iwai b20f3b8346 ALSA: hda - Limit codec-verb retry to limited hardwares
The reset of a BUS controller during operations is somehow risky and
shouldn't be done inevitably for devices that have apparently no such
codec-communication problems.

This patch adds the check of the hardware and limits the bus-reset
capability.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 01:21:30 +02:00
Takashi Iwai 8dd783304e ALSA: hda - Add codec bus reset and verb-retry at critical errors
Some machines machine cause a severe CORB/RIRB stall in certain
weird conditions, such as PA access at the start up together with
fglrx driver.  This seems unable to be recovered without the controller
reset.

This patch allows the bus controller reset at critical errors so
that the communication gets recovered again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 01:21:23 +02:00
Takashi Iwai 8871e5b915 ALSA: hda - Reorder and clean-up ALC268 quirk table
Rearrange alc268_cfg_tbl[] in the order of vendor id, and group some
entries using SND_PCI_QUIRK_MASK().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 01:02:50 +02:00
Ozan Çağlayan d22142aa1b ALSA: hda - fix audio on LG R510
Currently, LG R510 is only able to produce sound on headphones, the
internal speakers are not working.

The user tested and confirmed that with model=Dell headphones,
internal speakers and the microphone are working flawlessly.

Tested-by: Serdar Soytetir <tulliana@gmail.com>
Signed-off-by: Ozan Çağlayan <ozan@pardus.org.tr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 00:58:14 +02:00
Kacper Szczesniak 92b9de8342 ALSA: hda - Macbook[Pro] 5 6ch support
this is a patch against current snapshot that adds:
6 channels support for the MB5 model

Signed-off-by: Kacper Szczesniak <kacper@qwe.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 00:55:19 +02:00
Jaroslav Kysela 0e4835c198 ALSA: hda-intel: improve initialization for ALC262_HP_BPC model
Fix issues for 3 generations of HP workstations.

The modest modifications do the following:
1. Change the second MIC from device 3 to device 1
2. Init the "boost" values to "0" by default

From: John Brown <john.brown3@hp.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-01 19:14:45 +02:00
Nickolas Lloyd 7c922de709 ALSA: hda - Jack Mode changes for Sigmatel boards
This patch changes Line In as Out Switch and Mic In as Out Switch to
enums for consistency, and causes all mic and line in ports to be probed
and controls to be added appropriately.

Signed-off-by:  Nickolas Lloyd <ultrageek.lloyd@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-01 11:12:29 +02:00
Wei Ni a3d6ab9723 ALSA: hda - Support NVIDIA 8 channel HDMI audio
Support 8 channel HDMI audio for MCP78/7A

Signed-off-by: Wei Ni <wni@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-01 11:05:26 +02:00
Takashi Iwai 8a933ece41 ALSA: hda - Fix a typo in the previous patch
ICH6_GCTL_RESET was wrongly set to another bit by the commit
b21fadb9c1.  This caused a problem when
the codec needs really a reset (e.g. recovering from the communication
error at probe).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-31 09:28:12 +02:00
Takashi Iwai ba84bfcd2b ALSA: hda - Fix reverted LED setup for HP
The commit 86d190e77c reverted the bit
flip of LED GPIO for HP DX and DV4-1222nr.  Fixed now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-30 08:59:03 +02:00
Michal Marek 0528c7494e ALSA: clean up the logic for building sequencer modules
Instead of mangling the CONFIG_* variables in the makefiles over and
over, set a few helper variables in Kconfig.

Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-29 11:49:42 +02:00
Jaroslav Kysela e9ab33d03e ALSA: au88x0: fix wrong period_elapsed() call
The period_elapsed() call should be called when position moves.

The idea was taken from ALSA bug#4455.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-29 08:15:59 +02:00
Jaroslav Kysela 3fd43858c7 ALSA: au88x0: fix .pointer callback
Appearently, the used mask in the .pointer callback is invalid. It should
be in period_bytes range. The period_bytes is pow(2), so simple bitwise
operation is used.

Idea was taken from ALSA bug#4455.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-29 08:15:57 +02:00
Takashi Iwai b4f8b5e2f5 Merge branch 'fix/hda' into topic/hda 2009-05-28 13:12:48 +02:00
Takashi Iwai b21fadb9c1 ALSA: hda - Add more register bits definitions
Added some missing register bits definitions to reduce magic numbers.
Also renamed some to follow the names on the datasheet.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-28 12:26:15 +02:00
Takashi Iwai 817682c11b Merge branch 'fix/hda' into for-linus
* fix/hda:
  ALSA: hda - Compaq Presario CQ60 patching for Conexant
2009-05-28 12:02:13 +02:00
Takashi Iwai b05a7d4fed ALSA: hda - Always sync writes in single_cmd mode
In the single_cmd mode, the hardware cannot store the multiple replies
like on RIRB, thus each verb has to sync and wait for the response no
matter whether the return value is needed or not.  Otherwise it may
result in a wrong return value from the previous verb.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-28 12:01:24 +02:00
Tony Vroon 1812e67c74 ALSA: hda - Compaq Presario CQ60 patching for Conexant
A docking mic control is shown by default. The Compaq Presario
CQ60 laptop has no docking connector, so designate it as a
CXT5051_HP model.
This makes the phantom mixer slider disappear.

Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-28 07:36:20 +02:00
Linus Torvalds 878a4f521b Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Add missing check of pin vref 50 and others in Realtek codecs
  ALSA: hda - Add 5stack-no-fp model for STAC927x
  ALSA: hda - Add forced codec-slots for ASUS W5Fm
2009-05-26 12:14:46 -07:00
Takashi Iwai aae80dc24a ALSA: ctxfi - Add missing module parameter definitions
Added missing module_param*() and MODULE_PARM*().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-26 18:35:27 +02:00
Takashi Iwai aa2936f5fe ALSA: hda - Support sync after writing a verb
This patch adds a debug mode to make the codec communication
synchronous.  Define SND_HDA_SUPPORT_SYNC_WRITE in hda_codec.c,
and the call of snd_hda_codec_write*() will become synchronous,
i.e. wait for the reply from the codec at each time issuing a verb.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-26 17:23:46 +02:00
Takashi Iwai 8174086167 ALSA: hda - Allow concurrent RIRB access in single_cmd mode
In the single_cmd mode, the current driver code doesn't do any update
for RIRB just for any safety reason.  But, actually the RIRB and
single_cmd mode don't conflict.  Unsolicited events can be delivered
even while using the single_cmd mode.

This patch allows the handling of unsolicited events with single_cmd
mode, just always checking RIRB independent from single_cmd flag.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-26 15:22:00 +02:00
Takashi Iwai 20e91c5750 Merge branch 'fix/hda' into topic/hda 2009-05-26 15:19:56 +02:00
Takashi Iwai 86d190e77c ALSA: hda - Minor clean up of patch_sigmatel.c
- Remove unneeded semicolons
- Introduce spec->gpio_led to specify the GPIO bit for LED control

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-26 15:18:58 +02:00
Takashi Iwai db1005ec6f ALSA: riptide - Fix joystick resource handling
The current code doesn't handle the multiple gameports properly,
and uses unnecessary global static variables to store the data.
This patch changes the probe / remove routines to use the driver
data assigned to the dedicated pci device, and adds the support of
multiple devices.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-26 13:55:42 +02:00
Takashi Iwai a693a26fe0 ALSA: riptide - Code clean up
A code clean up, coding style fixes.
The firmware loading routine is split to an own function to improve
the readability.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-26 12:58:58 +02:00
Takashi Iwai 4fcd39207f ALSA: hda - Reset CORB/RIRB at retrying the verb communication
When a codec communication error occurs, the CORB/RIRB counters should
be reset first before re-issuing the verb.  Simply call azx_free_cmd_io()
and azx_init_cmd_io() to achieve that.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-25 18:34:52 +02:00
Clemens Ladisch 04f9890df1 sound: virtuoso: add Xonar Essence ST support
Add support for the Asus Xonar Essence ST and its daughterboard.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-25 11:49:58 +02:00
Clemens Ladisch b990ae963a sound: virtuoso: enable HDAV S/PDIF input
The Xonar HDAV1.3 has a digital input jack, so enable the corresponding
device.

This is not related to the HDMI stuff, which stays unsupported.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-25 11:49:52 +02:00
Clemens Ladisch 53bb705d12 sound: virtuoso: add another DX PCI ID
Add another PCI ID for a second revision of the Xonar DX.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-25 11:49:44 +02:00
Clemens Ladisch 345c03ef0f sound: oxygen: reset DMA when stream is closed
When a PCM stream is closed, flush the corresponding DMA channel.
Otherwise, the DMA controller would continue to output the last sample
which would result in a DC offset on the output.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-25 11:49:30 +02:00
Takashi Iwai 461c6c3a0a ALSA: hda - Add missing check of pin vref 50 and others in Realtek codecs
Some Realtek codecs like ALC861 seem to support only VREF50 while the
current driver assumes it's only VREF80.  Check other VREF bits to set
the correct value.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-25 08:06:02 +02:00
Takashi Iwai 679d92ed14 ALSA: hda - Add 5stack-no-fp model for STAC927x
The recent fix for the headphone volume control on IDT/STAC codecs
resulted in the removal of invalid "Side" volume eventually.  But,
if the front panel doesn't exist, this setup could be regarded as a
sort of regression, as reported in kernel bug #13250.

Now as a workaround, a new model 5stack-no-fp is added so that the user
without the front panel can choose this one explicitly.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-24 19:00:08 +02:00
Ozan Çağlayan 93574844bc ALSA: hda - Add forced codec-slots for ASUS W5Fm
ASUS W5Fm needs the fixed codec-slots to probe to override the BIOS
problem like W5F.

Tested-by: Alp Kılıç <kilic.alp@gmail.com>
Signed-off-by: Ozan Çağlayan <ozan@pardus.org.tr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-24 18:45:28 +02:00
Takashi Iwai 4986cab555 Merge branch 'fix/misc' into for-linus
* fix/misc:
  ALSA: Kill truncate warning by shortening Sigmatel-specific AC97 control name
  ALSA: pcsp - fix printk format warning again
2009-05-22 19:29:08 +02:00
Andreas Mohr afe6d7e3c4 ALSA: Kill truncate warning by shortening Sigmatel-specific AC97 control name
ALSA sound/core/control.c:232: Control name 'Sigmatel Surround Phase
Inversion Playback Switch' truncated to 'Sigmatel Surround Phase
Inversion Playback ' bootup message by omitting weird Sigmatel prefix
in this case; also fix up the related ca0106 mixer control removal
part by using identical naming there.

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-22 19:27:13 +02:00
Takashi Iwai 89b7161c48 Merge branch 'fix/hda' into for-linus
* fix/hda:
  ALSA: hda - fix audio on HP TX25xx series notebooks
2009-05-22 08:23:39 +02:00
Adam Williamson 87488957a6 ALSA: hda - fix audio on HP TX25xx series notebooks
Fixes https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4121

Taken from https://bugzilla.redhat.com/show_bug.cgi?id=498060

Signed-off-by: Adam Williamson <awilliam@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-22 08:22:23 +02:00
Takashi Iwai 3e3ee6dc94 ALSA: ctxfi - Add depends on X86
The ctxfi driver requires explicitly the 4k page size, and gives a
build error on architectures with non-4k pages.
As a workaround, just add the kconfig dependency on X86, which is
the only architecture ever tested.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-20 16:47:59 +02:00
Takashi Iwai fa79796631 ALSA: hda - Fix digital beep tone calculation
The digital beep tone is calculated in two different ways depending
on the codec chip.  The standard one is using a divider, and another
one is a linear tone for IDT/STAC codecs.  Currently, only the
latter type is used for all codecs, which resulted in a wrong tone
pitch.

This patch adds the calculation of the standard HD-audio type.
Also clean-up the fields in hda_beep struct.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-19 12:54:55 +02:00
Takashi Iwai 4abc1cc2f9 ALSA: hda - Add prefix to kernel messages
Add proper prefix to each kernel message in hda_intel.c.
Also, avoid the unneeded prefix when CONFIG_SND_VERBOSE_PRINTK is used
together with snd_print*().

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-19 12:16:46 +02:00
Torben Schulz eb4c41d30b ALSA: hda - Improved MacBook 3,1 support
This patch adds support for MacBook 3,1 sound by adding a model new
"mb31" with the appropriate init verbs, mixers and channel modes to
the ALC883 configuration. patch_alc882() and patch_alc883() are
modified to handle the MacBook 3,1 sound-chip (Realtek ALC889A)
correctly.

Signed-off-by: Torben Schulz <public@letorbi.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-18 15:13:02 +02:00
Takashi Iwai 313f6e2d40 ALSA: hda - Avoid conflicts with snd-ctxfi driver
The PCI entries of Creative with HD-audio class can be the devices
with emu20k1/emu20k2 chips.  These are supported better by snd-ctxfi
driver.  With that driver, the device will mutate from HD-audio to
its native class.

This patch adds a simple ifdef to avoid the conflict of device probe
between snd-hda-intel and snd-ctxfi drivers.  1102:0009 seems still
OK to be added as it has no emu20kx chip, and is a pure HD-audio
device.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-18 12:40:52 +02:00
Takashi Iwai 6c627f3978 ALSA: hda - Show the actual chip name in 'unkown model' messages
Show the actual chip name in 'unknown model..' info messages for
Realtek codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-18 12:33:36 +02:00
Takashi Iwai 812a2cca29 ALSA: hda - Split codec->name to vendor and chip name strings
Split the name string in hda_codec struct to vendor_name and chip_name
strings to be stored directly from the preset name.
Since mostly only the chip name is referred in many patch_*.c, this
results in the reduction of many codes in the end.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-16 10:00:49 +02:00
Takashi Iwai a3d2b755c0 Merge branch 'fix/misc' into for-linus
* fix/misc:
  ALSA: pcsp: fix printk format warning
  ALSA: riptide: postfix increment and off by one
2009-05-15 15:38:20 +02:00
Nickolas Lloyd 2fc9989079 ALSA: hda - add controls to toggle DC bias on mic ports
This patch adds a mixer control for the STAC92XX boards to control the
DC bias of mic ports, allowing recording from both powered and
non-powered sources.  It replaces the "Mic Output Switch" with "Mic Jack
Mode" to switch between Mic, Line In, and Line Out.

Signed-off-by: Nickolas Lloyd <ultrageek.lloyd@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-15 15:34:10 +02:00
Takashi Iwai 7442f9dadb ALSA: hda - Add a quirk entry for Macbook Pro 5,1
Added the codec SSID for MacBook Pro 5,1 as compatible as MP51.
However, the headphone auto-muting function doesn't work.  So,
this is just a tentative solution.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-14 18:20:33 +02:00
Takashi Iwai b3e0afe61e ALSA: ctxfi - Add prefix to debug prints
Added ctxfi: prefix to each debug print.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-14 15:19:30 +02:00
Takashi Iwai 35b053becb ALSA: ctxfi - Avoid unneeded pci_read_config_*() calls
Use struct pci subsystem_device and revision fields instead of
unneeded calls of pci_read_config_*().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-14 15:17:16 +02:00
Takashi Iwai 9fc20f030b ALSA: ctxfi - Move PCI ID definitions to linux/pci_ids.h
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-14 15:14:18 +02:00
Takashi Iwai d0da727e02 ALSA: ctxfi - Add missing inclusion of linux/delay.h
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-14 10:56:04 +02:00
Roel Kluin 1b1cc7f21c ALSA: riptide: postfix increment and off by one
With a postfix increment these variables are incremented beyond
CMDIF_TIMEOUT / MAX_WRITE_RETRY.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-14 08:41:40 +02:00
Wai Yew CHAY 8cc7236148 ALSA: SB X-Fi driver merge
The Sound Blaster X-Fi driver supports Creative solutions based on
20K1 and 20K2 chipsets.

Supported hardware :

Creative Sound Blaster X-Fi Titanium Fatal1ty® Champion Series
Creative Sound Blaster X-Fi Titanium Fatal1ty Professional Series
Creative Sound Blaster X-Fi Titanium Professional Audio
Creative Sound Blaster X-Fi Titanium
Creative Sound Blaster X-Fi Elite Pro
Creative Sound Blaster X-Fi Platinum
Creative Sound Blaster X-Fi Fatal1ty
Creative Sound Blaster X-Fi XtremeGamer
Creative Sound Blaster X-Fi XtremeMusic

Current release features:

* ALSA PCM Playback
* ALSA Record
* ALSA Mixer

Note:

* External I/O modules detection not included.

Signed-off-by: Wai Yew CHAY <wychay@ctl.creative.com>
Singed-off-by: Ryan RICHARDS <ryan_richards@creativelabs.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-14 08:24:10 +02:00
Takashi Iwai 22b530e028 ALSA: hda - Disable fallback to model=acer for Acer laptops
The model=acer for ALC883/889 doesn't work well for the recent Acer
Aspire laptops.  Since model=auto works better nowadays, it's safer
to use the default fallback instead of the Acer specific one.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-13 11:32:52 +02:00
Takashi Iwai 511b4c171a ALSA: hdsp - Add a comment about external firmwares for hdsp
When the hdsp driver is built in kernel, the corresponding firmware
files have to be built into the kernel as well (otherwise the boot
will hang up for fairly long time), but there is no way to control
it in Kconfig yet, unfortunately.  Instead, show a comment for user
just to make sure.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-12 11:53:45 +02:00
Raphael Doursenaud 8e365f9b6e ALSA: hdsp: allow firmware loading from inside the kernel
Allow the use of the FIRMWARE_IN_KERNEL option with hdsp cards and
in-kernel driver.
Also corrected a typo in the comment.

Signed-off-by: Raphael Doursenaud <rdoursenaud@free.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-12 11:49:39 +02:00
Chris Pockelé 9541ba1d66 ALSA: hda - Add support of Samsung NC10 mini notebook
Add specific configuration for Samsung NC10 mini notebook.  Internal
mic/speakers will be correctly muted when plugging in external ones.
Mixer controls are added for speakers, headphones and PC beep.
"Boost" is added for the microphones.

Signed-off-by: Chris Pockelé <chris.pockele.f1@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-12 08:08:53 +02:00
Takashi Iwai fa1285b3d1 Merge branch 'topic/hda-vt-spdif' into topic/hda 2009-05-11 10:23:36 +02:00
Takashi Iwai 01f2bd48d0 ALSA: hda - Add missing models for Realtek codecs
Added the missing descriptions and the model names for Realtek codecs
to the documentation and the config table.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-11 08:12:43 +02:00
Takashi Iwai b40814b8c0 Merge branch 'fix/hda' into for-linus
* fix/hda:
  ALSA: hda - Fix line-in on Mac Mini Core2 Duo
2009-05-10 12:06:55 +02:00
Takashi Iwai 6d05d53f56 Merge branch 'fix/misc' into for-linus
* fix/misc:
  sound: via82xx: fix DXS volume range
  sound: serial-u16550: fix buffer overflow
2009-05-10 12:05:53 +02:00
Takashi Iwai 22e336b776 Merge branch 'fix/hda' into topic/hda 2009-05-08 16:03:20 +02:00
Takashi Iwai a9fd4f3fcd ALSA: hda - Clean up Realtek auto-mute unsol routines
Most of unsol handlers defined in patch_realtek.c can be classified to
two types, mute via amp of pins and mute via ctl bits of pins.
Thus there are a big room to generalize each implementation.

This patch creates two generic functions, alc_automute_amp() and
alc_automute_pin().  The latter is actually changed from the previous
alc_sku_automute().  Each caller needs to initialize hp_pins and
speaker_pins properly at own init_hook.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-08 15:57:59 +02:00
Takashi Iwai b72519b518 ALSA: hda - Clean up for ALC262 HP model auto-mute functions
Just clean up, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-08 15:49:41 +02:00
Takashi Iwai 42171c17f2 ALSA: hda - Fix and clean up hippo-compat HP auto-muting
The speaker auto-muting per HP plugging for ALC262 HIPPO and compatible
devices is slightly buggy as the "Master" or "Front" mixer control can
still toggle the speaker output even if the headphone is plugged.

This patch fixes the issue, and clean up the hippo-related codes
together with fixes of some inconsistent mixer names.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-08 14:28:35 +02:00
Takashi Iwai 9da29271be ALSA: hda - Fix secondary SPDIF on VT1708S and VT1702 codecs
VIA VT1708S and VT1702 codecs can have two SPDIF outputs.  One of them
should have been handled as the extra digital out, but it's not
properly accessed.

This patch fixes the handling of the secondary SPDIF on these codecs
with the slave dig-out as found in patch_sigmatel.c.  This makes the
use of such a device easier (for normal users).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-08 07:55:28 +02:00
Takashi Iwai 5dd17cb992 ALSA: hda - Fix line-in on Mac Mini Core2 Duo
BIOS on Mac Mini Core2 Duo sets both INPUT and OUTPUT pinctl bits to
the line-in jack, and it confuses the driver as if it's a valid input.
This patch adds the check of OUTPUT bit so that the driver fixes the
invalid pin setup.

Tested-by: Tino Keitel <tino.keitel@gmx.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-08 07:55:10 +02:00
Kacper Szczesniak 41d5545d23 ALSA: hda - Add support for MacBook 5.1 (Aluminium)
Signed-off-by: Kacper Szczesniak <kacper@qwe.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-07 12:52:59 +02:00
Takashi Iwai 72cbfd45fa ALSA: ice1724 - Add ESI Maya44 support
Added the support for ESI Maya44 board to ice1724 driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-06 17:33:19 +02:00
Takashi Iwai 2bf864ac96 ALSA: ice1724 - Allow spec driver to create own routing controls
Added a new flag, own_routing, to allow spec drivers to create own
routing controls.  Also, the basic get/put calls are changed to be
external for later use by maya44 driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-06 17:31:52 +02:00
Takashi Iwai d82b64f476 ALSA: ice1724 - Add PCI postint to reset sequence
Add the PCI posting to ensure the reset sequence in snd_vt1724_chip_reset().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-06 17:25:42 +02:00
Takashi Iwai a5b7b5c1d0 ALSA: ice1724 - Clean up definitions of DMA records
Rename some vt1724_pcm_reg records to more generic and consistent ones.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-06 17:22:07 +02:00
Takashi Iwai 92d71005e2 ALSA: ice1724 - Check error in set_rate function
The set_rate might return error but the current code doesn't check it.
This patch adds a proper error check.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-06 17:18:34 +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 5d7ee52f1c Merge branch 'fix/misc' into for-linus
* fix/misc:
  ALSA: indigo-express: add missing 64KHz flags
2009-05-04 16:06:58 +02:00
James Gardiner 514bf54cd8 ALSA: hda - Addition for HP dv4-1222nr laptop support
Signed-off-by: James Gardiner <renidragsemaj@yahoo.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-04 09:06:19 +02:00
Takashi Iwai 2008f137e9 ALSA: Add missing SNDRV_PCM_INFO_BATCH flag to some drivers
Added SNDRV_PCM_INFO_BATCH flag to PCM info field of some drivers that
really don't give the precise pointer value.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-28 15:06:44 +02:00
Takashi Iwai cb6605c1e4 ALSA: hda - Fix a typo in patch_realtek.c again
The commmit dfed0ef9b3 was reverted
accidentally by the merge of auto-detection fix patch.

Fixed again now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-28 13:03:19 +02:00
Takashi Iwai 2a2ed0dfc9 ALSA: hda - Don't enable auto-mute but for speakers in patch_realtek.c
Enable auto-muting in model=auto only for devices with HP and speakers.
For devices with HP and line-outs, don't enable the auto-muting.

Also, add a debug print to show the auto-mute feature.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-28 13:01:26 +02:00