summaryrefslogtreecommitdiffstats
path: root/sound/core
Commit message (Collapse)AuthorAgeFilesLines
...
| * ALSA: ctl: evaluate macro instead of numerical valueTakashi Sakamoto2015-04-101-5/+8
| | | | | | | | | | | | | | | | | | | | SNDRV_CTL_TLV_OP_XXX is defined but not used in core code. Instead, raw numerical value is evaluated. This commit replaces these values to these macros for better looking. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * Merge branch 'topic/hda-unbind' into for-nextTakashi Iwai2015-03-162-14/+34
| |\
| | * ALSA: core: Re-add snd_device_disconnect()Takashi Iwai2015-03-032-14/+34
| | | | | | | | | | | | | | | | | | | | | Revive snd_device_disconnect() again so that it can be called from the individual driver. This time, HD-audio will need it. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: control: Fix breakage of user ctl element additionTakashi Iwai2015-03-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the commit [2225e79b9b03: 'ALSA: core: reduce stack usage related to snd_ctl_new()'], the id field of the newly added kctl is untouched, thus all attribute like name string remain empty. The fix is just to add the forgotten memcpy of the id field. Fixes: 2225e79b9b03 ('ALSA: core: reduce stack usage related to snd_ctl_new()') Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | Merge branch 'for-linus' into for-nextTakashi Iwai2015-03-121-0/+5
| |\ \
| * | | ALSA: seq: Fix init order of snd_seq_device stuffTakashi Iwai2015-03-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the sequencer driver is built in kernel, it may panic at boot because of the uninitialized snd_seq_bus_type. Initialize it properly via subsys_initcall() instead of module_init() to assure that the bus is registered beforehand. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Fixes: 7c37ae5c625a ('ALSA: seq: Rewrite sequencer device binding with standard bus') Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: core: Drop superfluous error/debug messages after malloc failuresTakashi Iwai2015-03-108-32/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kernel memory allocators already report the errors when the requested allocation fails, thus we don't need to warn it again in each caller side. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: seq: Drop superfluous error/debug messages after malloc failuresTakashi Iwai2015-03-106-21/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kernel memory allocators already report the errors when the requested allocation fails, thus we don't need to warn it again in each caller side. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: seq_oss: Drop superfluous error/debug messages after malloc failuresTakashi Iwai2015-03-104-15/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kernel memory allocators already report the errors when the requested allocation fails, thus we don't need to warn it again in each caller side. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: core: reduce stack usage related to snd_ctl_new()Takashi Sakamoto2015-03-101-83/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The callers of snd_ctl_new() need to have 'struct snd_kcontrol' data, and pass the data as template. Then, the function allocates the structure data again and copy from the template. This is a waste of resources. Especially, the callers use large stack for the template. This commit removes a need of template for the function, thus, changes the prototype of snd_ctl_new(). Furthermore, this commit changes the code of callers, snd_ctl_new1() and snd_ctl_elem_add() for better shape. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: core: use precomputed table to check userspace control paramsTakashi Sakamoto2015-03-101-32/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parameters can be decided in compile time. This commit adds precomputed table to reduce calculating time. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | Merge tag 'asoc-v4.1' of ↵Takashi Iwai2015-03-061-0/+2
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Changes for v4.1 A selection of changes for v4.1 so far. The main things are: - Move of jack registration to the card where it belongs. - Support for DAPM routes specified by both the machine driver and DT.
| * | | | ALSA: Fix spelling typo in Documentation/DocBook/alsa-driver-api.xmlMasanari Iida2015-03-041-2/+2
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fix spelling typo found in alsa-driver-api.xml. It is because this file is generated from comments in source files, I have to fix source files. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | Merge branch 'topic/timestamp' into for-nextTakashi Iwai2015-02-233-37/+120
| |\ \ \
| | * | | ALSA: core: add .get_time_infoPierre-Louis Bossart2015-02-202-29/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce more generic .get_time_info to retrieve system timestamp and audio timestamp in single routine. Backwards compatibility is preserved with same functionality as with .wall_clock method (to be removed in following commits to avoid breaking git bisect) Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * | | ALSA: core: pass audio tstamp config from userspace in compat modePierre-Louis Bossart2015-02-201-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let userspace select audio timestamp config, ignore and zero all other fields Use audio_tstamp_data to retrieve config and pass report back to user space Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * | | ALSA: core: pass audio tstamp config from userspacePierre-Louis Bossart2015-02-201-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let userspace select audio timestamp config when the STATUS_EXT ioctl is used, ignore and zero all other fields No change for the existing STATUS ioctl, parameters are treated as read-only. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | | Merge branch 'topic/pcm-internal' into for-nextTakashi Iwai2015-02-231-51/+41
| |\ \ \ \
| | * | | | ALSA: pcm: Don't ignore internal PCMs in snd_pcm_dev_disconnect()Takashi Iwai2015-02-201-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some codes in snd_pcm_dev_disconnect() are still valid even for internal PCMs, but they are skipped because of the check of list_empty(&pcm->list) at the beginning. Remove this check and put pcm->internal checks appropriately for internal PCM object to process through this function. Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * | | | ALSA: pcm: Don't notify internal PCMsTakashi Iwai2015-02-201-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notifier shouldn't listen to the changes of internal PCMs. Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * | | | ALSA: pcm: Don't add internal PCMs to PCM device listTakashi Iwai2015-02-201-15/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An internal PCM object shouldn't be added to the PCM device list, as it's never accessed directly from the user-space, and it has no proc or any similar accesses. Currently, it's excluded in snd_pcm_get() and snd_pcm_next(), but it's easier not to add such an object to the list. Actually, the whole snd_pcm_dev_register() can be skipped for an internal PCM. So this patch changes the code there, but also addresses the uninitialized list_head access. Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * | | | ALSA: pcm: Minor refactoring in snd_pcm_attach_substream()Takashi Iwai2015-02-201-26/+15
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No functional changes at all. Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | | Merge branch 'topic/seq-cleanup' into for-nextTakashi Iwai2015-02-236-475/+168
| |\ \ \ \ | | |/ / / | |/| | |
| | * | | ALSA: seq: Drop snd_seq_autoload_lock() and _unlock()Takashi Iwai2015-02-124-36/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The autoload lock became already superfluous due to the recent rework of autoload code. Let's drop them now. This allows us to simplify a few codes nicely. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * | | ALSA: seq: Define driver object in each driverTakashi Iwai2015-02-125-104/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves the driver object initialization and allocation to each driver's module init/exit code like other normal drivers. The snd_seq_driver struct is now published in seq_device.h, and each driver is responsible to define it with proper driver attributes (name, probe and remove) with snd_seq_driver specific attributes as id and argsize fields. The helper functions snd_seq_driver_register(), snd_seq_driver_unregister() and module_snd_seq_driver() are used for simplifying codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * | | ALSA: seq: Clean up device and driver structsTakashi Iwai2015-02-121-21/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use const string pointer instead of copying the id string to each object. Also drop the status and list fields of snd_seq_device struct that are no longer used. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * | | ALSA: seq: Rewrite sequencer device binding with standard busTakashi Iwai2015-02-121-374/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've used the old house-made code for binding the sequencer device and driver. This can be far better implemented with the standard bus nowadays. This patch refactors the whole sequencer binding code with the bus /sys/bus/snd_seq. The devices appear as id-card-device on this bus and are bound with the drivers corresponding to the given id like the former implementation. The module autoload is also kept like before. There is no change in API functions by this patch, and almost all transitions are kept inside seq_device.c. The proc file output will change slightly but kept compatible as much as possible. Further integration works will follow in later patches. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * | | ALSA: seq: Don't compile snd_seq_device_load_drivers() for built-inTakashi Iwai2015-02-121-6/+3
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * | | ALSA: seq: Move EXPORT_SYMBOL() after each functionTakashi Iwai2015-02-121-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... to follow the standard coding style. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | | ALSA: Consolidate snd_find_free_minor()Takashi Iwai2015-02-171-9/+5
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | A really small cleanup to consolidate snd_find_free_minor() and snd_kernel_minor() so that we can get rid of one more ifdef. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | pcm: another weird API abuseAl Viro2015-04-111-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | readv() and writev() should _not_ ignore all but the first ->iov_len, among other things. Really weird abuse of those syscalls - it expects a vector element per channel, with identical lengths (it actually assumes them to be identical - no checking is done). readv() and writev() are really bad match for that. Unfortunately, userland API is userland API and we can't do anything about them. Converted to ->read_iter/->write_iter. Please, _please_ don't do anything of that kind when designing new interfaces. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | | | Merge branch 'iocb' into for-nextAl Viro2015-04-111-1/+1
|\ \ \ \ | |_|_|/ |/| | |
| * | | fs: move struct kiocb to fs.hChristoph Hellwig2015-03-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | struct kiocb now is a generic I/O container, so move it to fs.h. Also do a #include diet for aio.h while we're at it. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | | | ALSA: control: Add sanity checks for user ctl id name stringTakashi Iwai2015-03-121-0/+4
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | There was no check about the id string of user control elements, so we accepted even a control element with an empty string, which is obviously bogus. This patch adds more sanity checks of id strings. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: pcm: Don't leave PREPARED state after drainingTakashi Iwai2015-02-231-0/+2
| |/ |/| | | | | | | | | | | | | | | | | When a PCM draining is performed to an empty stream that has been already in PREPARED state, the current code just ignores and leaves as it is, although the drain is supposed to set all such streams to SETUP state. This patch covers that overlooked case. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: seq: potential out of bounds in do_control()Dan Carpenter2015-02-121-0/+3
|/ | | | | | | | | | | | | | | | | Smatch complains that "control" is user specifigy and needs to be capped. The call tree to understand this warning is quite long. snd_seq_write() <-- get the event from the user snd_seq_client_enqueue_event() snd_seq_deliver_event() deliver_to_subscribers() snd_seq_deliver_single_event() snd_opl3_oss_event_input() snd_midi_process_event() do_control() Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: control: fix failure to return new numerical ID in 'replace' event dataTakashi Sakamoto2015-02-091-0/+1
| | | | | | | | | In 'replace' event data, numerical ID of control is always invalid. This commit fix this bug so as the event data has renewed numerical ID for control. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcm: allow for trigger_tstamp snapshot in .triggerPierre-Louis Bossart2015-02-091-1/+3
| | | | | | | | | Don't use generic snapshot of trigger_tstamp if low-level driver or hardware can get a more precise value for better audio/system time synchronization. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcm: don't override timestamp unconditionallyPierre-Louis Bossart2015-02-091-1/+4
| | | | | | | | | | | | timestamp in RUNNING mode is already taken in update_hw_ptr routine, getting a new timestamp introduces offset between hw_ptr, audio_tstamp and system time Add else condition to read timestamp as fallback and only when enabled Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: control: fix failure to return numerical ID in 'add' eventTakashi Sakamoto2015-02-081-0/+1
| | | | | | | | | Currently when adding a new control, the assigned numerical ID is not set for event data, thus userspace applications cannot realize it just by event data. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: Add a helper to add a new attribute group to cardTakashi Iwai2015-02-061-6/+25
| | | | | | | | | | | | | | | For assigning sysfs entries for a card device from the driver, introduce a new helper function, snd_card_add_dev_attr(). In this way, we can avoid the possible race between the device registration and the sysfs addition / removal. The driver can pass a new attribute group to add freely. This has to be called before snd_card_register(). Currently, up to two extra groups can be added. More than that, it'll return an error. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge tag 'asoc-v3.20-2' of ↵Takashi Iwai2015-02-051-0/+85
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v3.20 More updates for v3.20: - Lots of refactoring from Lars-Peter Clausen, moving drivers to more data driven initialization and rationalizing a lot of DAPM usage. - Much improved handling of CDCLK clocks on Samsung I2S controllers. - Lots of driver specific cleanups and feature improvements. - CODEC support for TI PCM514x and TLV320AIC3104 devices. - Board support for Tegra systems with Realtek RT5677. Conflicts: sound/soc/intel/sst-mfld-platform-pcm.c
| * Merge remote-tracking branch 'asoc/topic/pcm512x' into asoc-nextMark Brown2015-02-041-0/+85
| |\
| | * ALSA: pcm: Add snd_interval_ranges() and snd_pcm_hw_constraint_ranges()Peter Rosin2015-01-281-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add helper functions to allow drivers to specify several disjoint ranges for a variable. In particular, there is a codec (PCM512x) that has a hole in its supported range of rates, due to PLL and divider restrictions. This is like snd_pcm_hw_constraint_list(), but for ranges instead of points. Signed-off-by: Peter Rosin <peda@axentia.se> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | Merge branch 'topic/snd-device' into for-nextTakashi Iwai2015-02-039-255/+237
|\ \ \
| * | | ALSA: Drop snd_get_device() helperTakashi Iwai2015-02-021-43/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the device is no longer hidden but embedded into each component, we no longer need snd_get_device(). Let's drop it and relevant codes. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: Simplify snd_device_register() variantsTakashi Iwai2015-02-028-86/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that all callers have been replaced with snd_device_register_for_dev(), let's drop the obsolete device registration code and concentrate only on the code handling struct device directly. That said, - remove the old snd_device_register(), - rename snd_device_register_for_dev() with snd_device_register(), - drop superfluous arguments from snd_device_register(), - change snd_unregister_device() to pass the device pointer directly Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: compress: Embed struct deviceTakashi Iwai2015-02-021-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like previous patches, this one embeds the struct device into struct snd_compr. As the dev field wasn't used beforehand, it's reused as the new device struct. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: seq: Handle the device directlyTakashi Iwai2015-02-021-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like the previous change for the timer device, this patch changes the device management for the ALSA sequencer device using the struct device directly. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: timer: Handle the device directlyTakashi Iwai2015-02-021-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a relatively straightforward change, using the struct device directly for managing the ALSA timer device. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
OpenPOWER on IntegriCloud