* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: HDA: Do not announce false surround in Conexant auto
ALSA: HDA: Conexant auto: Handle multiple connections to ADC node
ALSA: HDA: Add position_fix quirk for an Asus device
ALSA: caiaq - Fix possible string-buffer overflow
ALSA: au88x0 - Modify pointer callback to give accurate playback position
Without this patch, one line-out and one speaker and
Conexant's auto parser would announce (non-working) surround
capabilities.
BugLink: http://bugs.launchpad.net/bugs/721126
Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Conexant 20641 has several inputs to its ADC node, with one selector
and individual amps for all inputs. This patch adds support in the
Conexant auto parser to handle that case.
It also means that the pin node's volume is being renamed to "Boost"
to avoid name clash with the new volume controls on the ADC node.
BugLink: http://bugs.launchpad.net/bugs/719524
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The bug reporter claims that position_fix=1 is needed for his
microphone to work. The controller PCI vendor-id is [1002:4383] (rev 40).
Reported-by: Kjell L.
BugLink: http://bugs.launchpad.net/bugs/718402
Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Use strlcpy() to assure not to overflow the string array sizes by
too long USB device name string.
Reported-by: Rafa <rafa@mwrinfosecurity.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: hda - add quirk for Ordissimo EVE using a realtek ALC662
ALSA: hrtimer: remove superfluous tasklet invocation
ALSA: hrtimer: handle delayed timer interrupts
ALSA: HDA: Add subwoofer quirk for Acer Aspire 8942G
ALSA: hda - Don't handle empty patch files
ALSA: hda - Fix missing CA initialization for HDMI/DP
ALSA: usbaudio - Enable the E-MU 0204 USB
ALSA: hda - switch lfe with side in mixer for 4930g
ASoC: Improve WM8994 digital power sequencing
ASoC: Create an AIF1ADCDAT signal widget to match AIF2
asoc: davinci: da830/omap-l137: correct cpu_dai_name
ASoC: fill in snd_soc_pcm_runtime.card before calling snd_soc_dai_link.init()
This netbook has a only one jack output and an internal mic.
By default, mic and jack sense aren't working. Using lenovo-101e
parameters makes both work.
The device seems based on a Sharetronic Q70, so this should fix audio for
this model too.
Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Commit bb758e9637 removed snd_hrtimer_callback() from the hardware
interrupt handler, thus moving it into a tasklet, but did not tell the
ALSA timer framework about this, so the timer handling would now be done
in the ALSA timer tasklet scheduled from another tasklet.
To fix this, add the flag to tell the ALSA timer framework that the
timer handler is already being invoked in a tasklet.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
If a timer interrupt was delayed too much, hrtimer_forward_now() will
forward the timer expiry more than once. When this happens, the
additional number of elapsed ALSA timer ticks must be passed to
snd_timer_interrupt() to prevent the ALSA timer from falling behind.
This mostly fixes MIDI slowdown problems on highly-loaded systems with
badly behaved interrupt handlers.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-and-tested-by: Arthur Marsh <arthur.marsh@internode.on.net>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
According to the reporter, node 0x15 needs to be muted for subwoofer
to stop sounding. This pin is marked as unused by BIOS, so fix that.
BugLink: http://bugs.launchpad.net/bugs/715877
Cc: stable@kernel.org (2.6.37+)
Reported-by: Hans Peter
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When an empty string is passed to patch option, the driver should
ignore it. Otherwise it gets an error by trying to load it.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The commit 53d7d69d8f
ALSA: hdmi - support infoframe for DisplayPort
dropped the initialization of CA field accidentally.
This resulted in only two-channel LPCM mode on Nvidia machines.
Reference: kernel bug 28592
https://bugzilla.kernel.org/show_bug.cgi?id=28592
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
The AACI TRM requires the MAINCR enable bit to be held zero for two
bitclk cycles plus three apb_pclk cycles. Use a delay of 1us to
ensure this.
Ensure that writes to MAINCR to change the addressed codec only happen
when required, and that they take effect in a similar manner to the
above, otherwise we seem to occasionally have stuck slot busy bits.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Built-in sub-woofer can now be controlled by lfe slider instead of
side slider on Acer Aspire 5930g
Signed-off-by: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: use linux/io.h to fix compile warnings
ALSA: hda - Fix memory leaks in conexant jack arrays
ASoC: CX20442: fix NULL pointer dereference
ASoC: Amstrad Delta: fix const related build error
ALSA: oxygen: fix output routing on Xonar DG
sound: silent echo'ed messages in Makefile
ASoC: Fix mask/val_mask confusion snd_soc_dapm_put_volsw()
ASoC: DaVinci: fix kernel panic due to uninitialized platform_data
ALSA: HDA: Fix microphone(s) on Lenovo Edge 13
ASoC: Fix module refcount for auxiliary devices
ALSA: HDA: cxt5066 - Use asus model for Asus U50F, select correct SPDIF output
ALSA: HDA: Add a new model "asus" for Conexant 5066/205xx
ALSA: HDA: Refactor some redundant code for Conexant 5066/205xx
On WM8994 revision D and earlier ensure optimal sequencing with
simultaneous usage of AIF1 and AIF2 by tying the signals together
so if paths through both are connected the streams are started
simultaneously.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org
Due to the different routing for AIF1 and AIF2 we weren't using a
single widget to represent the ADCDAT signal. For consistency add
one.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org
McASP1 is used on the DA830/OMAP-L137 platform for the codec.
This is different from the DA850/OMAP-L138 platform which uses McASP0.
This is fixed by adding a new snd_soc_dai_link struct.
Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The .card member of the snd_soc_pcm_runtime structure pointed to by the
snd_soc_dai_link.init() argument used to be initialized before the
function being called. This has changed, probably unintentionally,
after recent refactorings. Since the function implementations are free
to make use of this pointer, move its assignment back before the
function is called to avoid NULL pointer dereferences.
Created and tested on Amstrad Delta againts linux-2.6.38-rc2
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
For helping to reduce Greert's regression list...
src/sound/drivers/mtpav.c: error: implicit declaration of function 'inb'
src/sound/drivers/mtpav.c: error: implicit declaration of function 'outb'
...
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The Conexant codec driver adds the jack arrays in init callback which
may be called also in each PM resume. This results in the addition of
new jack element at each time.
The fix is to check whether the requested jack is already present in
the array.
Reference: Novell bug 668929
https://bugzilla.novell.com/show_bug.cgi?id=668929
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The CX20442 codec driver never provided the snd_soc_codec_driver's
.reg_cache_default member. With the latest ASoC framework changes, it
seems to be referred unconditionally, resulting in a NULL pointer
dereference if missing. Provide it.
Created and tested on Amstrad Delta against linux-2.6.38-rc2
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The Amstrad Delta ASoC driver used to override the digital_mute()
callback, expected to be not provided by the on-board CX20442 CODEC
driver, with its own implementation. While this is still posssible when
substituting the whole empty snd_soc_dai_driver.ops member (the CX20442
case), replacing snd_soc_dai_ops.digital_mute only is no longer correct
after the snd_soc_dai_driver.ops member has been constified, and results
in build error.
Drop this actually not used code path in hope the CX20442 driver never
provides its own snd_soc_dai_ops structure.
Created and tested against linux-2.6.38-rc2
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This card uses separate I2S outputs for the front speakers and
headphones, and reverses the order of the three speaker outputs.
To work around this, add a model-specific callback to adjust the
controller's playback routing.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: HDA: Fix automute on Thinkpad L412/L512
ALSA: HDA: Fix dmesg output of HDMI supported bits
ALSA: fix invalid hardware.h include in ac97c for AVR32 architecture
ASoC: correct link specifications for corgi, poodle and spitz
ASoC: Samsung: Fix outdated cpu_dai_name for s3c24xx i2s
ASoC: Fix codec device id format used by some dai_links
ALSA: azt3328 - fix broken AZF_FMT_XLATE macro
ALSA: Xonar, CS43xx: Don't overrun static array
ASoC: Handle low measured DC offsets for wm_hubs devices
ASoC: da8xx/omap-l1xx: match codec_name with i2c ids
ASoC: WM8994: fix wrong value in tristate function
ASoC: WM8995: Fix incorrect use of snd_soc_update_bits()
snd_soc_dapm_put_volsw() has variables for both the unshifted and
shifted mask for updates commit 97404f (ASoC: Do DAPM control updates in
the middle of DAPM sequences) got confused between the two of these.
Since there's no need to keep a copy of the unshifted mask fix this and
simplify the code by using only one mask variable.
[Completely rewrote the changelog to describe the issue -- broonie.]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This patch fixes the Kernel panic issue on accessing davinci_vc in
cq93vc_probe function. struct davinci_vc is part of platform device's
private driver data(codec->dev->p->driver_data) and this is populated
by DaVinci Voice Codec MFD driver.
Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
BugLink: http://bugs.launchpad.net/bugs/708521
This Edge 13 model has an internal mic at 0x1a and should
therefore use the asus quirk.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Commit f6c2ed5 "ASoC: Fix the device references to codec and platform drivers"
moved codec driver refcount increments from soc_bind_dai_link into
soc_probe_codec.
However, the commit didn't remove try_module_get from soc_probe_aux_dev so
the auxiliary device reference counts are incremented twice as the
soc_probe_codec is called from soc_probe_aux_dev too.
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
BugLink: http://bugs.launchpad.net/bugs/707902
More Thinkpad machines with invalid SKU found, that disables
automute between speakers and headphones on these machines.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Relying on the access time of peripherals is unreliable - it depends
on the speed of the CPU and the bus. On Versatile Express, these
timeouts were expiring, causing the driver to fail.
Add udelay(1) to ensure that they don't expire early, and adjust
timeouts to give a reasonable margin over the response times.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Ensure that a timeout coincident with the condition being waited for
results in success rather than failure. This helps avoid timeout
conditions being inappropriately flagged.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This typo caused the dmesg output of the supported bits of HDMI
to be cut off early.
Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch fixes the non-compiling AC97C driver for AVR32 architecture by
include mach/hardware.h only for AT91 architecture. The AVR32 architecture does
not supply the hardware.h include file.
Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
CC: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ASoC DAI link descriptions for Corgi, Poodle and Spitz platforms
contained incorrect names for cpu_dai and codec, which effectievly disabled sound
on theese platforms. Fix that errors.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
During the multi-component patch the s3c24xx i2s driver was renamed from
"s3c24xx-i2s" to "s3c24xx-iis", while the sound board drivers were not
updated to reflect this change as well.
As a result there is no match between the dai_link and the i2s driver and no
sound card is instantiated.
This patch fixes the problem by updating the sound board drivers to use
"s3c24xx-iis" for the cpu_dai_name.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
The id part of an I2C device name is created with the "%d-%04x" format string.
So for example for an I2C device which is connected to the adapter with the id 0
and has its address set to 0x1a the id part of the devices name would be
"0-001a".
Currently some sound board drivers have the id part the codec_name field of
their dai_link structures set as if it had been created by a "%d-0x%x" format
string. For example "0-0x1a" instead of "0-001a".
As a result there is no match between the codec device and the dai_link and no
sound card is instantiated.
This patch fixes it.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
Cleanly revert to non-macro implementation of
snd_azf3328_codec_setfmt(), to fix last-minute functionality breakage
induced by following checkpatch.pl recommendations without giving them
their due full share of thought ("revolting computer, ensuing PEBKAC").
I would like to thank Jiri Slaby for his very timely (in -rc1 even)
and unexpected (uncommon hardware) "recognition of the dangerous situation"
due to his very commendable static parser use. :)
Reported-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Changed the Asus A52J quirk to use the asus model instead of the
hp_laptop model, which fixes the external mic input. Added an Asus
U50F quirk to use the asus model. For the cxt5066 codecs, added
checking of the digital output pins to determine which digital output
nodes to use instead of always using node 0x21, since some systems
have node 0x12 connected to a SPDIF out jack.
[A slight modification for better readability by tiwai]
Signed-off-by: Andy Robinson <ajr55555@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
BugLink: http://bugs.launchpad.net/bugs/701271
This new model, named "asus", is identical to the "hp_laptop" model,
except for the location of the internal mic, which is at pin 0x1a.
It is used for Asus K52JU and Lenovo G560.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Four very similar procedures - one for each model - now
refactored into one. This isn't all duplicated code, but a step
in the right direction.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
'cs4398_regs' in 'struct xonar_cs43xx' is an array of 'u8' with a size of
8. So, this code in sound/pci/oxygen/xonar_cs43xx.c::dump_d1_registers()
for (i = 2; i <= 8; ++i)
snd_iprintf(buffer, " %02x", data->cs4398_regs[i]);
will overrun the array when 'i == 8'.
I guess that what's needed to fix it is the trivial patch below, but I
must admit that I have no idea about this code, so I may very well be
wrong. Additionally, I have no way to actually test this, so all I know is
that the below compiles. Someone who actually knows this code should take
a look before anything is comitted - consider the below (not much more
than) a bug report.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Clemens Ladisch <clemens@ladisch.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>