aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-02-24ASoC: core: allow pcms to be registered as nonatomicVinod Koul1-0/+3
ALSA core with commit 257f8cce5d40 - "ALSA: pcm: Allow nonatomic trigger operations" allows trigger ops to implemented as nonatomic. For ASoC, we can specify this in dailinks and is updated while snd_pcm is created Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24ALSA: Add params_set_format helperFang, Yang A1-0/+7
Add a helper to set pcm format directly from params Signed-off-by: Fang, Yang A <yang.a.fang@intel.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-23Merge branch 'topic/timestamp' into for-nextTakashi Iwai1-2/+64
2015-02-20ALSA: core: remove .wall_clockPierre-Louis Bossart1-2/+0
can be removed without breaking git-bisect now Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-20ALSA: core: add .get_time_infoPierre-Louis Bossart1-0/+4
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>
2015-02-20ALSA: core: selection of audio_tstamp type and accuracy reportsPierre-Louis Bossart1-0/+60
Audio timestamps can be extracted from sample counters, wall clocks, PHC clocks (Ethernet AVB), on-demand synchronized snapshots. This patch provides the ability to report timestamping capabilities, select timestamp types and retrieve timestamp accuracy, if supported. Details can be found in Documentations/sound/alsa/timestamping.txt This functionality is introduced by reclaiming the reserved_aligned field introduced by commit9c7066aef4a5eb8e4063de28f06c508bf6f2963a in snd_pcm_status to provide userspace with selection/query capabilities. Additional driver_tstamp and audio_tstamp_accuracy fields are also added. snd_pcm_mmap_status remains a read-only structure with only the audio timestamp value accessible from user space. The selection of audio timestamp type is done through snd_pcm_status only This commit does not impact ABI and does not impact the default behavior. By default audio timestamp is aligned with hw_pointer and reports the DMA position. Backwards compatibility is handled by using the HDAudio wall clock for playback and the hw_ptr for all other cases. For timestamp selection a new STATUS_EXT ioctl is introduced with read/write parameters. Alsa-lib will be modified to make use of STATUS_EXT. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-12ALSA: seq: Drop snd_seq_autoload_lock() and _unlock()Takashi Iwai1-5/+1
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>
2015-02-12ALSA: seq: Define driver object in each driverTakashi Iwai1-8/+19
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>
2015-02-12ALSA: seq: Clean up device and driver structsTakashi Iwai1-12/+6
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>
2015-02-12ALSA: seq: Rewrite sequencer device binding with standard busTakashi Iwai1-0/+3
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>
2015-02-12ALSA: seq: Don't compile snd_seq_device_load_drivers() for built-inTakashi Iwai1-0/+4
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-09ALSA: pcm: allow for trigger_tstamp snapshot in .triggerPierre-Louis Bossart1-0/+1
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>
2015-02-09Merge remote-tracking branches 'asoc/topic/simple', 'asoc/topic/sta32x', 'asoc/topic/tdm-slot', 'asoc/topic/tegra' and 'asoc/topic/tlv320aic3x' into asoc-nextMark Brown2-5/+14
2015-02-09Merge remote-tracking branches 'asoc/topic/pxa', 'asoc/topic/rcar' and 'asoc/topic/rt286' into asoc-nextMark Brown1-0/+1
2015-02-09Merge remote-tracking branches 'asoc/topic/cs42l73', 'asoc/topic/dai' and 'asoc/topic/davinci' into asoc-nextMark Brown1-0/+3
2015-02-09Merge remote-tracking branch 'asoc/topic/w-codec' into asoc-nextMark Brown2-1/+3
2015-02-09Merge remote-tracking branch 'asoc/topic/pcm512x' into asoc-nextMark Brown1-0/+12
2015-02-09Merge remote-tracking branch 'asoc/topic/core' into asoc-nextMark Brown1-1/+1
2015-02-09Merge remote-tracking branches 'asoc/fix/ac97', 'asoc/fix/atmel', 'asoc/fix/intel', 'asoc/fix/rt286', 'asoc/fix/rt5640', 'asoc/fix/samsung', 'asoc/fix/sgtl5000', 'asoc/fix/sta32x', 'asoc/fix/tlv320aic3x' and 'asoc/fix/wm8731' into asoc-linusMark Brown1-0/+1
2015-02-09Merge tag 'asoc-v3.19-rc2' into asoc-linusMark Brown1-1/+0
ASoC: Updates for v3.20 Nothing too exciting here yet, a small optimization for DAPM from Lars-Peter and a few small bits and pieces for drivers but nothing that really stands out. # gpg: Signature made Tue 30 Dec 2014 00:15:48 HKT using RSA key ID 5D5487D0 # gpg: Oops: keyid_from_fingerprint: no pubkey # gpg: key AF88CD16: no public key for trusted key - skipped # gpg: key AF88CD16 marked as ultimately trusted # gpg: key 5621E907: no public key for trusted key - skipped # gpg: key 5621E907 marked as ultimately trusted # gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>" # gpg: aka "Mark Brown <broonie@debian.org>" # gpg: aka "Mark Brown <broonie@kernel.org>" # gpg: aka "Mark Brown <broonie@tardis.ed.ac.uk>" # gpg: aka "Mark Brown <broonie@linaro.org>" # gpg: aka "Mark Brown <Mark.Brown@linaro.org>"
2015-02-06ALSA: Add a helper to add a new attribute group to cardTakashi Iwai1-0/+3
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>
2015-02-05Merge tag 'asoc-v3.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-nextTakashi Iwai7-7/+35
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
2015-02-04Merge remote-tracking branches 'asoc/topic/rx51', 'asoc/topic/samsung', 'asoc/topic/sh', 'asoc/topic/simple' and 'asoc/topic/sta32x' into asoc-nextMark Brown2-5/+14
2015-02-04Merge remote-tracking branches 'asoc/topic/omap', 'asoc/topic/pxa' and 'asoc/topic/rcar' into asoc-nextMark Brown1-0/+1
2015-02-04Merge remote-tracking branches 'asoc/topic/cs42l73', 'asoc/topic/dai' and 'asoc/topic/davinci' into asoc-nextMark Brown1-0/+3
2015-02-04Merge remote-tracking branch 'asoc/topic/w-codec' into asoc-nextMark Brown2-1/+3
2015-02-04Merge remote-tracking branch 'asoc/topic/pcm512x' into asoc-nextMark Brown1-0/+12
2015-02-04Merge remote-tracking branch 'asoc/topic/dapm' into asoc-nextMark Brown1-1/+0
2015-02-04Merge remote-tracking branch 'asoc/topic/core' into asoc-nextMark Brown1-1/+1
2015-02-04Merge remote-tracking branches 'asoc/fix/ac97', 'asoc/fix/atmel', 'asoc/fix/intel', 'asoc/fix/rt286', 'asoc/fix/rt5640', 'asoc/fix/sgtl5000', 'asoc/fix/sta32x', 'asoc/fix/tlv320aic3x' and 'asoc/fix/wm8731' into asoc-linusMark Brown1-0/+1
2015-02-03Merge branch 'topic/snd-device' into for-nextTakashi Iwai6-43/+22
2015-02-02ASoC: Add sysfs entries via static attribute groupsTakashi Iwai1-1/+1
Instead of calling device_create_file() manually, assign the static attribute group entries at the device registration. This simplifies the error handling and avoids the possible races. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-02ALSA: Drop snd_get_device() helperTakashi Iwai1-1/+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>
2015-02-02ALSA: Simplify snd_device_register() variantsTakashi Iwai1-35/+4
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>
2015-02-02ALSA: compress: Embed struct deviceTakashi Iwai1-2/+2
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>
2015-02-02ALSA: rawmidi: Embed struct deviceTakashi Iwai1-1/+3
Like previous patches, this changes the device management for rawmidi, embedding the struct device into struct snd_rawmidi. The required change is more or less same as hwdep device. The currently unused dev field is reused as the new embedded struct field now. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-02ALSA: pcm: Embed struct deviceTakashi Iwai1-1/+1
Like previous patches, at this time we embed the struct device into PCM object. However, this needs a bit more caution: struct snd_pcm doesn't own one device but two, for both playback and capture! Thus not struct snd_pcm but struct snd_pcm_str object contains the device. Along with this change, pcm->dev field is dropped for avoiding confusion. It was meant to point to a non-standard parent. But, since now we can touch each struct device directly, we can manipulate the parent field easily there, too. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-02ALSA: hwdep: Embed struct deviceTakashi Iwai1-2/+1
Like the previous patch, this one embeds the device object into hwdep object. For a proper object lifecycle, it's freed in the release callback. This also allows us to create sysfs entries via passing to the groups field of the device without explicit function calls. Since each driver can see the device and touch its groups field directly, we don't need to delegate in hwdep core any longer. So, remove the groups field from snd_hwdep, and let the user (in this case only hda_hwdep.c) modify the device groups. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-02ALSA: control: Embed struct deviceTakashi Iwai1-0/+1
This patch embeds a struct device for the control device into the card object and avoid the device creation at registration time. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-02ALSA: Add a helper to initialize deviceTakashi Iwai1-0/+2
Introduce a new helper function snd_device_initialize() to initialize the device object for sound devices. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-02ALSA: control: Provide a helper to look for the preferred subdeviceTakashi Iwai1-2/+9
Instead of open-coding the search over the control file loop, provide a helper function for the preferred subdevice assigned to the current process. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-02ALSA: Allow to pass the device object to snd_register_device*()Takashi Iwai1-7/+7
This is a preliminary patch for the further work on embedding struct device into each sound device instance. It changes snd_register_device*() helpers to receive the device object directly for skipping creating a device there. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28Merge branch 'topic/ak411x-fix' into for-nextTakashi Iwai2-2/+20
2015-01-28ALSA: ak411x: Fix race of reinit() callsTakashi Iwai2-0/+2
Protect the call with a mutex, as this may be called in parallel (either from the PCM rate change and the clock change). Acked-by: Jaroslav Kysela <perex@perex.cz> Tested-by: Pavel Hofman <pavel.hofman@ivitera.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: ak411x: Add PM helper functionsTakashi Iwai2-0/+16
Define snd_ak4114_suspend() and snd_ak4114_resume() functions to handle PM properly, stopping and restarting the work at PM. Currently only ice1712/juli.c deals with the PM and ak4114, so fix the calls there appropriately. The same PM functions are defined in ak4113.c, too, although they aren't currently called yet (ice1712/quartet.c may be enhanced to support PM later). Acked-by: Jaroslav Kysela <perex@perex.cz> Tested-by: Pavel Hofman <pavel.hofman@ivitera.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: ak411x: Fix stall in work callbackTakashi Iwai2-2/+2
When ak4114 work calls its callback and the callback invokes ak4114_reinit(), it stalls due to flush_delayed_work(). For avoiding this, control the reentrance by introducing a refcount. Also flush_delayed_work() is replaced with cancel_delayed_work_sync(). The exactly same bug is present in ak4113.c and fixed as well. Reported-by: Pavel Hofman <pavel.hofman@ivitera.com> Acked-by: Jaroslav Kysela <perex@perex.cz> Tested-by: Pavel Hofman <pavel.hofman@ivitera.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: pcm: Add snd_interval_ranges() and snd_pcm_hw_constraint_ranges()Peter Rosin1-0/+12
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>
2015-01-28ALSA: Include linux/io.h instead of asm/io.hTakashi Iwai3-3/+3
Nowadays it's recommended. Replace all in a shot. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-27ASoC: sta32x: add device tree binding.Thomas Niederprüm1-5/+13
make the sta32x driver usable with device tree configs. Code is heavily based on the sta350 driver. Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-26ASoC: Add support for allocating AC'97 device before registering itLars-Peter Clausen1-0/+1
In some cases it is necessary to before additional operations after the device has been initialized and before the device is registered. This can for example be resetting the device. This patch introduces a new function snd_soc_alloc_ac97_codec() which is similar to snd_soc_new_ac97_codec() except that it does not register the device. Any users of snd_soc_alloc_ac97_codec() are responsible for calling device_add() manually. Fixes: 6794f709b712 ("ASoC: ac97: Drop delayed device registration") Reported-by: Manuel Lauss <manuel.lauss@gmail.com> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Tested-by: Manuel Lauss <manuel.lauss@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org