- 22 5月, 2015 1 次提交
-
-
由 Kuninori Morimoto 提交于
Current DPCM is caring only FE format. but it will be no sound if FE/BE was below style, and user selects S24_LE format. FE: S16_LE/S24_LE BE: S16_LE DPCM can rewrite the format, so basically we don't want to constrain with the BE constraints. But sometimes it will be trouble. This patch adds new .dpcm_merged_format on struct snd_soc_dai_link. DPCM will use FE / BE merged format if .struct snd_soc_dai_link has it. We can have other .dpcm_merged_xxx in the future .dpcm_merged_foramt .dpcm_merged_rate .dpcm_merged_chan Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: NKeita Kobayashi <keita.kobayashi.ym@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 09 4月, 2015 2 次提交
-
-
由 Lars-Peter Clausen 提交于
If the registration of a debugfs directory fails this is treated as a non-fatal error in ASoC and operation continues as normal. This means we need to be careful and check if the parent debugfs directory exists if we try to register a debugfs file or sub-directory. Otherwise we might end up passing NULL for the parent and the file or directory will be registered in the top-level debugfs directory. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Lars-Peter Clausen 提交于
Failing to register the debugfs entries is not fatal and will not affect normal operation of the sound card. Don't abort the card registration if soc_dpcm_debugfs_add() fails. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 23 2月, 2015 1 次提交
-
-
由 Vinod Koul 提交于
ALSA core with commit 257f8cce - "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: NSubhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: NVinod Koul <vinod.koul@intel.com> Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 01 1月, 2015 1 次提交
-
-
由 Takashi Iwai 提交于
sound/soc/soc-pcm.c: In function ‘soc_pcm_set_msb’: sound/soc/soc-pcm.c:307:11: warning: unused variable ‘i’ [-Wunused-variable] Fixes: 0e2a3751 ('ASoC: pcm: Use wildcard msbits constraints') Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 30 12月, 2014 1 次提交
-
-
由 Lars-Peter Clausen 提交于
Use the new wildcard msbits constraints instead of installing a constraint for each available sample format width. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Acked-by: NMark Brown <broonie@kernel.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 24 12月, 2014 1 次提交
-
-
由 Jarkko Nikula 提交于
Both codec and cpu DAI prepare print the same error message making it a bit more difficult to grep quickly from sources. Fix this by telling it explicitly. Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 05 12月, 2014 1 次提交
-
-
由 Qiao Zhou 提交于
Do not free BE hw if it's still used by other FE during dpcm runtime shutdown. Otherwise the BE runtime state will be STATE_HW_FREE and won't be updated to STATE_CLOSE when shutdown ends, because BE dai shutdown function won't close pcm when detecting BE is still under use. With STATE_HW_FREE, BE can't be triggered start again. This corner case can easily appear when one BE is used by two FE, without this patch "ASoC: dpcm: Fix race between FE/BE updates and trigger"(ea9d0d77). One FE tries to shutdown but it's raced against xrun on another FE. It improves the be dai hw_free logic. Signed-off-by: NQiao Zhou <zhouqiao@marvell.com> Acked-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 22 11月, 2014 1 次提交
-
-
由 Qiao Zhou 提交于
Skip dpcm path checking for playback or capture, if corresponding FE doesn't support playback or capture, or currently is not ready. It can reduce the unnecessary cost to search connected widgets. [Tweaked comments for clarity -- broonie] Signed-off-by: NQiao Zhou <zhouqiao@marvell.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 05 11月, 2014 1 次提交
-
-
由 Takashi Iwai 提交于
DPCM can update the FE/BE connection states totally asynchronously from the FE's PCM state. Most of FE/BE state changes are protected by mutex, so that they won't race, but there are still some actions that are uncovered. For example, suppose to switch a BE while a FE's stream is running. This would call soc_dpcm_runtime_update(), which sets FE's runtime_update flag, then sets up and starts BEs, and clears FE's runtime_update flag again. When a device emits XRUN during this operation, the PCM core triggers snd_pcm_stop(XRUN). Since the trigger action is an atomic ops, this isn't blocked by the mutex, thus it kicks off DPCM's trigger action. It eventually updates and clears FE's runtime_update flag while soc_dpcm_runtime_update() is running concurrently, and it results in confusion. Usually, for avoiding such a race, we take a lock. There is a PCM stream lock for that purpose. However, as already mentioned, the trigger action is atomic, and we can't take the lock for the whole soc_dpcm_runtime_update() or other operations that include the lengthy jobs like hw_params or prepare. This patch provides an alternative solution. This adds a way to defer the conflicting trigger callback to be executed at the end of FE/BE state changes. For doing it, two things are introduced: - Each runtime_update state change of FEs is protected via PCM stream lock. - The FE's trigger callback checks the runtime_update flag. If it's not set, the trigger action is executed there. If set, mark the pending trigger action and returns immediately. - At the exit of runtime_update state change, it checks whether the pending trigger is present. If yes, it executes the trigger action at this point. Reported-and-tested-by: NQiao Zhou <zhouqiao@marvell.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de> Acked-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
-
- 20 10月, 2014 1 次提交
-
-
由 Ramesh Babu 提交于
We call mute for codec dai only, we should call this for cpu dai as well to allow cpu dais (FEs) in DSPs to be muted/unmuted on shutdown/startup Signed-off-by: NRamesh Babu <ramesh.babu@intel.com> Signed-off-by: NSubhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: NVinod Koul <vinod.koul@intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 08 10月, 2014 1 次提交
-
-
由 Daniel Mack 提交于
In the SNDRV_PCM_STREAM_CAPTURE branch in soc_pcm_apply_msb(), look at sig_bits of the capture stream, not the playback one. Spotted by coverity. Signed-off-by: NDaniel Mack <daniel@zonque.org> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
-
- 10 9月, 2014 1 次提交
-
-
由 Qiao Zhou 提交于
dpcm_path_get may return -ENOMEM when allocating memory for list fails. We should not keep processing path or start up dpcm dai in this case. Signed-off-by: NQiao Zhou <zhouqiao@marvell.com> Acked-by: NVinod Koul <vinod.koul@intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 17 7月, 2014 2 次提交
-
-
由 Benoit Cousson 提交于
Add a function helper to factorize the hw_params code. Suggested by Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: NBenoit Cousson <bcousson@baylibre.com> Tested-by: NLars-Peter Clausen <lars@metafoo.de> Reviewed-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Benoit Cousson 提交于
Add multicodec support in soc-pcm.c Signed-off-by: NBenoit Cousson <bcousson@baylibre.com> Signed-off-by: NMisael Lopez Cruz <misael.lopez@ti.com> Signed-off-by: NFabien Parent <fparent@baylibre.com> Tested-by: NLars-Peter Clausen <lars@metafoo.de> Reviewed-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 02 7月, 2014 1 次提交
-
-
由 Benoit Cousson 提交于
Refactor the function to facilitate the migration to multiple codecs. Fix a trailing space in the header as well. No functional change. Signed-off-by: NBenoit Cousson <bcousson@baylibre.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 22 6月, 2014 1 次提交
-
-
由 Lars-Peter Clausen 提交于
The component struct already has a name and id field which are initialized to the same values as the same fields in the CODEC and platform structs. So remove them from the CODEC and platform structs and used the ones from the component struct instead. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 21 6月, 2014 1 次提交
-
-
由 Qiao Zhou 提交于
we need to release dapm widget list after dpcm_path_get in soc_dpcm_runtime_update. otherwise, there will be potential memory leak. add dpcm_path_put to fix it. Signed-off-by: NQiao Zhou <zhouqiao@marvell.com> Signed-off-by: NMark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
-
- 13 5月, 2014 2 次提交
-
-
由 Lars-Peter Clausen 提交于
This was initially removed in commit 6423c187 ("ASoC: Remove runtime field from DAI"), but was, presumably by accident, brought back in commit f0fba2ad ("ASoC: multi-component - ASoC Multi-Component Support"). But has never been initialized to anything but NULL ever since. This commit removes it again. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Nicolin Chen 提交于
The regular state before we execute SNDRV_PCM_TRIGGER_SUSPEND should be SNDRV_PCM_TRIGGER_START, not SNDRV_PCM_TRIGGER_STOP. Thus fix it. Signed-off-by: NNicolin Chen <Guangyu.Chen@freescale.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 30 4月, 2014 1 次提交
-
-
由 Jarkko Nikula 提交于
Machine specific trigger callback allows to do final stream start/stop related operations in a machine driver after setting up the codec, DMA and DAI. One example could be clock management for linked streams case where machine driver can start/stop synchronously the linked streams. Signed-off-by: NJarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: NStefan Roese <sr@denx.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 24 4月, 2014 1 次提交
-
-
由 Benoit Cousson 提交于
Replace rtd_get_codec_widget() and rtd_get_cpu_widget() by a simple dai_get_widget() in preparation for DAI-multicodec support, per Lars suggestion. No functional change. Signed-off-by: NBenoit Cousson <bcousson@baylibre.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 23 3月, 2014 1 次提交
-
-
由 Mark Brown 提交于
The changes in "ASoC: pcm: free path list before exiting from error conditions" actually introduced both double frees (in case where the path list was allocated but empty) and frees of unallocated memory (in cases where the error being handled was -ENOMEM. Drop the commit for now. Fixes: e4ad1acc (ASoC: pcm: free path list before exiting from error conditions) Reported-by: NBen Hutchings <ben@decadent.org.uk> Signed-off-by: NMark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
-
- 06 3月, 2014 5 次提交
-
-
由 Lars-Peter Clausen 提交于
In preparation for componentization move the ignore_pmdown_time field from the snd_soc_codec struct to the snd_soc_component struct. Set it to true for non CODEC components for now. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Lars-Peter Clausen 提交于
There is no reason why active count tracking should only be done for CODECs but not for other components. Moving the active count from the snd_soc_codec struct to the snd_soc_component struct reduces the differences between CODECs and other components and will eventually allow component to component DAI links (Which is a prerequisite for converting CODECs to components). Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Lars-Peter Clausen 提交于
For CODEC to CODEC links we need to make sure to also manage the 'active' field of the cpu_dai CODEC. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Lars-Peter Clausen 提交于
We have the same code that increments and decrements the active field of the various PCM runtime components (all with the same bugs). Factor this out into common helper functions. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Lars-Peter Clausen 提交于
For CODEC to CODEC links we should only immediately power down if both CODECs are configured to ignore the power down delay. Factor the logic for this into a helper function that can be used for both compressed and normal PCMs. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 05 3月, 2014 1 次提交
-
-
由 Patrick Lai 提交于
dpcm_path_get() allocates dynamic memory to hold path list. Corresponding dpcm_path_put() must be called to free the memory. dpcm_path_put() is not called under several error conditions. This leads to memory leak. Signed-off-by: NPatrick Lai <plai@codeaurora.org> Signed-off-by: NMark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
-
- 18 1月, 2014 1 次提交
-
-
由 Liam Girdwood 提交于
The ASoC compressed code needs to call the internal DPCM APIs in order to dynamically route compressed data to different DAIs. Signed-off-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 15 1月, 2014 2 次提交
-
-
由 Lars-Peter Clausen 提交于
Instead of open-coding the intersecting of two rate masks (and getting slightly wrong for some of the corner cases) use the new snd_pcm_rate_mask_intersect() helper function. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Lars-Peter Clausen 提交于
If none of the components (CODEC or CPU DAI) sets a maximum sample rate we'll end up with the rate_max field of the runtime hardware set to 0. (Note that it is still possible for the components to constrain the supported sample rates using other methods, e.g. setting a list constraint) If rate_max is 0 this means that the sound card doesn't support any rates at all, which is not the desired result. So initialize rate_max to UINT_MAX. For symmetry reasons also set rate_min to 0. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 09 1月, 2014 1 次提交
-
-
由 Lars-Peter Clausen 提交于
Some DMA cores might add additional restrictions on which in memory audio formats can be supported by the compound sound card. If the PCM component specifies a set of formats it supports (by setting the formats field to non 0) take these into account when calculating the format set for the compound sound card. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Tested-by: NShawn Guo <shawn.guo@linaro.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 08 1月, 2014 2 次提交
-
-
由 Liam Girdwood 提交于
Some BE DAIs can be "dummy" (when the DSP is controlling the DAI) and as such wont have set a minimum number of playback or capture channels required for BE DAI registration (to establish supported stream directions). Force machine drivers to explicitly set whether they support playback and capture stream directions for every BE DAIs. Signed-off-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Jean-Francois Moine 提交于
When the platform driver has no ops, the platform function bespoke_trigger() is no more called. The problem was introduced by the commit c5914b0a "ASoC: pcm: Check for ops before deferencing them" Signed-off-by: NJean-Francois Moine <moinejf@free.fr> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 07 1月, 2014 2 次提交
-
-
由 Lars-Peter Clausen 提交于
Allow PCMs that do not impose any restrictions on the supported formats to set the formats field to 0, Instead of assuming that this means that the PCM does not support any formats (which doesn't make much sense), assume that it supports all formats. This brings the behavior of DPCM closer to that of non-DPCM. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Lars-Peter Clausen 提交于
We have the same code for initializing the runtime pcm on both the playback and the capture path. Factor this out into a common helper function. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 04 12月, 2013 2 次提交
-
-
由 Nicolin Chen 提交于
The snd_soc_dai_digital_mute() here will be never executed because we only decrease codec->active in snd_soc_close(). Thus correct it. Signed-off-by: NNicolin Chen <b42378@freescale.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Nicolin Chen 提交于
This patch removed the redundant snd_soc_dai_digital_mute() in close() since it's better to mute in hw_free() which's slightly earlier and symmetrical for the case of reconfiguration: 'aplay 44k1.wav 48k.wav', for example, will be open()->hw_params()->prepare(unmute)->playi1ng->hw_free(mute)->hw_params()-> parepare(unmute)->playing->hw_free(mute)->close() Signed-off-by: NNicolin Chen <b42378@freescale.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 02 12月, 2013 1 次提交
-
-
由 Lars-Peter Clausen 提交于
If there are symmetry constraints between the playback and the capture channel set the SNDRV_PCM_INFO_JOINT_DUPLEX flag to let userspace know about this. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-