14 Feb, 2014
1 commit
-
Also remove superfluous snd_card_set_dev() calls.
Signed-off-by: Takashi Iwai
04 Dec, 2013
1 commit
-
Even if the CONFIG_PM explicity is undefined, let's convert to the
modern PM ops.Signed-off-by: Ulf Hansson
Signed-off-by: Takashi Iwai
14 Nov, 2013
1 commit
-
Pull DMA mask updates from Russell King:
"This series cleans up the handling of DMA masks in a lot of drivers,
fixing some bugs as we go.Some of the more serious errors include:
- drivers which only set their coherent DMA mask if the attempt to
set the streaming mask fails.
- drivers which test for a NULL dma mask pointer, and then set the
dma mask pointer to a location in their module .data section -
which will cause problems if the module is reloaded.To counter these, I have introduced two helper functions:
- dma_set_mask_and_coherent() takes care of setting both the
streaming and coherent masks at the same time, with the correct
error handling as specified by the API.
- dma_coerce_mask_and_coherent() which resolves the problem of
drivers forcefully setting DMA masks. This is more a marker for
future work to further clean these locations up - the code which
creates the devices really should be initialising these, but to fix
that in one go along with this change could potentially be very
disruptive.The last thing this series does is prise away some of Linux's addition
to "DMA addresses are physical addresses and RAM always starts at
zero". We have ARM LPAE systems where all system memory is above 4GB
physical, hence having DMA masks interpreted by (eg) the block layers
as describing physical addresses in the range 0..DMAMASK fails on
these platforms. Santosh Shilimkar addresses this in this series; the
patches were copied to the appropriate people multiple times but were
ignored.Fixing this also gets rid of some ARM weirdness in the setup of the
max*pfn variables, and brings ARM into line with every other Linux
architecture as far as those go"* 'for-linus-dma-masks' of git://git.linaro.org/people/rmk/linux-arm: (52 commits)
ARM: 7805/1: mm: change max*pfn to include the physical offset of memory
ARM: 7797/1: mmc: Use dma_max_pfn(dev) helper for bounce_limit calculations
ARM: 7796/1: scsi: Use dma_max_pfn(dev) helper for bounce_limit calculations
ARM: 7795/1: mm: dma-mapping: Add dma_max_pfn(dev) helper function
ARM: 7794/1: block: Rename parameter dma_mask to max_addr for blk_queue_bounce_limit()
ARM: DMA-API: better handing of DMA masks for coherent allocations
ARM: 7857/1: dma: imx-sdma: setup dma mask
DMA-API: firmware/google/gsmi.c: avoid direct access to DMA masks
DMA-API: dcdbas: update DMA mask handing
DMA-API: dma: edma.c: no need to explicitly initialize DMA masks
DMA-API: usb: musb: use platform_device_register_full() to avoid directly messing with dma masks
DMA-API: crypto: remove last references to 'static struct device *dev'
DMA-API: crypto: fix ixp4xx crypto platform device support
DMA-API: others: use dma_set_coherent_mask()
DMA-API: staging: use dma_set_coherent_mask()
DMA-API: usb: use new dma_coerce_mask_and_coherent()
DMA-API: usb: use dma_set_coherent_mask()
DMA-API: parport: parport_pc.c: use dma_coerce_mask_and_coherent()
DMA-API: net: octeon: use dma_coerce_mask_and_coherent()
DMA-API: net: nxp/lpc_eth: use dma_coerce_mask_and_coherent()
...
06 Nov, 2013
1 commit
-
BUG() used in the driver is just to spit the stack trace on buggy
points, not really needed to stop the whole operation. For that
purpose, it'd be more convenient to use snd_BUG() instead.Signed-off-by: Takashi Iwai
31 Oct, 2013
1 commit
-
This code sequence is unsafe in modules:
static u64 mask = DMA_BIT_MASK(something);
...
if (!dev->dma_mask)
dev->dma_mask = &mask;as if a module is reloaded, the mask will be pointing at the original
module's mask address, and this can lead to oopses. Moreover, they
all follow this with:if (!dev->coherent_dma_mask)
dev->coherent_dma_mask = mask;where 'mask' is the same value as the statically defined mask, and this
bypasses the architecture's check on whether the DMA mask is possible.Fix these issues by using the new dma_coerce_coherent_and_mask()
function.Acked-by: Mark Brown
Acked-by: Takashi Iwai
Signed-off-by: Russell King
29 Oct, 2013
1 commit
-
We tend to make stupid mistakes with strncpy(). Let's take a safer
one, strlcpy().Signed-off-by: Takashi Iwai
18 Oct, 2013
1 commit
-
PXA25x also shows some problems when using interrupts during reset
handling. Thus do not use interrupts on all pxa kinds (to detect codec
ready state). Instead use a common mdelay-loop on all platforms to
detect codecs becoming ready.Signed-off-by: Dmitry Eremin-Solenikov
Signed-off-by: Mark Brown
15 Aug, 2013
1 commit
-
Use snd_dmaengine_dai_dma_data for passing the dma parameters from
clients to the pxa pcm lib. This does no functional change, it's just an
intermedia step to migrate the pxa bits over to dmaengine.The calculation of dcmd is a transition hack which will be removed again
in a later patch. It's just there to make the transition more readable.Signed-off-by: Daniel Mack
Acked-by: Mark Brown
Signed-off-by: Mark Brown
16 Jul, 2013
1 commit
-
snd_pcm_stop() must be called in the PCM substream lock context.
Cc:
Acked-by: Mark Brown
Signed-off-by: Takashi Iwai
29 May, 2013
1 commit
-
A few calls are still left in parport drivers after this commit, which
I'm not quite sure yet.Signed-off-by: Takashi Iwai
23 May, 2013
1 commit
-
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.Signed-off-by: Sachin Kamat
Cc: Eric Miao
Signed-off-by: Takashi Iwai
08 Jan, 2013
3 commits
-
This patch does nothing functionally, it just gives the function a new name and
modifies the prototype slightly in order to clarify what the function is doing
(which is not necessarily asserting the reset).
Some commentary also added.Tested on a palm treo 680 machine.
Signed-off-by: Mike Dunn
Acked-by: Igor Grinberg
Signed-off-by: Mark Brown -
This patch fixes some code that implements a work-around to a hardware bug in
the ac97 controller on the pxa27x. A bug in the controller's warm reset
functionality requires that the mfp used by the controller as the AC97_nRESET
line be temporarily reconfigured as a generic output gpio (AF0) and manually
held high for the duration of the warm reset cycle. This is what was done in
the original code, but it was broken long ago by commit fb1bf8cd
([ARM] pxa: introduce processor specific pxa27x_assert_ac97reset())
which changed the mfp to a GPIO input instead of a high output.The fix requires the ac97 controller to obtain the gpio via gpio_request_one(),
with arguments that configure the gpio as an output initially driven high.Tested on a palm treo 680 machine. Reportedly, this broken code only prevents a
warm reset on hardware that lacks a pull-up on the line, which appears to be the
case for me.Signed-off-by: Mike Dunn
Signed-off-by: Igor Grinberg
Signed-off-by: Mark Brown
Cc: stable@vger.kernel.org -
Cold reset on the pxa27x currently fails and
pxa2xx_ac97_try_cold_reset: cold reset timeout (GSR=0x44)
appears in the kernel log. Through trial-and-error (the pxa270 developer's
manual is mostly incoherent on the topic of ac97 reset), I got cold reset to
complete by setting the WARM_RST bit in the GCR register (and later noticed that
pxa3xx does this for cold reset as well). Also, a timeout loop is needed to
wait for the reset to complete.Tested on a palm treo 680 machine.
Signed-off-by: Mike Dunn
Acked-by: Igor Grinberg
Signed-off-by: Mark Brown
Cc: stable@vger.kernel.org
07 Dec, 2012
2 commits
-
CONFIG_HOTPLUG is going away as an option. As result the __dev*
markings will be going away.Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.Signed-off-by: Bill Pemberton
Cc: Eric Miao
Cc: Russell King
Cc: Haojian Zhuang
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Takashi Iwai -
CONFIG_HOTPLUG is going away as an option. As result the __dev*
markings will be going away.Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.Signed-off-by: Bill Pemberton
Cc: Russell King
Signed-off-by: Takashi Iwai
09 Aug, 2012
1 commit
-
When CONFIG_PM is set but CONFIG_PM_SLEEP is unset,
SIMPLE_DEV_PM_OPS() ignores the given functions, and this leads to
compile warnings.For avoiding this, simply check CONFIG_PM_SLEEP instead of CONFIG_PM.
Reported-by: Arnd Bergmann
Signed-off-by: Takashi Iwai
03 Jul, 2012
1 commit
-
Signed-off-by: Takashi Iwai
30 Mar, 2012
2 commits
-
Pull "ARM: cleanups of io includes" from Olof Johansson:
"Rob Herring has done a sweeping change cleaning up all of the
mach/io.h includes, moving some of the oft-repeated macros to a common
location and removing a bunch of boiler plate. This is another step
closer to a common zImage for multiple platforms."Fix up various fairly trivial conflicts ( removal vs changes
around it, tegra localtimer.o is *still* gone, yadda-yadda).* tag 'cleanup2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (29 commits)
ARM: tegra: Include assembler.h in sleep.S to fix build break
ARM: pxa: use common IOMEM definition
ARM: dma-mapping: convert ARCH_HAS_DMA_SET_COHERENT_MASK to kconfig symbol
ARM: __io abuse cleanup
ARM: create a common IOMEM definition
ARM: iop13xx: fix missing declaration of iop13xx_init_early
ARM: fix ioremap/iounmap for !CONFIG_MMU
ARM: kill off __mem_pci
ARM: remove bunch of now unused mach/io.h files
ARM: make mach/io.h include optional
ARM: clps711x: remove unneeded include of mach/io.h
ARM: dove: add explicit include of dove.h to addr-map.c
ARM: at91: add explicit include of hardware.h to uncompressor
ARM: ep93xx: clean-up mach/io.h
ARM: tegra: clean-up mach/io.h
ARM: orion5x: clean-up mach/io.h
ARM: davinci: remove unneeded mach/io.h include
[media] davinci: remove includes of mach/io.h
ARM: OMAP: Remove remaining includes for mach/io.h
ARM: msm: clean-up mach/io.h
... -
Pull more ARM updates from Russell King.
This got a fair number of conflicts with the split, but
also with some other sparse-irq and header file include cleanups. They
all looked pretty trivial, though.* 'for-linus' of git://git.linaro.org/people/rmk/linux-arm: (59 commits)
ARM: fix Kconfig warning for HAVE_BPF_JIT
ARM: 7361/1: provide XIP_VIRT_ADDR for no-MMU builds
ARM: 7349/1: integrator: convert to sparse irqs
ARM: 7259/3: net: JIT compiler for packet filters
ARM: 7334/1: add jump label support
ARM: 7333/2: jump label: detect %c support for ARM
ARM: 7338/1: add support for early console output via semihosting
ARM: use set_current_blocked() and block_sigmask()
ARM: exec: remove redundant set_fs(USER_DS)
ARM: 7332/1: extract out code patch function from kprobes
ARM: 7331/1: extract out insn generation code from ftrace
ARM: 7330/1: ftrace: use canonical Thumb-2 wide instruction format
ARM: 7351/1: ftrace: remove useless memory checks
ARM: 7316/1: kexec: EOI active and mask all interrupts in kexec crash path
ARM: Versatile Express: add NO_IOPORT
ARM: get rid of asm/irq.h in asm/prom.h
ARM: 7319/1: Print debug info for SIGBUS in user faults
ARM: 7318/1: gic: refactor irq_start assignment
ARM: 7317/1: irq: avoid NULL check in for_each_irq_desc loop
ARM: 7315/1: perf: add support for the Cortex-A7 PMU
...
26 Mar, 2012
1 commit
-
pxa was missed in the moving of IOMEM to a common definition, so lots of
IOMEM redefined warnings were introduced. So remove pxa IOMEM definition
and fix all the fallout.Reported-by: Paul Gortmaker
Signed-off-by: Rob Herring
Cc: Eric Miao
Cc: Russell King
Cc: Haojian Zhuang
Cc: Alessandro Zummo
Cc: Jaroslav Kysela
Cc: Takashi Iwai
Cc: rtc-linux@googlegroups.com
Cc: alsa-devel@alsa-project.org
17 Mar, 2012
1 commit
-
For simple modules that contain a single amba_driver without any
additional setup code then ends up being a block of duplicated
boilerplate. This patch adds a new macro, module_amba_driver(),
which replaces the module_init()/module_exit() registrations with
template functions.Signed-off-by: Viresh Kumar
Signed-off-by: Russell King
26 Jan, 2012
1 commit
-
In preparation of removing mach/irqs.h include from asm/irq.h, include
mach/irqs.h directly.Signed-off-by: Rob Herring
13 Jan, 2012
1 commit
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (526 commits)
ASoC: twl6040 - Add method to query optimum PDM_DL1 gain
ALSA: hda - Fix the lost power-setup of seconary pins after PM resume
ALSA: usb-audio: add Yamaha MOX6/MOX8 support
ALSA: virtuoso: add S/PDIF input support for all Xonars
ALSA: ice1724 - Support for ooAoo SQ210a
ALSA: ice1724 - Allow card info based on model only
ALSA: ice1724 - Create capture pcm only for ADC-enabled configurations
ALSA: hdspm - Provide unique driver id based on card serial
ASoC: Dynamically allocate the rtd device for a non-empty release()
ASoC: Fix recursive dependency due to select ATMEL_SSC in SND_ATMEL_SOC_SSC
ALSA: hda - Fix the detection of "Loopback Mixing" control for VIA codecs
ALSA: hda - Return the error from get_wcaps_type() for invalid NIDs
ALSA: hda - Use auto-parser for HP laptops with cx20459 codec
ALSA: asihpi - Fix potential Oops in snd_asihpi_cmode_info()
ALSA: hdsp - Fix potential Oops in snd_hdsp_info_pref_sync_ref()
ALSA: hda/cirrus - support for iMac12,2 model
ASoC: cx20442: add bias control over a platform provided regulator
ALSA: usb-audio - Avoid flood of frame-active debug messages
ALSA: snd-usb-us122l: Delete calls to preempt_disable
mfd: Put WM8994 into cache only mode when suspending
...Fix up trivial conflicts in:
- arch/arm/mach-s3c64xx/mach-crag6410.c:
renamed speyside_wm8962 to tobermory, added littlemill right
next to it
- drivers/base/regmap/{regcache.c,regmap.c}:
duplicate diff that had already come in with other changes in
the regmap tree
28 Nov, 2011
1 commit
-
This patch converts the drivers in sound/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.Signed-off-by: Axel Lin
Signed-off-by: Takashi Iwai
22 Nov, 2011
1 commit
-
Signed-off-by: Dave Martin
01 Nov, 2011
1 commit
-
Lots of sound drivers were getting module.h via the implicit presence
of it in but we are going to clean that up. So
fix up those users now.Signed-off-by: Paul Gortmaker
22 Sep, 2011
1 commit
-
Since commit [e58aa3d2: genirq: Run irq handlers with interrupts disabled],
We run all interrupt handlers with interrupts disabled
and we even check and yell when an interrupt handler
returns with interrupts enabled (see commit [b738a50a:
genirq: Warn when handler enables interrupts]).So now this flag is a NOOP and can be removed.
Signed-off-by: Yong Zhang
Acked-by: Peter Ujfalusi
Acked-by: Mark Brown
Signed-off-by: Takashi Iwai
03 Apr, 2011
2 commits
-
…ie/sound-2.6 into for-2.6.39
-
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
Signed-off-by: Mark Brown
17 Mar, 2011
1 commit
24 Feb, 2011
1 commit
-
Make Primecell driver probe functions take a const pointer to their
ID tables. Drivers should never modify their ID tables in their
probe handler.Signed-off-by: Russell King
07 Feb, 2011
1 commit
-
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
27 Jan, 2011
5 commits
-
Improve commenting and change fifo variable names to reflect their
meanings.Signed-off-by: Russell King
-
There is no need to call snd_pcm_period_elapsed() each time a period
elapses - we can call it after we're done once loading/unloading the
FIFO with data. ALSA works out how many periods have elapsed by
reading the current pointers.Signed-off-by: Russell King
-
Use the helper rather than open-coding this.
Signed-off-by: Russell King
-
Make the AACI announcement printk say which primecell part number
has been found. Display the revision as an unsigned decimal, and
display only the first 8 hex digits of the base address unless it's
larger.Signed-off-by: Russell King
-
When double-rate mode was selected, we weren't setting the additional
two channel mask bits to allow double-rate to work. Rearrange the
hw_params code to allow the correct channel mask to be selected.Signed-off-by: Russell King
26 Jan, 2011
2 commits
-
AC'97 codecs only support two channels for recording, so we shouldn't
advertize that there are up to six channels available. Limit the
selection of 4 and 6 channel audio to playback only.As this adds additional SNDRV_PCM_STREAM_PLAYBACK conditionals, we can
combine some resulting in the elimination of __aaci_pcm_open() entirely,
and making the code easier to read.Signed-off-by: Russell King
-
Claiming the IRQ each time a playback or capture interface is opened
is wasteful; the second copy of the registered handler is identical to
the first and just wastes resources. Track the number of opens and
only register the handler when necessary.Signed-off-by: Russell King