Raymond Yau [Fri, 20 May 2011 06:32:04 +0000 (14:32 +0800)]
ALSA: emu10k1 - Add dB range to Bass and Treble for SB Live!
As the "Wave", "Wave Surround" or "Front" Playback Volume must be
changed to 70% (i.e. -12 dB) so that distortion won't occur when
increase Bass and Treble from 50% to 100%, so the maximum gain in
Bass and Treble are +12 dB.
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Ben Gardiner [Wed, 18 May 2011 14:03:34 +0000 (10:03 -0400)]
ALSA: sound, core, pcm_lib: xrun_log: log also in_interrupt
When debugging pcm drivers I found the "period" or "hw" prefix printed
by either XRUN_DEBUG_PERIODUPDATE or XRUN_DEBUG_PERIODUPDATE events,
respectively to be very useful is observing the interplay between
interrupt-context updates and syscall-context updates.
Similarly, when debugging overruns with XRUN_DEBUG_LOG it is useful to
see the context of the last 10 positions.
Add an in_interrupt member to hwptr_log_entry which stores the value of
the in_interrupt parameter of snd_pcm_update_hw_ptr0 when the log entry
is created. Print a "[Q]" prefix when dumping the log entries if
in_interrupt was true.
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Daniel Mack [Wed, 18 May 2011 09:28:39 +0000 (11:28 +0200)]
ALSA: usb-audio: make hwc_debug a noop in case HW_CONST_DEBUG is not set
Just defining it to nothing is dangerous as it can alter the code
execution flow, for example when used in as only function in a
conditional code block.
Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Clemens Ladisch [Wed, 11 May 2011 09:07:09 +0000 (11:07 +0200)]
ALSA: isight: fix locking
Lockdep complains about conflicts between isight->mutex,
ALSA's register_mutex, mm->mmap_sem, and pcm->open_mutex.
This can be fixed by moving the calls to isight_pcm_abort(),
snd_card_disconnect(), and fw_iso_resources_update() out of
isight->mutex. These functions are designed to be called
asynchronously; the mutex needs to protect only the device
streaming state modified by isight_start/stop_streaming().
Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Reported-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Clemens Ladisch [Wed, 11 May 2011 08:53:12 +0000 (10:53 +0200)]
ALSA: isight: fix hang when unplugging a running device
When aborting a PCM stream, the xrun is signaled only if the stream is
running. When disconnecting a PCM stream, calling snd_card_disconnect()
too early would change the stream into a non-running state and thus
prevent the xrun from being noticed by user space.
To prevent this, move the snd_card_disconnect() call after the xrun.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Clemens Ladisch [Wed, 11 May 2011 08:47:30 +0000 (10:47 +0200)]
ALSA: isight: fix isight_pcm_abort() crashes
Fix crashes in isight_pcm_abort() that happen when the driver tries to
access isight->pcm->runtime which does not exist when the device is not
open. Introduce a new field pcm_active to track this state.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Reported-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Ondrej Zary [Mon, 9 May 2011 21:39:26 +0000 (23:39 +0200)]
ALSA: tea575x: unify read/write functions
Implement generic read/write functions to access TEA575x tuners. They're now
implemented 4 times (once in es1968 and 3 times in fm801).
This also allows mute to work on all cards.
Also improve tuner detection/initialization.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some crappy USB-audio devices give broken dB ranges, e.g. both min and max
are 0dB. This confuses the volume control that prefers dB expression such
as alsactl or PulseAudio. In such a case, it's much better not to expose
the broken dB information.
"Front Playback Volume" and "Surround Playback Volume" have same dB range
since I2S DAC of SB Live! and SB Live! Platinum does not has any hardware
volume control.
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Allow older non DMA capable cards to use MMAP by
emulating the DMA using read and write functions,
and getting rid of copy & silence callbacks that
were used only by older cards.
ALSA: asihpi: Handle playback drained status better
Use the card drained status reporting for playback,
but allow it to persist for a few timer cycles before
signalling XRUN, to allow card to recover by itself.
Clock source is neither capture nor playback,
so change 'Capture Clock' to 'Clock'.
Add spaces to control name string for consistency,
always 'PCM 0' , never 'PCM0'
The card-id parser assigns the string "default" when no appropriate word
is found in the card name. But this string may confuse the alsa-lib, so
better to avoid. Use "Default" now instead.
Firmware loader: magical device bytes check updated (accepts all device
versions now and accepts possibly loaded firmware, if it is knowing to
be working)
Kelly Anderson [Fri, 1 Apr 2011 09:58:25 +0000 (11:58 +0200)]
ALSA: pcm: fix infinite loop in snd_pcm_update_hw_ptr0()
When period interrupts are disabled, snd_pcm_update_hw_ptr0() compares
the current time against the time estimated for the current hardware
pointer to detect xruns. The somewhat fuzzy threshold in the while loop
makes it possible that hdelta becomes negative; the comparison being
done with unsigned types then makes the loop go through the entire 263
negative range, and, depending on the value, never reach an unsigned
value that is small enough to stop the loop. Doing this with interrupts
disabled results in the machine locking up.
To prevent this, ensure that the loop condition uses signed types for
both operands so that the comparison is correctly done.
Many thanks to Kelly Anderson for debugging this.
Reported-by: Nix <nix@esperi.org.uk> Reported-by: "Christopher K." <c.krooss@googlemail.com> Reported-and-tested-by: Kelly Anderson <kelly@silka.with-linux.com> Signed-off-by: Kelly Anderson <kelly@silka.with-linux.com>
[cl: remove unneeded casts; use a temp variable] Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Cc: 2.6.38 <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Clemens Ladisch [Wed, 30 Mar 2011 06:24:00 +0000 (08:24 +0200)]
ALSA: firewire-speakers: fix hang when unplugging a running device
When aborting a PCM stream, the xrun is signaled only if the stream is
running. When disconnecting a PCM stream, calling snd_card_disconnect()
too early would change the stream into a non-running state and thus
prevent the xrun from being noticed by user space.
To prevent this, move the snd_card_disconnect() call after the xrun.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Linus Torvalds [Mon, 28 Mar 2011 03:35:07 +0000 (20:35 -0700)]
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: Fix yet another race in disconnection
ALSA: asihpi - Update verbose debug print macros
ALSA: asihpi - Improve non-busmaster adapter operation
ALSA: asihpi - Support single-rate no-SRC cards
ALSA: HDA: New AD1984A model for Dell Precision R5500
ALSA: vmalloc buffers should use normal mmap
ALSA: hda - Fix SPDIF out regression on ALC889
ALSA: usb-audio - Support for Boss JS-8 Jam Station
ALSA: usb-audio: add Cakewalk UM-1G support
sound/oss/opl3: validate voice and channel indexes
sound/oss: remove offset from load_patch callbacks
Linus Torvalds [Mon, 28 Mar 2011 03:02:45 +0000 (20:02 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
staging: Fix bdops->check_events() misconversion in cyasblkdev_block.c
ide: ensure that we re-run the queue handler
Linus Torvalds [Mon, 28 Mar 2011 03:02:07 +0000 (20:02 -0700)]
Merge branch 'for-2.6.39/drivers' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.39/drivers' of git://git.kernel.dk/linux-2.6-block: (122 commits)
cciss: fix lost command issue
drbd: need include for bitops functions declarations
Revert "cciss: Add missing allocation in scsi_cmd_stack_setup and corresponding deallocation"
cciss: fix missed command status value CMD_UNABORTABLE
cciss: remove unnecessary casts
cciss: Mask off error bits of c->busaddr in cmd_special_free when calling pci_free_consistent
cciss: Inform controller we are using 32-bit tags.
cciss: hoist tag masking out of loop
cciss: Add missing allocation in scsi_cmd_stack_setup and corresponding deallocation
cciss: export resettable host attribute
drbd: drop code present under #ifdef which is relevant to 2.6.28 and below
drbd: Fixed handling of read errors on a 'VerifyS' node
drbd: Fixed handling of read errors on a 'VerifyT' node
drbd: Implemented real timeout checking for request processing time
drbd: Remove unused function atodb_endio()
drbd: improve log message if received sector offset exceeds local capacity
drbd: kill dead code
drbd: don't BUG_ON, if bio_add_page of a single page to an empty bio fails
drbd: Removed left over, now wrong comments
drbd: serialize admin requests for new verify run with pending bitmap io
...
Linus Torvalds [Mon, 28 Mar 2011 02:42:12 +0000 (19:42 -0700)]
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
hwmon: (f71882fg) Add support for the F71889A
hwmon: (f71882fg) Add support for the F81865F
hwmon: (f71882fg) Document all supported devices
hwmon: (f71882fg) Per-chip fan/temperature input count tables
hwmon: (f71882fg) Secure chip property definition arrays
Stephen Rothwell [Sat, 26 Mar 2011 06:22:04 +0000 (17:22 +1100)]
apm: orphan the driver
I no longer have access to any hardware that uses APM and have not
provided real maintenance for several years. Hopefully someone with the
hardware or energy will step forward if the driver is to be kept.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Randy Dunlap [Sat, 26 Mar 2011 20:27:41 +0000 (13:27 -0700)]
ipc: fix util.c kernel-doc warnings
Fix ipc/util.c kernel-doc warnings:
Warning(ipc/util.c:336): No description found for parameter 'ns'
Warning(ipc/util.c:620): No description found for parameter 'ns'
Warning(ipc/util.c:790): No description found for parameter 'ns'
Linus Torvalds [Mon, 28 Mar 2011 02:09:29 +0000 (19:09 -0700)]
proc: fix oops on invalid /proc/<pid>/maps access
When m_start returns an error, the seq_file logic will still call m_stop
with that error entry, so we'd better make sure that we check it before
using it as a vma.
Introduced by commit ec6fd8a4355c ("report errors in /proc/*/*map*
sanely"), which replaced NULL with various ERR_PTR() cases.
(On ia64, you happen to get a unaligned fault instead of a page fault,
since the address used is generally some random error code like -EPERM)
Reported-by: Anca Emanuel <anca.emanuel@gmail.com> Reported-by: Tony Luck <tony.luck@intel.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Américo Wang <xiyou.wangcong@gmail.com> Cc: Stephen Wilson <wilsons@start.ca> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Thomas Gleixner [Fri, 25 Mar 2011 11:12:32 +0000 (11:12 +0000)]
mfd: Cleanup irq namespace
Converted with coccinelle.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Thomas Gleixner [Fri, 25 Mar 2011 11:12:31 +0000 (11:12 +0000)]
mfd: twl4030: Cleanup interrupt handling
irq_desc checking in a function which is called with that irq
descriptor locked, is pointless. Equally pointless as the irq desc
check in the interrupt service routine. The driver sets those lines
up, so that cant go away magically.
Remove the open coded handler magic and use the proper accessor.
No need to fiddle with irq_desc in the type setting function. The
original value is in irq_data and the core code stores the new setting
when the return value is 0.
This driver needs to be converted to threaded interrupts and buslock.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Thomas Gleixner [Fri, 25 Mar 2011 11:12:29 +0000 (11:12 +0000)]
mfd: htc-i2cpld: Cleanup interrupt handling
Remove the pointless irq_desc check in set_type. This function is
called with that irq descriptor locked. Also remove the write back of
the flow type as the core code does this already when the return value
is 0.
Also store the flow type in the chip data structure, so there is no
need to fiddle in the irq descriptor.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Thomas Gleixner [Fri, 25 Mar 2011 11:12:28 +0000 (11:12 +0000)]
mfd: htc-egpio: Cleanup interrupt handling
Replace the open coded handler call with the prober accessor. Retrieve
the handler data from desc. That avoids a redundant lookup in the
sparse irq case.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Guenter Roeck [Thu, 24 Mar 2011 19:12:47 +0000 (12:12 -0700)]
mfd: Select MFD_CORE if TPS6105X driver is configured
The TPS61050/61052 driver uses MFD core code, yet does not specify the
dependency in Kconfig. If it is the only MFD driver configured, compilation
fails with
Axel Lin [Thu, 24 Mar 2011 07:04:53 +0000 (15:04 +0800)]
mfd: Add MODULE_DEVICE_TABLE to rdc321x-southbridge
The device table is required to load modules based on modaliases.
After adding MODULE_DEVICE_TABLE, below entry will be added to modules.pcimap:
rdc321x-southbridge 0x000017f3 0x00006030 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
MyungJoo Ham [Thu, 24 Mar 2011 06:54:45 +0000 (15:54 +0900)]
mfd: Add MAX8997/8966 IRQ control
This patch enables IRQ handling for MAX8997/8966 chips.
Please note that Fuel-Gauge-related IRQs are not implemented in this
initial release. The fuel gauge module in MAX8997 is identical to
MAX17042, which is already in Linux kernel. In order to use the
already-existing MAX17042 driver for fuel gauge module in MAX8997, the
main interrupt handler of MAX8997 should relay related interrupts to
MAX17042 driver. However, in order to do this, we need to modify
MAX17042 driver as well because MAX17042 driver does not have any
interrupt handlers for now. We are not going to implement this in this
initial release as it is not crucial in basic operations of MAX8997.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Axel Lin [Wed, 23 Mar 2011 12:54:17 +0000 (20:54 +0800)]
mfd: Constify i2c_device_id tables
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Harald Welte <laforge@gnumonks.org> Cc: Matti Aaltonen <matti.j.aaltonen@nokia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Daniel Drake [Tue, 22 Mar 2011 20:50:39 +0000 (13:50 -0700)]
mfd: OLPC: Clean up names to match what OLPC actually uses
The cs5535-pms cell doesn't actually need to be cloned, so we can drop that
and simply have the olpc-xo1.c driver use "cs5535-pms" directly.
Also, rename the cs5535-acpi clones to what we actually use for the (currently
out-of-tree) SCI driver. In the process, that fixes a subtle bug in
olpc-xo1.c which broke powerdown on XO-1s.. olpc-xo1-ac-acpi was a typo, not
something that actually existed.
Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Andres Salomon [Tue, 22 Mar 2011 02:19:35 +0000 (19:19 -0700)]
mfd: Add mfd_clone_cell(), convert cs5535-mfd/olpc-xo1 to it
Replace mfd_shared_platform_driver_register with mfd_clone_cell. The
former was called by an mfd client, and registered both a platform driver
and device. The latter is called by an mfd driver, and registers only a
platform device.
The downside of this is that mfd drivers need to be modified whenever
new clients are added that share a cell; the upside is that it fits
Linux's driver model better. It's also simpler.
This also converts cs5535-mfd/olpc-xo1 from the old API. cs5535-mfd
now creates the olpc-xo1-{acpi,pms} devices, while olpc-xo1 binds to
them via platform drivers.
Signed-off-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Jens Axboe [Sat, 26 Mar 2011 18:49:54 +0000 (19:49 +0100)]
ide: ensure that we re-run the queue handler
The conversion to blk_delay_queue() missed parts of IDE.
Add a blk_delay_queue() to ensure that the request handler
gets reinvoked when it needs to.
Note that in all but one place the old plug re-run delay of
3 msecs is used, even though it probably could be shorter
for performance reasons in some of those cases.
Guenter Roeck [Tue, 22 Mar 2011 04:31:00 +0000 (21:31 -0700)]
hwmon: (pmbus) Fix temperature limit register access
Commit 8677011 added auto-update to temperature limit registers.
Unfortunately, the update flag is also used to determine if an attribute
is writable, which results in read-only temperature limit registers.
To fix the problem, pass 'readonly' as separate flag to the function used
to add sensor attributes.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Add support for the Fintek F81865F. It's essentially compatible with
the F71882FG, but has fewer inputs: 7 voltage, 2 temperature and 2 fan
inputs only.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean Delvare [Sat, 26 Mar 2011 09:45:02 +0000 (10:45 +0100)]
hwmon: (f71882fg) Document all supported devices
The list of supported devices was not always well documented in all
places. Clarify and list all devices in documentation, Kconfig and
the driver itself.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>