The connection lists are static and we can reuse the previous results
instead of querying via verb at each time. This will reduce the I/O
in the runtime especially for some codec auto-parsers.
ALSA: hda - Remove superfluous inits for ALC662 auto-parser
Since we now set up the connections and mutes dynamically in the
auto-parser, all static initializations via alc662_init_verbs & co are
no longer needed. Let's drop them.
ALSA: hda - Unmute mixer dynamically in alc662 auto-parser
Instead of static init array, better to determine the connection and
the mute status of the pin/mixer/DAC route dynamically. This fixes the
uninitialized mixer 0x0f on ALC892.
ALSA: HDA: Fix single internal mic on ALC275 (Sony Vaio VPCSB1C5E)
In cases where there is only one internal mic connected to ADC 0x11,
alc275_setup_dual_adc won't handle the case, so we need to add the
ADC node to the array of candidates.
The MCP7x hardware computes the audio infoframe channel count
automatically, but requires the audio driver to set the audio
infoframe checksum manually via the Nv_VERB_SET_Info_Frame_Checksum
control verb.
When audio starts playing, nvhdmi_8ch_7x_pcm_prepare sets the checksum
to (0x71 - chan - chanmask). For example, for 2ch audio, chan == 1
and chanmask == 0 so the checksum is set to 0x70. When audio playback
finishes and the device is closed, nvhdmi_8ch_7x_pcm_close resets the
channel formats, causing the channel count to revert to 8ch. Since
the checksum is not reset, the hardware starts generating audio
infoframes with invalid checksums. This causes some displays to blank
the video.
Fix this by updating the checksum and channel mask when the device is
closed and also when it is first initialized. In addition, make sure
that the channel mask is appropriate for an 8ch infoframe by setting
it to 0x13 (FL FR LFE FC RL RR RLC RRC).
ALSA: hda - Split EAPD init to a separate array from alc662_init_verbs
So far, alc662_init_verbs[] is used for all ALC662-compatible chips,
but the EAPD controls for 0x15 in there is invalid for ALC892.
Also, since EAPDs should be set up in alc_auto_init_amp(), these static
elements aren't needed for auto-parser, too.
In this patch, the EAPD init verbs are split from alc662_init_verbs,
and applied only to static quirks.
The current alc662 parser doesn't set the DAC for the mixer 0x0f
properly for ALC892, which has 4 DACs while ALC662 has 3.
Fixed by implementing alc662_mix_to_dac() more genericly with the
dynamic widget list.
ALSA: hda - Correct initial dac_nids for some ALC272-quirks
Some ALC272-quirks use alc662_dac_nids instead of alc272_dac_nids.
This patch fixes these entries. No functional change since the first
two elements are identical in both arrays.
ALSA: usb-audio: define another USB ID for a buggy USB MIDI cable
There are many USB MIDI cables out there that have buggy
firmware that reports it can do more than 4 bytes in a
packet when they can only properly handle 4
This patch adds the ID of yet another one of those cables
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)
wordsize is used as the textual width of a register address.
regsize is used as the textual width of a register value.
The assignments to these values were swapped. In the case of WM8903, which
has 8-bit register addresses and 16-bit register values, this caused the
register values to be clipped to 2 digits instead of the full 4.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Stephen Warren [Fri, 1 Apr 2011 20:50:43 +0000 (14:50 -0600)]
ASoC: Name jack GPIOs based on jack not codec
snd_soc_jack_gpio has a name field. Use that name when registering the IRQ,
since this is far more informative than the codec driver name. This shows
up in /proc/interrupts.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
pxa2xx_pcm_hw_free frees dma channel and sets prtd->dma_ch to -1,
but does not set prtd->params to NULL, so if pxa2xx_pcm_hw_params will
be called immediately, it leaves prtd->dma_ch initialized with -1,
and it results in oops in __pxa2xx_pcm_prepare. This bug is triggered
via SDL.
This patch adds check for prtd->dma_ch to __pxa2xx_pcm_prepare and
cleans prtd->params, so now it works properly.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
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>
ASoC: soc-cache: Warn on syncing any non-writable registers
When syncing the cache, if the driver has given us a writable_register()
callback, use it to check if we are syncing a non-writable register
and if so warn the user.
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
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>
Antonio Ospite [Fri, 18 Mar 2011 11:47:33 +0000 (12:47 +0100)]
ASoC: zylonite: set .codec_dai_name in initializer
Fix the initialization of .codec_dai_name in zylonite_dai initializer,
do not mix it with the initialization of .codec_name which is set
already a few lines above.
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it> Acked-by: Eric Miao <eric.y.miao@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Barry Song [Mon, 28 Mar 2011 05:45:10 +0000 (01:45 -0400)]
ASoC: Blackfin: push down SPORT settings from global variables
Now that we have multi-component support, take the time to unify the
SPORT implementations a bit and make the setup dynamic. This kills
off the global sport_handle which was shared across all the Blackfin
machine drivers. The pin management aspect is off loaded to platform
resources, and now multiple SPORTs can be instantiated simultaneously.
Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Scott Jiang <scott.jiang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mike Frysinger [Mon, 28 Mar 2011 05:45:09 +0000 (01:45 -0400)]
ASoC: Blackfin: standardize machine driver names
Some machine drivers were using "bf5xx-", others were using "bf5xx_",
while others were using "bfin-". Further, some were using the same
name in the transport layer which makes it hard to use different codecs
at the same time. So standardize all of them to "bfin-" and make sure
they are name spaced according to their driver name.
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Scott Jiang [Sun, 27 Mar 2011 09:33:04 +0000 (05:33 -0400)]
ASoC: Blackfin: add ad193x sysclk configuration
Signed-off-by: Scott Jiang <scott.jiang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cliff Cai [Sun, 27 Mar 2011 21:22:57 +0000 (17:22 -0400)]
ASoC: SSM2602: convert to soc-cache
Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>