Add an AMDTP stream error state that occurs when we fail to queue
another packet. In this case, the stream is stopped, and the error can
be reported when the application tries to restart the PCM stream.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
For correct cache coherency on some architectures, DMA buffers must be
allocated in a different cache line than data that is concurrently used
by the CPU.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Clemens Ladisch [Tue, 15 Mar 2011 06:55:02 +0000 (07:55 +0100)]
ALSA: firewire-lib: use no-info SYT for packets without SYT sample
In non-blocking mode, the SYT_INTERVAL is larger than the number of
audio frames in each packet, so there are packets that do not contain
any frame to which the SYT could be applied. For these packets, the
SYT must not be the timestamp of the next valid SYT frame, but the
special no-info SYT value.
This fixes broken playback on the FireWave at 44.1 kHz.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add a driver for two playback-only FireWire devices based on the OXFW970
chip.
v2: better AMDTP API abstraction; fix fw_unit leak; small fixes
v3: cache the iPCR value
v4: FireWave constraints; fix fw_device reference counting;
fix PCR caching; small changes and fixes
v5: volume/mute support; fix crashing due to pcm stop races
v6: fix build; one-channel volume for LaCie
v7: use signed values to make volume (range checks) work; fix function
block IDs for volume/mute; always use channel 0 for LaCie volume
Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Tested-by: Jay Fenlason <fenlason@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Vitaliy Kulikov [Thu, 10 Mar 2011 19:43:35 +0000 (13:43 -0600)]
ALSA: hda - pin-adc-mux-dmic auto-configuration of 92HD8X codecs
This patch replaces use of the harcoded arrays of pins, muxes, digital
mics and adcs with the auto-generated ones using codec parsing and
auto-discovers all actually connected digital mic pins on 92HD8X-like
codecs
This patch also adds the support for d-mic on pin 0x20.
Vitaliy Kulikov [Thu, 10 Mar 2011 01:47:43 +0000 (19:47 -0600)]
ALSA: hda - fix digital mic selection in mixer on 92HD8X codecs
When the mux for digital mic is different from the mux for other mics,
the current auto-parser doesn't handle them in a right way but provides
only one mic. This patch fixes the issue.
Takashi Iwai [Thu, 10 Mar 2011 13:11:59 +0000 (14:11 +0100)]
ALSA: hda - Move default input-src selection to init part
Move the default input-src selection code for alc268/269 to the init
part instead of the parser. The input-src selection might be overwritten
by init verbs.
Takashi Iwai [Thu, 10 Mar 2011 11:51:11 +0000 (12:51 +0100)]
ALSA: hda - Initialize special cases for input src in init phase
Currently some special handling for the unusual case like dual-ADCs
or a single-input-src is done in the tree-parse time in
set_capture_mixer(). But this setup could be overwritten by static
init verbs.
This patch moves the initialization into the init phase so that
such input-src setup won't be lost.
Paul Bolle [Fri, 11 Mar 2011 10:24:52 +0000 (11:24 +0100)]
ALSA: intel8x0m: wait a bit before warm reset check
At every resume a laptop I use prints this message (at KERN_ERR level):
ALSA sound/pci/intel8x0m.c:904: AC'97 warm reset still in progress? [0x2]
The thing to note here is that 0x2 corresponds to ICH_AC97COLD. Ie, what
seems to be happening is that the register involved indicated a warm
reset for some time (as the ICH_AC97WARM bit was set) but by the time
the warning is printed, and that same register is checked again, that
bit is already cleared and only the ICH_AC97COLD bit is still set.
It turns out a warm reset needs some time to settle, but it is currently
checked right away. The test therefore fails the first time it is done
and schedule_timeout_uninterruptible() will be called. Once we return
from that jiffies is already (far) past end_time on this laptop, so we
exit the loop, print a warning, and exit the function while the warm
reset actually succeeded.
A way to fix this is to call usleep_range() after writing to the
register involved. A handful of tests suggest 500 usecs is a safe value.
(This might punish the "finish cold reset" case, but on this laptop such
a cold reset apparently never happens, so I can't say for sure.)
While we're at it drop the extra single tick from end_time, as it looks
rather silly.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Oliver Neukum [Fri, 11 Mar 2011 13:51:12 +0000 (14:51 +0100)]
ALSA: usbaudio: implement USB autosuspend
Devices are autosuspended if no pcm nor midi channel is open
Mixer devices may be opened. This way they are active when
in use to play or record sound, but can be suspended while
users have a mixer application running.
[Small clean-ups using static inline by tiwai]
Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds ASoC support for the MAX9850 codec with headphone
amplifier.
Supported features:
- Playback
- 16, 20 and 24 bit audio
- 8k - 48k sample rates
- DAPM
Signed-off-by: Christian Glindkamp <christian.glindkamp@taskit.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ALSA: hda: Prevent writing ICH6_PCIREG_TCSEL on AMD systems
azx_init_pci() always writes PCI config register ICH6_PCIREG_TCSEL
although this looks to be only defined on Intel systems and has a
different meaning on AMD systems. On AMD systems the PCI interrupt pin
control register is modified instead.
Since the meaning of offset 0x44 in device specific configuration space is
unknown for devices by other vendors, we only exclude AMD systems to
retain the current behaviour.
Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: HDA: Fixup unnecessary volume control index on Realtek ALC88x
Without this change, a volume control named "Surround" or "Side" would
get an unnecessary index, causing it to be ignored by the vmaster and
PulseAudio.
Takashi Iwai [Wed, 9 Mar 2011 16:33:48 +0000 (17:33 +0100)]
sound: Use sound_register_*() for additional OSS minor devices
Since OSS driver creates the device entries for /dev/audio* and
/dev/dspW* by itself without coping with sound_core, it leads to
conflicts with others and let sysfs spewing warnings.
This patch rewrites the registration part of OSS driver to use
the standard method also for additional minor devices.
Reported-by: Steven Rostedt <rostedt@goodmis.org> (with ktest.pl) Tested-by: Steven Rostedt <rostedt@goodmis.org> (with ktest.pl) Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Improve EP93xx I2S clocks management.
Some freqs values are set not exact as they requested for MCLK and
original code was not able to find divisors for SCLK and LRCLK.
This code just picks up nearest value from 3 possible variants.
This patch makes 44100 and 192000 rates working and fixes
capture function (by selecting SCLK/LRCLK=64 where possible).
All other rates should work as before.
Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: EDB93xx: Manage I2S rates according to datasheet for CS4271 CODEC.
Manage I2S rates according to datasheet for CS4271 CODEC in EDB93xx
machine driver.
Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: Manage mode and rate bits correctly for CS4271 CODEC.
Manage mode and rate bits correctly, according to datasheet in CS4271 CODEC.
This is done to make capture work properly.
Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Wed, 9 Mar 2011 11:33:09 +0000 (11:33 +0000)]
ASoC: Fix double addition of prefixes due to widget prefixing
We're not only prefixing all controls, we're also prefixing the widget
names in the runtime data. This causes us to add the prefix twice - once
when using the widget name to generate the control name and once when
adding the control.
Really we shouldn't be prefixing the widget names at all, the matching
code should be handing this as we always know which DAPM context a
widget came from and always display the widget name in terms of a DAPM
context. However, we're quite close to the merge window and that's
relatively invasive.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Reported-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com>
Mark Brown [Tue, 8 Mar 2011 19:29:53 +0000 (19:29 +0000)]
ASoC: Use the correct DAPM context when cleaning up final widget set
Now we've got multi-component we need to make sure that the DAPM context
(and hence register I/O context) we use to apply the pending updates at
the end of a DAPM sequence is the one we were processing rather than the
one that was used to initate the state change.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Mark Brown [Tue, 8 Mar 2011 18:52:08 +0000 (18:52 +0000)]
ASoC: Simplify WM9081 speaker startup by using widgets for spaker output
Now we have a register write minimisation code in DAPM we don't need to
worry about the ordering of the enable and disable of the PGA and the
output stage.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Abhilash K V [Tue, 8 Mar 2011 15:32:43 +0000 (21:02 +0530)]
ASoC: AM3517: Update codec name after multi-component update
The i2c client device name (".2-001a" in this case, including
the separator period) for the AIC23 codec on the TI AM3517-EVM
was appended to the codec_name member of am3517evm_dai to
resolve the names mismatch happening in soc_bind_dai_link(),
due to which the card was not getting registered.
Signed-off-by: Abhilash K V <abhilash.kv@ti.com> Acked-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Mark Brown [Tue, 8 Mar 2011 17:23:24 +0000 (17:23 +0000)]
ASoC: Fix prefixing of DAPM controls by factoring prefix into snd_soc_cnew()
Currently will ignore prefixes when creating DAPM controls. Since currently
all control creation goes through snd_soc_cnew() we can fix this by factoring
the prefixing into that function.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
Mark Brown [Tue, 8 Mar 2011 00:17:56 +0000 (00:17 +0000)]
ASoC: Warn rather than set a silly constraint when we can't do symmetry
Symmetric rate configuration can fail if the second stream starting tries
to apply the symmetric constraint before the first stream has got far
enough to pick a rate. Rather than try to enforce a nonsensical rate of
0Hz log a warning and allow the application to carry on. Things might go
wrong later on but the user will know about it and there's unlikely to be
lasting damage.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
Mark Brown [Mon, 7 Mar 2011 20:58:11 +0000 (20:58 +0000)]
ASoC: Provide CODEC clocking operations and API calls
When multi component systems use DAIless amplifiers which require clocking
configuration it is at best hard to use the current clocking API as this
requires a DAI even though the device may not even have one. Address this
by adding set_sysclk() and set_pll() operations and APIs for CODECs.
In order to avoid issues with devices which could be used either with or
without DAIs make the DAI variants call through to their CODEC counterparts
if there is no DAI specific operation. Converting over entirely would create
problems for multi-DAI devices which offer per-DAI clocking setup.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
Mark Brown [Mon, 7 Mar 2011 16:38:44 +0000 (16:38 +0000)]
ASoC: Add DAPM widget and path data to CODEC driver structure
Allow a slight simplification of CODEC drivers by allowing DAPM routes and
widgets to be provided in a table. They will be instantiated at the end of
CODEC probe.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
Clemens Ladisch [Mon, 7 Mar 2011 12:24:30 +0000 (13:24 +0100)]
ALSA: control: clean up snd_ctl_hole_check()
The return value of snd_ctl_hole_check() is used only to detect whether
to continue the loop in snd_ctl_find_hole() or not, so we can simplify
the code by changing this return type to a boolean. Also rename this
function to better show what it actually does.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Clemens Ladisch [Mon, 7 Mar 2011 12:22:50 +0000 (13:22 +0100)]
ALSA: control: fix numid conflict check for new controls
The purpose of the snd_ctl_hole_check() function is to find conflicts
between the numerical IDs of the new control and those of any existing
controls. However, it would fail to detect an existing control whose
count is smaller than the new control's count and whose interval of IDs
is entirely contained in the interval of the new control's IDs.
To fix this, use the correct formula to detect overlapping intervals,
which happens to simplify the condition.
This problem was not encountered so far because ALSA does not yet allow
drivers to allocate specific control IDs.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Linus Torvalds [Tue, 8 Mar 2011 04:46:39 +0000 (20:46 -0800)]
Merge branch 's5p-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung
* 's5p-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
ARM: S3C64XX: Update regulator names for debugfs compatiblity on SMDK6410
ARM: S3C64XX: Fix build with WM1190 disabled and WM1192 enabled on SMDK6410
ARM: S3C64XX: Reduce output of s3c64xx_dma_init1()
ARM: S3C64XX: Tone down SDHCI debugging
ARM: S3C64XX: Add clock for i2c1
ARM: S3C64XX: Staticise non-exported GPIO to interrupt functions
ARM: SAMSUNG: Include devs.h in dev-uart.c to prototype devices
ARM: S3C64XX: Fix keypad setup to configure correct number of rows
ARM: S3C2440: Fix usage gpio bank j pin definitions on GTA02
ARM: S5P64X0: Fix number of GPIO lines in Bank F
ARM: S3C2440: Select missing S3C_DEV_USB_HOST on GTA02
Linus Torvalds [Tue, 8 Mar 2011 04:43:55 +0000 (20:43 -0800)]
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
drm: index i shadowed in 2nd loop
drm/nv50-nvc0: prevent multiple vm/bar flushes occuring simultanenously
drm/nouveau: fix regression causing ttm to not be able to evict vram
drm/i915: Rebind the buffer if its alignment constraints changes with tiling
drm/i915: Disable GPU semaphores by default
drm/i915: Do not overflow the MMADDR write FIFO
Revert "drm/i915: fix corruptions on i8xx due to relaxed fencing"
Dmitry Shmidt [Thu, 3 Mar 2011 22:40:10 +0000 (17:40 -0500)]
mmc: sdio: Allow sdio operations in other threads during sdio_add_func()
This fixes a bug introduced by 807e8e40673d ("mmc: Fix sd/sdio/mmc
initialization frequency retries") that prevented SDIO drivers from
performing SDIO commands in their probe routines -- the above patch
called mmc_claim_host() before sdio_add_func(), which causes a deadlock
if an external SDIO driver calls sdio_claim_host().
Fix tested on an OLPC XO-1.75 with libertas on SDIO.
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> Reviewed-and-Tested-by: Chris Ball <cjb@laptop.org> Signed-off-by: Chris Ball <cjb@laptop.org>
Dave Airlie [Mon, 7 Mar 2011 21:18:35 +0000 (07:18 +1000)]
Merge remote branch 'ickle/drm-intel-fixes' into drm-fixes
* ickle/drm-intel-fixes:
drm/i915: Rebind the buffer if its alignment constraints changes with tiling
drm/i915: Disable GPU semaphores by default
drm/i915: Do not overflow the MMADDR write FIFO
Revert "drm/i915: fix corruptions on i8xx due to relaxed fencing"
Linus Torvalds [Mon, 7 Mar 2011 21:14:19 +0000 (13:14 -0800)]
Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
[S390] tape: deadlock on system work queue
[S390] keyboard: integer underflow bug
[S390] xpram: remove __initdata attribute from module parameters
The per-vm mutex doesn't prevent this completely, a flush coming from the
BAR VM could potentially happen at the same time as one for the channel
VM. Not to mention that if/when we get per-client/channel VM, this will
happen far more frequently.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru> Acked-by: Ryan Mallon <ryan@bluewatersys.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: Extend range of supported sample rates for CS4271 CODEC.
Extend range of supported sample rates for CS4271 CODEC.
Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: Add driver for the dfbmcs320 bluetooth module
This patch adds a codec driver for the dfbmcs320 bluetooth module, which is used
on the neo1973 boards.
The patch also modifies the neo1937_wm8753 sound board driver to use the new
driver instead of registering the bluetooth DAI manually.
Previously there was a name mismatch between the bluetooth DAI and the bluetooth
DAI link and the sound card was not instantiated, with this patch the issue is
no longer present and sound support works again.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: Samsung: Merge neo1937_wm8753 and neo1973_gta02_wm8753 sound board driver
The neo1973(GTA01) and neo1973_gta02(GTA02) have a very similar audio hardware
setup. They both use the same codec with the same routing to the gsm modem and
bluetooth chip. But they do use different AMPs though and there are some minor
differences in the speaker setup.
As a result most of the code of those two drivers is identical.
So from a maintenance point of view it makes sense to merge them into a single
driver. It also reduces the size of kernel images supporting both the GTA01 and
GTA02.
As a side-effect of this merge the GTA01 for example gains support for routing
audio to and from the bluetooth DAI.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This patch drops the lm4853_{set,get}_state functions and the "Amp State Switch"
control.
Those were noops which existed to maintain alsa state file compatibility. Since
the control names have changed due to internal changes in the ASoC core and
state file compatibility was broken anyway it makes sense to drop them.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: neo1973_wm8753: Move lm4857 specefic code to its own module
This patch moves the code for the lm4857 AMP from the neo1973_wm8753 sound
board driver to its own module.
The lm4857 is a generic AMP IC and not specific to the neo1973.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
It has been proven to be inflexible to do scenario management in kernel space.
Since actual neo1973 board support has not been merged in mainline and this
patch has been in the neo1973 tree for some time now it should be safe to remove
this functionality without breaking existing userspace.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Javier Martin [Mon, 7 Mar 2011 07:47:09 +0000 (08:47 +0100)]
ASoC: Add machine driver for Visstrim_M10 board.
Visstrim_M10 boards have an external tlcv320aic3205 codec
attached to SSI1. This driver glues together both interfaces.
External amplifier is not supported in this first version.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Fri, 4 Mar 2011 07:22:03 +0000 (15:22 +0800)]
ASoC: Constify i2c_device_id table
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Alexander Sverdlin <subaparts@yandex.ru> Acked-by: Timur Tabi <timur@freescale.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>