Daniel Mack [Wed, 26 Nov 2008 16:47:36 +0000 (17:47 +0100)]
ASoC: Allow more routing features for tlv320aic3x
This patch enables more routing functions for tlv320aic3x codecs.
It is now possible to
- control the volume of the PGA bypass path for the HPL, HPR, HPLCOM
and HPRCOM outputs individually
- route right line1 input to the left ADC channel
- route left line1 input to the right ADC channel
- route right mic3 input to left DAC channel
- route left mic3 input to right DAC channel
- route left line1 input to right line1 output
- route right line1 input to left line1 output
Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Arun KS [Tue, 25 Nov 2008 04:26:12 +0000 (09:56 +0530)]
ASoC: Fix TWL4030 Kconfig dependency
Fixes Kconfig dependency of TWL4030 audio codec driver
with TWL4030 core driver on both overo and omap2evm
boards
Signed-off-by: Arun KS <arunks@mistralsolutions.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Jarkko Nikula [Tue, 25 Nov 2008 10:45:09 +0000 (12:45 +0200)]
ASoC: OMAP: Add support for mono audio links in McBSP DAI
Patch adds support for mono audio links so that McBSP DAI can operate with
real mono codecs. In I2S, the signalling remains the same but only first
frame (left channel) is transmitting audio data and second frame having null
data. In DSP_A, only first frame is transmitted.
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Jarkko Nikula [Tue, 25 Nov 2008 10:45:08 +0000 (12:45 +0200)]
ASoC: OMAP: Apply channel constrains to N810 machine driver
Prepare for upcoming McBSP DAI update adding support for mono links by
restricting number of channels to 2 in N810. This is due tlv320aic3x which
claims channels_min = 1 and playing pure mono audio over I2S would cause
it to be played only from left channel if both cpu and codec DAI's claim to
support mono.
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Mon, 24 Nov 2008 18:08:18 +0000 (18:08 +0000)]
ASoC: Lower priority of resume work logging
Now that the ASoC resume has been punted to a workqueue for a release
cycle without attracting bug reports it should be safe to make the
log messages associated with it debug level, reducing noise and kernel
size in production configurations.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Mon, 24 Nov 2008 18:01:05 +0000 (18:01 +0000)]
ASoC: Remove DAI type information
DAI type information is only ever used within ASoC in order to special
case AC97 and for diagnostic purposes. Since modern CPUs and codecs
support multi function DAIs which can be configured for several modes
it is more trouble than it's worth to maintain anything other than a
flag identifying AC97 DAIs so remove the type field and replace it with
an ac97_control flag.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Mon, 24 Nov 2008 11:49:38 +0000 (13:49 +0200)]
ASoC: TWL4030: Add helper function for output gain controls
Some of the gain controls in TWL (mostly those which are associated with
the outputs) are implemented in an interesting way:
0x0 : Power down (mute)
0x1 : 6dB
0x2 : 0 dB
0x3 : -6 dB
Inverting not going to help with these.
Custom volsw and volsw_2r get/put functions to handle these gains.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Mon, 24 Nov 2008 06:25:45 +0000 (08:25 +0200)]
ASoC: TWL4030: Disable soft-volume
Keep Soft-volume disabled for now, since if it is enabled
the FGAIN volume controls are not working in the current
configuration:
CODEC_MODE:OPT_MODE = 1
OPTION:ARXR2_EN = 1
OPTION:ARXL2_EN = 1
OPTION:ARXR1_EN = 0
OPTION:ARXL1_VRX_EN = 0
RX_PATH_SEL:RXL1_SEL = 0x0 (or 0x1)
RX_PATH_SEL:RXR1_SEL = 0x0 (or 0x1)
After the patch, FGAIN volume control works.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Fri, 21 Nov 2008 14:01:41 +0000 (14:01 +0000)]
ASoC: Add Marvell Zylonite machine support
Implement support for the Marvell Zylonite PXA3xx reference platform,
supporting standard AC97 stereo and AUX interfaces together with the
auxiliary I2S interface of the WM9713.
The board has two options for the MCLK of the WM9713: either the standard
AC97 system clock can be used or the 13MHz CLK_POUT output of the PXA3xx
can be used, selected via SW15 on the board. Currently only the AC97
system clock is supported by this driver.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Tue, 18 Nov 2008 22:11:38 +0000 (22:11 +0000)]
ASoC: Merge snd_soc_ops into snd_soc_dai_ops
Liam Girdwood's ASoC v2 work avoids having two different ops structures
for DAIs by merging the members of struct snd_soc_ops into struct
snd_soc_dai_ops, allowing per DAI configuration for everything.
Backport this change.
This paves the way for future work allowing any combination of DAIs to
be connected rather than having fixed purpose CODEC and CPU DAIs and
only allowing CODEC<->CPU interconnections.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Wed, 23 Jul 2008 13:03:07 +0000 (14:03 +0100)]
ASoC: Move DAI structure definitions into new soc-dai.h
ASoC v2 factors most of the contents of soc.h out into separate headers,
including soc-dai.h for the DAI. Factor the existing DAI API out into
this file in order to prepare for backporting of the ASoC v2 DAI API.
Also backport some of Liam's improvements to the documentation.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Karl Beldan [Thu, 20 Nov 2008 14:39:27 +0000 (15:39 +0100)]
ASoC: ssm2602: Fix priv substreams refs
Clean up our record of the active streams in shutdown(), fixing
subsequent failures of snd_pcm_hw_constraints_complete after closure of
a stream.
NOTE:
- The ssm2602 allows pairs of non-matching PB/REC rates.
- This is a fix for less evil:
The logic is flawed (e.g. the slave might startup before the
master's rate and sample_bits are set).
Signed-off-by: Karl Beldan <karl.beldan@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Tue, 18 Nov 2008 20:50:34 +0000 (20:50 +0000)]
ASoC: Rename snd_soc_card to snd_soc_machine
One of the issues with the ASoC v1 API which has been addressed in the
ASoC v2 work that Liam Girdwood has done is that the ALSA card provided
by ASoC is distributed around the ASoC structures. For example, machine
wide data such as the struct snd_card are maintained as part of the
CODEC data structure, preventing the use of multiple codecs. This has
been addressed by refactoring the data structures so that all the data
for the ALSA card is contained in a single structure snd_soc_card which
replaces the existing snd_soc_machine and snd_soc_device.
Begin the process of backporting this by renaming struct snd_soc_machine
to struct snd_soc_card, better reflecting its function and bringing it
closer to standard ALSA terminology.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Hugo Villeneuve [Wed, 19 Nov 2008 06:37:31 +0000 (01:37 -0500)]
ASoC: Add PCM3008 ALSA SoC driver
The PCM3008 is a 16-bit stereo audio codec. It accepts
left-justified format for ADC, and right-justified format
for DAC. Independent power-down modes for ADC and DAC are
provided, as well as a digital de-emphasis filter (4 modes).
[Merged Makefile & Kconfig, changed asm/gpio.h to linux/gpio.h -- broonie]
Signed-off-by: Hugo Villeneuve <hugo@hugovil.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mike Frysinger [Tue, 18 Nov 2008 08:18:22 +0000 (16:18 +0800)]
ASoC: Blackfin: always set a default value for that GPIO range
Cc: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mike Frysinger [Tue, 18 Nov 2008 08:18:20 +0000 (16:18 +0800)]
ASoC: Blackfin: do not force TWI bus for ssm2602 codec
Cc: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: Fix Blackfin AC97 DAI probe function return code
A probe function should have a clean return 0 path.
Cc: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cliff Cai [Tue, 18 Nov 2008 08:18:18 +0000 (16:18 +0800)]
ASoC: Blackfin: Fix AD1980/1 build with MMAP support disabled
clean up redudent code and correct building problem in non-mmap mode
Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cliff Cai [Tue, 18 Nov 2008 08:18:17 +0000 (16:18 +0800)]
ASoC: Blackfin: add multi-channel function support
This patch provides a option for users to enable multi-channel function support
in Blackfin ASoC driver. Because Blackfin is without MMU, it is easy for us and
the user to enable this function at compiling stage not dynamically on the fly.
Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cliff Cai [Tue, 18 Nov 2008 08:18:16 +0000 (16:18 +0800)]
ASoC: AD1980 codec: add multi-channel function support
We added multi-channel function to this codec driver and Blackfin ASoC driver as well.
It was tested on Blackfin hardware.
Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mike Frysinger [Tue, 18 Nov 2008 08:18:15 +0000 (16:18 +0800)]
ASoC: Blackfin: updates Kconfig for SPORT
tweak SPORT range for non-BF54x so we get proper behavior for BF52x parts
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Naresh Medisetty [Tue, 18 Nov 2008 05:31:03 +0000 (11:01 +0530)]
ASoC: DaVinci: Fix audio stall when doing full duplex
Fix concurrent capture/playback issue.
The issue is caused by re-initialization of control registers used specifically
for capture or playback in both capture and playback operations.
Signed-off-by: Steve Chen <schen@mvista.com> Signed-off-by: Naresh Medisetty <naresh@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Fri, 14 Nov 2008 06:57:28 +0000 (08:57 +0200)]
ASoC: Fix for master playback/capture volume range for TWL4030 codec
FGAIN for playback is in range of 0-0x3f, while for capture GAIN it
is in the range of 0-0x1f.
The original value of 128 (0x7f) would modify the CGAIN also for
playback.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Fri, 14 Nov 2008 14:40:46 +0000 (14:40 +0000)]
ASoC: Revert "ASoC: Add new parameter to s3c24xx_pcm_enqueue"
This reverts commit 8dc840f88d9c9f75f46d5dbe489242f8a114fab6. Christian
Pellegrin <chripell@gmail.com> reported that on some systems the patch
caused DMA to fail which is much more serious than the original skipped
audio issue. Further investigation by Dave shows that the behaviour
depends on the clock speed of the SoC - a better fix is neeeded.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Jarkko Nikula [Wed, 12 Nov 2008 15:05:51 +0000 (17:05 +0200)]
ASoC: OMAP: Add more supported sample rates into McBSP DAI driver
Originally it was put too tight limits to support only 44.1 kHz and 48 kHz
sample rates in McBSP DAI driver. Extend it now to 8 kHz - 96 kHz. With
96 kHz and 2*16 bits, bit clock is 3.072 MHz < 3.125 MHz (I2S max?).
Tested on Nokia N810 with TVL320AIC33 from rates 8 - 96 kHz and on Texas
Instruments Beagle with TWL4030 from rates 8 - 48 kHz.
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Acked-by: Steve Sakoman <steve@sakoman.com> Acked-by: Arun KS <arunks@mistralsolutions.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Jarkko Nikula [Wed, 12 Nov 2008 15:05:41 +0000 (17:05 +0200)]
ASoC: Fix supported sample rates of TWL4030 audio codec
TWL4030 currently supports rates between 8 kHz and 48 kHz and sets the codec
mode register accordingly in twl4030_hw_params. Expose this info so that
ASoC can match other rates than 44.1 kHz or 48 kHz as well.
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Acked-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Hugo Villeneuve [Sat, 8 Nov 2008 18:26:09 +0000 (13:26 -0500)]
ASoC: Add Right-Justified mode and Codec clock master to davinci-i2s
The TI DVEVM board uses the SND_SOC_DAIFMT_CBM_CFM & I2S formats, but the
Lyrtech SFFSDR board uses the SND_SOC_DAIFMT_CBM_CFS & RIGHT-JUSTIFIED formats.
Signed-off-by: Hugo Villeneuve <hugo.villeneuve@lyrtech.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
According to TRM, 256*Fs clock output should be enabled
when TWL4030 is in slave mode, not master.
This allows sound to work on OMAP3 Pandora, which uses
256*Fs clock.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Acked-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
David Anders [Wed, 5 Nov 2008 15:39:47 +0000 (07:39 -0800)]
ASoC: Add new parameter to s3c24xx_pcm_enqueue
The S3C24xx dma does not allow more than one buffer to be enqueue prior to
the dma transfers starting. This patch adds an additional parameter to
s3c24xx_pcm_enqueue() to allow for passing an initial dma maximum load
value.
Signed-off-by: David Anders <danders at amltd.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Wed, 5 Nov 2008 11:13:21 +0000 (11:13 +0000)]
ASoC: Remove core version number
Rather than try to remember to keep the core version number updated
(which hasn't been happening) just remove it. It was much more useful
when ASoC was out of tree.
Signed-off-by: Mark brown <broonie@opensource.wolfsonmicro.com>
Marek Vasut [Mon, 3 Nov 2008 12:02:12 +0000 (12:02 +0000)]
ASoC: Add Palm/PXA27x unified ASoC audio driver
this patch adds asoc audio driver for pxa27x based Palm PDAs. I tested it for
palmtx, t5 and ld, it should work with palmz72 as well (slapin, please test).
I sent it here some time ago, but now I got to fixing bugs in it. It should
be somehow mostly ok and ready for applying.
[Converted to use snd_soc_dapm_nc_pin() and bool Kconfig -- broonie]
Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Sedji Gaouaou [Fri, 3 Oct 2008 14:57:50 +0000 (16:57 +0200)]
ASoC: Merge AT91 and AVR32 support into a single atmel architecture
The Ateml AT91 and AVR32 SoC share common IP for audio and can share the
same driver code using the atmel-ssc API provided for both architectures.
Do this, creating a new unified atmel ASoC architecture to replace the
previous at32 and at91 ones.
[This was contributed as a patch series for reviewability but has been
squashed down to a single commit to help preserve both the history and
bisectability. A small bugfix from Jukka is included.]
Tested-by: Jukka Hynninen <ext-jukka.hynninen@vaisala.com> Signed-off-by: Sedji Gaouaou <sedji.gaouaou@atmel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Timur Tabi [Thu, 7 Aug 2008 16:22:32 +0000 (11:22 -0500)]
ASoC: Disable automatic volume control in the CS4270 sound driver
Disable the automatic volume control feature of the CS4270 audio codec. This
feature, which is enabled by default, causes volume change commands to be
delayed. Sometimes the volume change happens after playback is started.
Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Wed, 22 Oct 2008 21:41:11 +0000 (22:41 +0100)]
ASoC: Use finer grained dependencies in SND_SOC_ALL_CODECS
Move the bus dependencies in SND_SOC_ALL_CODECS into the individual
codec options rather than have them centrally. This allows the
inclusion of AC97 codecs when testing on platforms with AC97 support
and will also handle codecs on multi-function devices more gracefully.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Wed, 30 Jul 2008 18:12:04 +0000 (19:12 +0100)]
ASoC: Add PXA SSP support
The SSP ports PXA series processors can be used to implement a variety of
audio interface formats. This patch implements support for I2S, DSP A and
DSP B modes on these ports.
This patch is based on the previous out of tree pxa2xx-ssp driver (which
was originally written by Liam Girdwood with updates from Philipp Zabel
and Nicola Perrino) and pxa3xx-ssp driver (originally written by Seth
Forsee based on the pxa2xx-ssp driver). Testing coverage is not complete
currently.
Tested-by: Daniel Ribeiro <drwyrm@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Tue, 28 Oct 2008 13:02:31 +0000 (13:02 +0000)]
ASoC: Remove DAPM restriction on mixer control name lengths
As well as ensuring that UI-relevant parts of control names don't get
truncated in the DAPM code this avoids conflicts in long control names
that differ only at the end of a long string.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Tue, 14 Oct 2008 12:58:36 +0000 (13:58 +0100)]
ASoC: Fix handling of DAPM suspend work
Since we can query the playback stream power state directly we do not
need to infer if it is powered up from the timer being scheduled. Doing
this avoids problems that previously existed with streams being
incorrectly determined to be powered up caused when the timer is
scheduled when streams are closed after being partially set up.
Reported-by: Nobin Mathew <nobin.mathew@gmail.com> Reported-by: Jukka Hynninen <ext-jukka.hynninen@vaisala.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Troy Kisky [Tue, 14 Oct 2008 00:42:14 +0000 (17:42 -0700)]
ASoC: Allow setting codec register with debugfs filesystem
i.e. echo 6 59 >/sys/kernel/debug/soc-audio.0/codec_reg
will set register 0x06 to a value of 0x59.
Also, pop_time debugfs interface setup is moved so that it
is setup in the same function as codec_reg
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Jon Smirl [Thu, 30 Oct 2008 12:37:09 +0000 (12:37 +0000)]
ALSA: ASoC: Fix some minor errors in mpc5200 psc i2s driver
Fix missing unsigned for irqsave flags in psc i2s driver
Make attribute visiblity static
Collect all sysfs errors before checking status
[Word wrapped DEVICE_ATTR() lines for 80 columns -- broonie]
Signed-off-by: Jon Smirl <jonsmirl@gmail.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mark Brown [Thu, 30 Oct 2008 12:37:08 +0000 (12:37 +0000)]
ALSA: ASoC: Fix mono controls after conversion to support full int masks
When ASoC was converted to support full int width masks SOC_SINGLE_VALUE()
omitted the assignment of rshift, causing the control operatins to report
some mono controls as stereo. This happened to work some of the time due
to a confusion between shift and min in snd_soc_info_volsw().
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cliff Cai [Mon, 27 Oct 2008 09:09:25 +0000 (17:09 +0800)]
ALSA: ASoC: Blackfin: update SPORT0 port selector (v2)
- Setting the TFS pin selector for SPORT 0 based on whether the selected
port id F or G. If the port is F then no conflict should exist for the
TFS. When Port G is selected and EMAC then there is a conflict between
the PHY interrupt line and TFS. Current settings prevent the conflict
by ignoring the TFS pin when Port G is selected. This allows both
ssm2602 using Port G and EMAC concurrently.
- some code cleanup
Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
m68k: Disable Amiga serial console support if modular
If CONFIG_AMIGA_BUILTIN_SERIAL=m, I get the following warnings:
| drivers/char/amiserial.c: At top level:
| drivers/char/amiserial.c:2138: warning: data definition has no type or storage class
| drivers/char/amiserial.c:2138: warning: type defaults to 'int' in declaration of 'console_initcall'
| drivers/char/amiserial.c:2138: warning: parameter names (without types) in function declaration
| drivers/char/amiserial.c:2134: warning: 'amiserial_console_init' defined but not used
because console_initcall() is not defined (nor really sensible) in the
modular case.
So disable serial console support if the driver is modular.
Davide Libenzi [Fri, 17 Oct 2008 23:17:40 +0000 (16:17 -0700)]
epoll: avoid double-inserts in case of EFAULT
In commit f337b9c58332bdecde965b436e47ea4c94d30da0 ("epoll: drop
unnecessary test") Thomas found that there is an unnecessary (always
true) test in ep_send_events(). The callback never inserts into
->rdllink while the send loop is performed, and also does the
~EP_PRIVATE_BITS test. Given we're holding the mutex during this time,
the conditions tested inside the loop are always true.
HOWEVER.
The test "!ep_is_linked(&epi->rdllink)" wasn't there because we insert
into ->rdllink, but because the send-events loop might terminate before
the whole list is scanned (-EFAULT).
In such cases, when the loop terminates early, and when a (leftover)
file received an event while we're performing the lockless loop, we need
such test to avoid to double insert the epoll items. The list_splice()
done a few steps below, will correctly re-insert the ones that were left
on "txlist".
This should fix the kenrel.org bugzilla entry 11831.
Arjan van de Ven [Sat, 25 Oct 2008 19:41:41 +0000 (12:41 -0700)]
select: deal with math overflow from borderline valid userland data
Some userland apps seem to pass in a "0" for the seconds, and several
seconds worth of usecs to select(). The old kernels accepted this just
fine, so the new kernels must too.
However, due to the upscaling of the microseconds to nanoseconds we had
some cases where we got math overflow, and depending on the GCC version
(due to inlining decisions) that actually resulted in an -EINVAL return.
This patch fixes this by adding the excess microseconds to the seconds
field.
Also with thanks to Marcin Slusarz for spotting some implementation bugs
in the diagnostics patches.
Reported-by: Carlos R. Mafra <crmafra2@gmail.com> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Arjan van de Ven [Sun, 26 Oct 2008 17:25:30 +0000 (10:25 -0700)]
wireless: fix regression caused by regulatory config option
The default for the regulatory compatibility option is wrong;
if you picked the default you ended up with a non-functional wifi
system (at least I did on Fedora 9 with iwl4965).
I don't think even the October 2008 releases of the various distros
has the new userland so clearly the default is wrong, and also
we can't just go about deleting this in 2.6.29...
Change the default to "y" and also adjust the config text a little to
reflect this.
This patch fixes regression #11859
With thanks to Johannes Berg for the diagnostics
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sun, 26 Oct 2008 16:36:19 +0000 (09:36 -0700)]
Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
* 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
hwmon: (abituguru3) enable DMI probing feature on AW9D-MAX
hwmon: (abituguru3) Cosmetic whitespace fixes
hwmon: (adt7473) Fix voltage conversion routines
hwmon: (lm90) Add support for the LM99 16 degree offset
hwmon: (lm90) Fix handling of hysteresis value
hwmon-vid: Add support for AMD family 10h CPUs
hwmon: (w83781d) Fix linking when built-in
The code has both a short existence and an increasing track of failures
despite some work to amend it for -rc1. It is not just a matter of
reading the eeprom: sometimes the eeprom is read correctly, then the mac
address is not written correctly back into the mac registers.
Some chipsets seem to work reliably but it is not clear at this point if
the code can simply be made to work on a per-chipset basis and post -rc1
is not the place where I want to experiment these things.
Al Viro [Sun, 26 Oct 2008 05:40:26 +0000 (05:40 +0000)]
arm ide breakage
a) semicolon before the function body is a bad idea
b) it's const struct foo, not struct const foo
c) incidentally, it's ecard_remove_driver(), not ecard_unregister_driver()
d) compiling is occasionally useful.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sun, 26 Oct 2008 05:12:34 +0000 (05:12 +0000)]
fix allmodconfig breakage
If you use KCONFIG_ALLCONFIG (even with empty file) you get broken
allmodconfig/allyesconfig; CONFIG_MODULES gets turned off, with obvious
massive fallout.
Breakage had been introduced when conf_set_all_new_symbols() got used
for allmodconfig et.al.
What happens is that sym_calc_value(modules_sym) done in
conf_read_simple() sets SYMBOL_VALID on both modules_sym and MODULES.
When we get to conf_set_all_new_symbols(), we set sym->def[S_DEF_USER]
on everything, but it has no effect on sym->curr for the symbols that
already have SYMBOL_VALID - these are stuck.
Solution: use sym_clear_all_valid() in there. Note that it makes
reevaluation of modules_sym redundant - sym_clear_all_valid() will do
that itself.
hwmon: (abituguru3) enable DMI probing feature on AW9D-MAX
Switch the AW9D-MAX over from port probing to the preferred DMI
probe method.
Signed-off-by: Alistair John Strachan <alistair@devzero.co.uk> Tested-by: Justin Piszcz <jpiszcz@lucidpixels.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
As the probable result of zealous copy/pasting, many supported boards
contain sensor names with trailing whitespace. Though this is not a
huge problem, it is inconsistent with other sensor names, and with
other similar hwmon drivers.
Additionally, the DMI nag message added in 2.6.27 was missing a
space between two sentence fragments -- might as well clean that up
too.
Doesn't alter any kernel text, just data.
Signed-off-by: Alistair John Strachan <alistair@devzero.co.uk> Reported-by: Justin Piszcz <jpiszcz@lucidpixels.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>