Machine driver for DB1200 AC97 and I2S audio systems, intended as a proper
reference asoc machine for Alchemy-based systems. AC97/I2S can be selected
at boot time by setting switch S6.7.
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Cc: Linux-MIPS <linux-mips@linux-mips.org>
Cc: alsa-devel@alsa-project.org
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
DMA can only be done from physical addresses; move the "virt_to_phys"
source/destination buffer address translation from the dbdma queueing
functions (since the hardware can only DMA to/from physical addresses)
to their respective users.
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Remove dbdma compat macros, move remaining users over to default
queueing functions and -flags.
(Queueing function signature has changed in order to give
a build failure instead of silent functional changes due
to the no longer implicitly specified DDMA_FLAGS_IE flag)
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6: (41 commits)
of: remove undefined request_OF_resource & release_OF_resource
of/sparc: Remove sparc-local declaration of allnodes and devtree_lock
of: move definition of of_chosen into common code.
of: remove unused extern reference to devtree_lock
of: put default string compare and #a/s-cell values into common header
of/flattree: Don't assume HAVE_LMB
of: protect linux/of.h with CONFIG_OF
proc_devtree: fix THIS_MODULE without module.h
of: Remove old and misplaced function declarations
of/flattree: Make the kernel accept ePAPR style phandle information
of/flattree: endian-convert members of boot_param_header
of: assume big-endian properties, adding conversions where necessary
of: use __be32 for cell value accessors
of/flattree: use OF_ROOT_NODE_{SIZE,ADDR}_CELLS DEFAULT for fdt parsing
of/flattree: use callback to setup initrd from /chosen
proc_devtree: include linux/of.h
of: make set_node_proc_entry private to proc_devtree.c
of: include linux/proc_fs.h
of/flattree: merge early_init_dt_scan_memory() common code
of: add 'of_' prefix to machine_is_compatible()
...
The MSI blacklist entry for ASUS mobo added in the commit
8ce28d6abf was based on the alsa-info
output wrongly posted. Fix the id to the right one now.
Reported-by: Sid Boyce <sboyce@blueyonder.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Replace the zero-division warning message with WARN_ON_ONCE() per the
advice by Linus. This shouldn't happen, but if it happens, it's
possible that the bug happens often due to buggy IRQs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
On my AMD780V chipset, hda_intel.c can crash the kernel with a divide by
zero
for as-yet unknown reasons. A simple check for zero prevents it, though
the problem that causes it remains. Since the workaround is harmless and
won't affect anyone except victims of this bug, it should be safe;
moreover,
because this crash can be triggered by a user-mode application, there are
denial of service implications on the systems affected by the bug without
the patch.
Signed-off-by: Jody Bruchon <jody@nctritech.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
machine is compatible is an OF-specific call. It should have
the of_ prefix to protect the global namespace.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Michal Simek <monstr@monstr.eu>
Pandora's external DAC is using 256*Fs output from the TWL4030
codec, and TWL4030 needs to have APLL enabled for it's 256*Fs
output to function.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The volume register is from 0..0x7f and 0..0x1a range is mute.
Also, fix mute combining in wm_vol_put(). The wrong behaviour was
noticed by Peter Christensen.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This renames the interrupt name in /proc/interrupt.
HDA Intel -> hda_intel
This also eliminates space from the name, probably helping some
parsers.
Don't think anybody depends on this name in userspace
Signed-off-by: Takashi Iwai <tiwai@suse.de>
My sound codec seems sometimes (very rarely) to omit interrupts (ALC268)
However, interrupt mode still works.
Thus if we get timeout, poll the codec once.
If we get 3 such polls in a row, then switch to polling mode.
This patch is maybe an bandaid, but this might be a workaround for hardware bug.
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
After hours of debugging, I finally found the reason why some source
and runtime combination does not work. The PTP (page table pages)
address must be aligned. I am not sure how much, but alignment to
PAGE_SIZE is sufficient. Also, use ALSA's page allocation routines
to ensure proper virtual -> physical address translation.
Cc: <stable@kernel.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Commit 761c9d45 (ASoC: Fix build of OMAP sound drivers) changes
CONFIG_MACH_OMAP3517EVM -> CONFIG_SND_OMAP_SOC_OMAP3517EVM in the
Makefile. Whereas the config option defined in Kconfig is
SND_OMAP_SOC_AM3517EVM. Because of this, ASoC driver for AM3517
was not getting compiled.
Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Commit e9ff5eb2 (Fixing infinite loop in resume path) uses wrong AIC23
register in resume function because of which register writes happen
on some non-existing registers.
Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
In struct device_node, the phandle is named 'linux_phandle' for PowerPC
and MicroBlaze, and 'node' for SPARC. There is no good reason for the
difference, it is just an artifact of the code diverging over a couple
of years. This patch renames both to simply .phandle.
Note: the .node also existed in PowerPC/MicroBlaze, but the only user
seems to be arch/powerpc/platforms/powermac/pfunc_core.c. It doesn't
look like the assignment between .linux_phandle and .node is
significantly different enough to warrant the separate code paths
unless ibm,phandle properties actually appear in Apple device trees.
I think it is safe to eliminate the old .node property and use
phandle everywhere.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David S. Miller <davem@davemloft.net>
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Sid Boyce reported that his machine locks up without enable_msi=0 option.
This looks like another ASUS mobo with Nvidia combo.
Reported-by: Sid Boyce <sboyce@blueyonder.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Remember to free the temporary register-cache.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
Now one can choose speaker configuration in e.g. PulseAudio mixer
Signed-off-by: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch fixes the aut-mute setup on HP T5735 with ALC262 codec.
Instead of wrong amp, use pin control toggling for muting the speaker now.
Tested-by: Lee Trager <lee.trager@hp.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some codecs disable widgets used for output pins and reserve as vendor-
spec widgets. Thus we need to check the widget type and pin cap before
actually sending SET_EAPD verbs in the auto-configuration mode.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALC259 has a widget NID 0x21 for the output pin, but it wasn't handled
properly in alc268_new_analog_output().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When a card instance with a higher card number is registered, warning
messages are spewed eventually with stack traces due to the invalid minor
number for OSS device registration. For example, thinkpad-acpi registers
the card number 29 as default, and you'll see always these messages.
This is rather confusing (and worries users), thus better to return
simply the error code.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Sony VAIO VGN-P11G with ALC262 codec has only one input pin, and the
recording doesn't work with model=auto because ALC262 parser sets the
wrong cap NIDs to choose the route and the default route for the sole
input pin wasn't initialized properly. This patch solves these issues.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
On my laptop (HP dv6-1110ax), there are no OEM strings in SMBIOS of type
"HP_Mute_LED*". Hence, the GPIO for the mute button LED doesn't get set
properly. I didn't find the strings in my cousin's laptop (HP dv9500t CTO)
either.
As per the documentation of find_mute_led_gpio(), these strings occur
in HP B-series systems - so, before scanning the SMBIOS strings, we need to
check if we're dealing with a B-series system.
Need to get confirmation from HP if this logic takes care of all the
systems. I'm trying to poke a friend there.
Signed-off-by: Kunal Gangakhedkar <kunal.gangakhedkar@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This is needed for built-in drivers which are built before the sound directory,
like thinkpad_acpi.
Otherwise, registering a card fails.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The capture-related mixer elements are missing with ALC861/ALC660 codecs
when quirks are present, due to missing call of set_capture_mixer().
Reference: Novell bnc#567340
http://bugzilla.novell.com/show_bug.cgi?id=567340
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
This patch adds support for automatically muting the speakers when headphones
are inserted, as well as relabelling the headphone widgets from the
non-standard "HP" to the standard "Headphone" for the mb5 model.
Signed-off-by: Alex Murray <murray.alex@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The alc664-mode4 model doesn't seem to fit with Toshiba NB205 correctly.
NB205 uses the pin 0x17 connected with the mixer 0x0f for the speaker
output, which isn't controlled by mode4 model at all.
Rather model=auto works fine as is on the latest driver, so let it back
again.
Tested-by: Nickolas Lloyd <ultrageek.lloyd@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The capture source or input source mixer element wasn't created properly
for ALC861-VD codec due to the wrong NID passed to
alc_auto_create_input_ctls().
References: Novell bnc#568305
http://bugzilla.novell.com/show_bug.cgi?id=568305
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
Add the STMicroelectronics ST7597 codec and an unknown codec
from the same manufacturer found on the Creative SB 128 card (CT4810).
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This model needs both 'Headphone Jack Sense' and 'Line Jack Sense' muted
for audible playback, so just add it to the ad1981 jack sense blacklist.
Cc: stable@kernel.org
Tested-by: Pete <x41215201@gmail.com>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
We need to set the LRCLK inversion bit to select DSP mode.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org
The patch "sbawe: fix memory detection" fixed detection
for memoryless SB32 cards but broke detection of memory
above 512KB. This patch fixes the regression.
The patch has been tested on the SB32 card (CT3670) with
0MB, 2MB and 8MB memory installed.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
The problem is that in the original code sound_nblocks could go up to 1024
which would be an array overflow.
This was found with a static checker and has been compile tested only.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>