summaryrefslogtreecommitdiffstats
path: root/sound/core
AgeCommit message (Collapse)Author
2012-10-09mm: kill vma flag VM_RESERVED and mm->reserved_vm counterKonstantin Khlebnikov
A long time ago, in v2.4, VM_RESERVED kept swapout process off VMA, currently it lost original meaning but still has some effects: | effect | alternative flags -+------------------------+--------------------------------------------- 1| account as reserved_vm | VM_IO 2| skip in core dump | VM_IO, VM_DONTDUMP 3| do not merge or expand | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP 4| do not mlock | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP This patch removes reserved_vm counter from mm_struct. Seems like nobody cares about it, it does not exported into userspace directly, it only reduces total_vm showed in proc. Thus VM_RESERVED can be replaced with VM_IO or pair VM_DONTEXPAND | VM_DONTDUMP. remap_pfn_range() and io_remap_pfn_range() set VM_IO|VM_DONTEXPAND|VM_DONTDUMP. remap_vmalloc_range() set VM_DONTEXPAND | VM_DONTDUMP. [akpm@linux-foundation.org: drivers/vfio/pci/vfio_pci.c fixup] Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Carsten Otte <cotte@de.ibm.com> Cc: Chris Metcalf <cmetcalf@tilera.com> Cc: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Eric Paris <eparis@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Hugh Dickins <hughd@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Morris <james.l.morris@oracle.com> Cc: Jason Baron <jbaron@redhat.com> Cc: Kentaro Takeda <takedakn@nttdata.co.jp> Cc: Matt Helsley <matthltc@us.ibm.com> Cc: Nick Piggin <npiggin@kernel.dk> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Robert Richter <robert.richter@amd.com> Cc: Suresh Siddha <suresh.b.siddha@intel.com> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Venkatesh Pallipadi <venki@google.com> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-09Merge tag 'sound-3.7' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "This contains pretty many small commits covering fairly large range of files in sound/ directory. Partly because of additional API support and partly because of constantly developed ASoC and ARM stuff. Some highlights: - Introduced the helper function and documentation for exposing the channel map via control API, as discussed in Plumbers; most of PCI drivers are covered, will follow more drivers later - Most of drivers have been replaced with the new PM callbacks (if the bus is supported) - HD-audio controller got the support of runtime PM and the support of D3 clock-stop. Also changing the power_save option in sysfs kicks off immediately to enable / disable the power-save mode. - Another significant code change in HD-audio is the rewrite of firmware loading code. Other than that, most of changes in HD-audio are continued cleanups and standardization for the generic auto parser and bug fixes (HBR, device-specific fixups), in addition to the support of channel-map API. - Addition of ASoC bindings for the compressed API, used by the mid-x86 drivers. - Lots of cleanups and API refreshes for ASoC codec drivers and DaVinci. - Conversion of OMAP to dmaengine. - New machine driver for Wolfson Microelectronics Bells. - New CODEC driver for Wolfson Microelectronics WM0010. - Enhancements to the ux500 and wm2000 drivers - A new driver for DA9055 and the support for regulator bypass mode." Fix up various arm soc header file reorg conflicts. * tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (339 commits) ALSA: hda - Add new codec ALC283 ALC290 support ALSA: hda - avoid unneccesary indices on "Headphone Jack" controls ALSA: hda - fix indices on boost volume on Conexant ALSA: aloop - add locking to timer access ALSA: hda - Fix hang caused by race during suspend. sound: Remove unnecessary semicolon ALSA: hda/realtek - Fix detection of ALC271X codec ALSA: hda - Add inverted internal mic quirk for Lenovo IdeaPad U310 ALSA: hda - make Realtek/Sigmatel/Conexant use the generic unsol event ALSA: hda - make a generic unsol event handler ASoC: codecs: Add DA9055 codec driver ASoC: eukrea-tlv320: Convert it to platform driver ALSA: ASoC: add DT bindings for CS4271 ASoC: wm_hubs: Ensure volume updates are handled during class W startup ASoC: wm5110: Adding missing volume update bits ASoC: wm5110: Add OUT3R support ASoC: wm5110: Add AEC loopback support ASoC: wm5110: Rename EPOUT to HPOUT3 ASoC: arizona: Add more clock rates ASoC: arizona: Add more DSP options for mixer input muxes ...
2012-09-26switch SNDRV_PCM_IOCTL_LINK to fget_light()Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-09-23ALSA: Make snd_sgbuf_get_{ptr|addr}() available for non-SG casesTakashi Iwai
Passing struct snd_dma_buffer pointer instead, so that they work no matter whether real SG buffer is used or not. This is a preliminary work for the HD-audio DSP loader code. Signed-off-by: Ian Minett <ian_minett@creativelabs.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-17ALSA: Compress - add codec parameter checksVinod Koul
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-17ALSA: compress - move the buffer checkVinod Koul
Commit ALSA: compress_core: integer overflow in snd_compr_allocate_buffer() added a new error check for input params. this add new routine for input checks and moves buffer overflow check to this new routine. This allows the error value to be propogated to user space Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-15Merge branch 'topic/tlv-chmap' into for-nextTakashi Iwai
This is a merge of a topic branch containing the support for the new channel map API using control elements.
2012-09-14ALSA: compress_core: integer overflow in snd_compr_allocate_buffer()Dan Carpenter
These are 32 bit values that come from the user, we need to check for integer overflows or we could end up allocating a smaller buffer than expected. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-13ALSA: Fix leftover chmap UNKNOWN -> MONO conversionsTakashi Iwai
A few files have been slipped from the previous commit to add MONO channel type. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-11Merge branch 'for-linus' into for-nextTakashi Iwai
To merge HD-audio fixes back to 3.7 development line
2012-09-11ALSA: compress_core: fix open flags test in snd_compr_open()Dan Carpenter
O_RDONLY is zero so the original test (f->f_flags & O_RDONLY) is always false and it will never do compress capture. The test for O_WRONLY is also slightly off. The original test would consider "->flags = (O_WRONLY | O_RDWR)" as write only instead of rejecting it as invalid. I've also removed the pr_err() because that could flood dmesg. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-11ALSA: pcm - Use UNKNOWN chmap for mono streamsTakashi Iwai
In general, mono streams have no dedicated speaker assignment, thus they should be rather marked as UNKNOWN position. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-06ALSA: Remove VOLATILE flag from chmap ctlsTakashi Iwai
The VOLATILE flag was added to control elements by snd_pcm_add_chmap_ctls() just because I didn't want to have a side-effect of "alsactl restore". But now the set operation doesn't allow to change the value unless the PCM stream is in PREAPRED state, there is no reason to keep this flag. Let's rip it off. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-06ALSA: control: Fix missing VOLATILE flag at creating controlsTakashi Iwai
The SNDRV_CTL_ELEM_ACCESS_VOLATILE bit flag wasn't properly inherited at creating control elements via snd_ctl_new1(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-06ALSA: PCM: channel mapping API implementationTakashi Iwai
This patch implements the basic data types for the standard channel mapping API handling. - The definitions of the channel positions and the new TLV types are added in sound/asound.h and sound/tlv.h, so that they can be referred from user-space. - Introduced a new helper function snd_pcm_add_chmap_ctls() to create control elements representing the channel maps for each PCM (sub)stream. - Some standard pre-defined channel maps are provided for convenience. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-05Merge branch 'fixes' of git://git.alsa-project.org/alsa-kernel into for-nextTakashi Iwai
2012-09-04ALSA: remove the main version informationJaroslav Kysela
Remove the main ALSA version number from the kernel ALSA driver. The ALSA driver package release diverges from the upstream. This may confuse users to see the same ALSA version for many kernel releases and this version lost it's original purpose and connection. The "ioctl" APIs have own version numbers, so the user space may check for specific API changes only. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2012-09-03ALSA: fix possible memory leak in snd_mixer_oss_build_input()Wei Yongjun
uinfo has been allocated in this function and should be freed before leaving from the error handling cases. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-20Merge tag 'asoc-3.6' of ↵Takashi Iwai
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Additional updates for 3.6 A batch more bugfixes, all driver-specific and fairly small and unremarkable in a global context. The biggest batch are for the newly added Arizona drivers.
2012-08-20ALSA: lto, sound: Fix export symbols for !CONFIG_MODULESAndi Kleen
The new LTO EXPORT_SYMBOL references symbols even without CONFIG_MODULES. Since these functions are macros in this case this doesn't work. Add a ifdef to fix the build. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-08Merge tag 'sound-3.6' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Containing only a few really small/trivial fixes. The only urgent fix is a regression fix of HDMI codec probing, introduced in 3.6-rc1. The rest are HD-audio specific fixes and a copule of minor bug fixes in PCM core and the old emu10k1." * tag 'sound-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Fix double quirk for Quanta FL1 / Lenovo Ideapad ALSA: hda - Fix ugly debug prints with CONFIG_SND_VERBOSE_PRINTK=y ALSA: hda - remove redundant auto quirks for conexant 506x ALSA: hda - remove quirk for Dell Vostro 1015 ALSA: hda - add dock support for Thinkpad X230 ALSA: hda - Fix regression of HDMI codec probing ALSA: hda - add dock support for Thinkpad T430s ALSA: emu10k1: Avoid access to invalid pages when period=1 ALSA: PCM: Fix possible memory leaks in the error path
2012-08-03Merge branch 'topic/next' into for-nextTakashi Iwai
2012-08-03ALSA: PCM: Fix possible memory leaks in the error pathTakashi Iwai
When the first page allocation failed for sgbuf, it leaks the records that have been formerly allocated. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-07-30sound: use printk_get_level and printk_skip_levelJoe Perches
Make the output logging routine independent of the KERN_<LEVEL> style. Signed-off-by: Joe Perches <joe@perches.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-18Merge branch 'topic/misc' into for-nextTakashi Iwai
Generic updates for sound 3.6
2012-07-05ALSA: pcm: Make constraints lists constMark Brown
They aren't modified by the core so the drivers can declare them const. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-18ALSA: pcm: Add snd_pcm_rate_bit_to_rate()Dimitris Papastamos
This is essentially the reverse of snd_pcm_rate_to_rate_bit(). This is generally useful as the Compress API uses the rate bit directly and it helps to be able to map back to the actual sample rate. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-12ALSA: compress_core: cleanup pointers on stopVinod Koul
as the start can be called after stop again, we need to reset state Signed-off-by: Namarta Kohli <namartax.kohli@intel.com> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-12ALSA: compress_core: don't wake up on pauseVinod Koul
during pause the core should maintain the status-quo on the device and pointers and not wake up. If app needs it should call DROP explcitly. Signed-off-by: Namarta Kohli <namartax.kohli@intel.com> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-23ALSA: core: group read of pointer, tstamp and jiffiesPierre-Louis Bossart
Group read of hw_ptr, tstamp and jiffies in a sequence for better correlation. Previous code took timestamp at the end, which could introduce delays between audio time and system time. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-21Merge branch 'topic/misc' into for-linusTakashi Iwai
2012-05-21ALSA: pcm - Add proper state checks to snd_pcm_drain()Takashi Iwai
The handling for some PCM states is missing for snd_pcm_drain(). At least, XRUN streams should be simply dropped to SETUP, and a few initial invalid states should be rejected. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-11ALSA: pcm - Optimize the call of snd_pcm_update_hw_ptr() in read/write loopTakashi Iwai
In the PCM read/write loop, the driver calls snd_pcm_update_hw_ptr() at each time at the beginning of the loop. Russell King reported that this hogs CPU significantly. The current code assumes that the pointer callback is very fast and cheap, also not too much fine grained. It's not true in all cases. When the pointer advances short samples while the read/write copy has been performed, the driver updates the hw_ptr and gets avail > 0 again. Then it tries to read/write these small chunks. This repeats until the avail really gets to zero. For avoiding this situation, a simple workaround is to call snd_pcm_update_hw_ptr() only once at starting the loop, assuming that the read/write copy is performed fast enough. If the available count becomes short, it goes to snd_pcm_wait_avail() anyway, and this processes right. Tested-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-08ALSA: Fix the card number limit of OSS-emulationTakashi Iwai
There are left-over codes from the ancient days with the static device number limitation of 8. Actaully OSS can support up to 16 cards. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-07ALSA: jack: Update documention to reflect other userspace interfacesMark Brown
Since this is a generic API which should support any userspace interface for reporting jacks update the documentation a little to make that a bit clearer. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-18ALSA: fix core/vmaster.c kernel-doc warningRandy Dunlap
Fix kernel-doc warning in sound/core/vmaster.c: Warning(sound/core/vmaster.c:429): No description found for parameter 'private_data' Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-30Documentation: remove references to /etc/modprobe.confLucas De Marchi
Usage of /etc/modprobe.conf file was deprecated by module-init-tools and is no longer parsed by new kmod tool. References to this file are replaced in Documentation, comments and Kconfig according to the context. There are also some references to the old /etc/modules.conf from 2.4 kernels that are being removed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-24Merge tag 'device-for-3.4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux Pull <linux/device.h> avoidance patches from Paul Gortmaker: "Nearly every subsystem has some kind of header with a proto like: void foo(struct device *dev); and yet there is no reason for most of these guys to care about the sub fields within the device struct. This allows us to significantly reduce the scope of headers including headers. For this instance, a reduction of about 40% is achieved by replacing the include with the simple fact that the device is some kind of a struct. Unlike the much larger module.h cleanup, this one is simply two commits. One to fix the implicit <linux/device.h> users, and then one to delete the device.h includes from the linux/include/ dir wherever possible." * tag 'device-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: device.h: audit and cleanup users in main include dir device.h: cleanup users outside of linux/include (C files)
2012-03-18Merge branch 'topic/jack' into for-linusTakashi Iwai
2012-03-18Merge branch 'topic/asoc' into for-linusTakashi Iwai
2012-03-18Merge branch 'topic/misc' into for-linusTakashi Iwai
2012-03-15ALSA: pcm - Avoid GFP_ATOMIC in snd_pcm_link()Takashi Iwai
GFP_ATOMIC is used in snd_pcm_link() just because the kmalloc is called inside a lock. Since this function isn't too critical for speed and is rarely called in practice, better to allocate the chunk at first before spinlock and free it in error paths, so that GFP_KERNEL can be used. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-15ALSA: pcm: Constify the list in snd_pcm_hw_constraint_listMark Brown
Allows the constraint lists to be declared const by drivers which seems reasonable; there's plenty of other constification we could do if we were being complete but this was easy and quick. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-13ALSA: control - Fixe a trailing white space errorJeffrin Jose
Fixed a trailing white space error detected in sound/core/control.c by checkpatch.pl script. Signed-off-by: Jeffrin Jose <ahiliation@yahoo.co.in> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-12ALSA: Add a hook capability to vmaster controlsTakashi Iwai
This patch adds a hook to vmaster control to be called at each time when the master value is changed. It'd be handy for an additional mute LED control following the Master switch, for example. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-11device.h: cleanup users outside of linux/include (C files)Paul Gortmaker
For files that are actively using linux/device.h, make sure that they call it out. This will allow us to clean up some of the implicit uses of linux/device.h within include/* without introducing build regressions. Yes, this was created by "cheating" -- i.e. the headers were cleaned up, and then the fallout was found and fixed, and then the two commits were reordered. This ensures we don't introduce build regressions into the git history. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2012-03-09ALSA: core - Refactor card id string creation codeTakashi Iwai
The code to handle the card id string is fairly messy, so here is a tidy up. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-27ALSA: Use a define for the number of jack switch typesMark Brown
This is intended to facilitate the merge of the two jack detection mechanisms. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-20ALSA: Fixed a trailing white space errorJeffrin Jose
This is a patch to the sound/core/misc.c file that fixes up a trailing white space issue found by the checkpatch.pl tool. Signed-off-by: Jeffrin Jose <ahiliation@yahoo.co.in> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-09ALSA: PCM - Add PCM creation API for internal PCMs.Liam Girdwood
The new ASoC dynamic PCM core needs to create PCMs and substreams that are for use by internal ASoC drivers only and not visible to userspace for direct IO. These new PCMs are similar to regular PCMs expect they have no device nodes or procfs entries. The ASoC component drivers use them in exactly the same way as regular PCMs for PCM and DAI operations. The intention is that a dynamic PCM based driver will register both regular PCMs and internal PCMs. The regular PCMs will be used for all IO with userspace however the internal PCMs will be used by the driver to route digital audio through numerous back end DAI links (with potentially a DSP providing different hw_params, DAI formats based on the regular front end PCM params) to devices like CODECs, MODEMs, Bluetooth, FM, DMICs, etc This patch adds a new snd_pcm_new_internal() API call to create the internal PCM without device nodes or procfs. It also adds adds a new internal flag to snd_pcm. [fixed minor coding-style issues by tiwai] Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>