- 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>
-
- 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>
-
- 28 11月, 2013 2 次提交
-
-
由 Lars-Peter Clausen 提交于
snd_pcm_limit_hw_rates() will initialize the minimum and maximum sample rate for the PCM stream based on the rates specified in the rates field. Since we call snd_pcm_limit_hw_rates() after soc_pcm_init_runtime_hw() it will essentially overwrite the min and max rate set in soc_pcm_init_runtime_hw(). This may cause the minimum or maximum rate to be set to a value outside the range of one of the components if one of the components sets either SNDRV_PCM_RATE_CONTINUOUS or SNDRV_PCM_RATE_KNOT and the other component specified a discrete rate via SNDRV_PCM_RATE_[0-9]* that is outside of the first component's rate range. To fix this first calculate the minimum and maximum rates using snd_pcm_limit_hw_rates() and then on top of that apply the contraints specified in the snd_soc_pcm_stream structs. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Acked-by: NTakashi iwai <tiwai@suse.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Lars-Peter Clausen 提交于
In order to make sure that the sample rate is in the supported range of both components the maximum rate of the card should be the minimum of the maximum rate of each components. There is one special case to consider though, if max_rate is set to 0 this means there is no maximum specified, so use min_not_zero() macro which will give use the desired result. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Acked-by: NTakashi iwai <tiwai@suse.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 24 11月, 2013 2 次提交
-
-
由 Nicolin Chen 提交于
We're now applying soc_hw_params_symmetry() to reject unmatched parameters while we clear parameters in soc_pcm_close(). So here's a use case might be broken by this mechanism: aplay -Dhw:0 44100.wav 48000.wav 32000.wav In this case, we call soc_pcm_open()->soc_pcm_hw_params()->soc_pcm_hw_free() ->soc_pcm_hw_params()->soc_pcm_hw_free()->soc_pcm_close() in order. As we only clear parameters in soc_pcm_close(). The parameters would be remained in the system even if the playback of 44100.wav is finished. Thus, this patch is trying to move parameters cleaning into hw_free() so that the system can continue to serve this kind of use case. Also, since we set them in hw_params(), it should be better to clear them in hw_free() for symmetry. Signed-off-by: NNicolin Chen <b42378@freescale.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Nicolin Chen 提交于
Some SoCs can only work in mono or stereo mode at one time. So if we let them capture a mono stream while playing a stereo stream, there might be a problem occur to one of these two streams: double paced or slowed down. In soc-pcm.c, we have soc_pcm_apply_symmetry() to apply the rate symmetry. But we don't have one for channels. Likewise, we can treat symmetric_rate as a solution for those SoCs or CODECs which can not handle asymmetrical LRCLK. But it's also impossible for them to handle asymmetrical BCLK. And accodring to BCLK = LRCLK * channel number * slot size(fixed or sample bits), sample bits might also be a problem if they are not using a fixed slot size. Thus, this patch applys symmetry for channels and sample bits. Meanwhile, there might be a race between two substreams if starting simultaneously. Previously, we only added warning to compalin but still using conservative way to let it carry on. However, this patch rejects the second stream with any unmatched parameter to make sure the first existing stream won't be broken. Signed-off-by: NNicolin Chen <b42378@freescale.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 05 11月, 2013 1 次提交
-
-
由 Nicolin Chen 提交于
It's quite popular that more drivers are using pinctrl PM, for example: (Documentation/devicetree/bindings/arm/primecell.txt). Just like what runtime PM does, it would deactivate and activate pin group depending on whether it's being used or not. And this pinctrl PM might be also beneficial to cpu dai drivers because they might have actual pinctrl so as to sleep their pins and wake them up as needed. To achieve this goal, this patch sets pins to the default state during resume or startup; While during suspend and shutdown, it would set pins to the sleep state. As pinctrl PM would return zero if there is no such pinctrl sleep state settings, this patch would not break current ASoC subsystem directly. [ However, there is still an exception that the patch can not handle, that is, when cpu dai driver does not have pinctrl property but another device has it. (The AUDMUX <-> SSI on Freescale i.MX6 series for example. SSI as a cpu dai doesn't contain pinctrl property while AUDMUX, an Audio Multiplexer, has it). In this case, this kind of cpu dai driver needs to find a way to obtain the pinctrl property as its own, by moving property from AUDMUX to SSI, or creating a pins link/dependency between these two devices, or using a more decent way after we figure it out. ] Signed-off-by: NNicolin Chen <b42378@freescale.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 01 11月, 2013 2 次提交
-
-
由 Russell King - ARM Linux 提交于
Avoid oopsing if there is no backend stream associated with a front end stream. Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Mark Brown 提交于
Ensure that we always check that an ops structure is present before we try to use it, improving the robustness of the system. Reported-by: NRussell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 01 10月, 2013 1 次提交
-
-
由 Jarkko Nikula 提交于
dev_ prints are already prefixed by ": " before format string so there is no need for extra spaces. Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 01 9月, 2013 1 次提交
-
-
由 Fabio Estevam 提交于
Add 'playback_only' and 'capture_only' fields that can be used for specifying that a dai_link has a unidirectional capability. The motivation for this is for the cases of systems, such as Freescale MX28, that has two unidirectional DAIs. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 24 7月, 2013 1 次提交
-
-
由 Lars-Peter Clausen 提交于
soc_dpcm_runtime_update() operates on a ASoC card as a whole. Currently it takes a snd_soc_dapm_widget as its only parameter though. The widget is then used to look up the card and is otherwise unused. This patch changes the function to take a pointer to the card directly. This makes it possible to to call soc_dpcm_runtime_update() for updates which are not related to one specific widget. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 18 7月, 2013 1 次提交
-
-
由 Mark Brown 提交于
There is no need to use a normal per-CPU workqueue for delayed power downs as they're not timing or performance critical and waking up a core for them would defeat some of the point. Signed-off-by: NMark Brown <broonie@linaro.org> Reviewed-by: NViresh Kumar <viresh.kumar@linaro.org>
-
- 07 6月, 2013 1 次提交
-
-
由 Mark Brown 提交于
Even though they are virtual widgets DAI widgets still get counted for the DAPM context power management so we can't just use the active state to check if they should be powered as they may not be part of a complete path. Instead split them into input and output widgets and do the same power checks as we perform on AIFs. Reported-by: NStephen Warren <swarren@nvidia.com> Tested-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 03 6月, 2013 1 次提交
-
-
由 Mark Brown 提交于
When declaring playback and capture capabilities check for both CODEC side and CPU side support rather than only checking for CODEC side support. While it is unusual some CPUs do have unidirectional DAIs. Reported-by: NFabio Estevam <fabio.estevam@freescale.com> Tested-by: NFabio Estevam <fabio.estevam@freescale.com> Acked-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 14 5月, 2013 2 次提交
-
-
由 Lars-Peter Clausen 提交于
We use the same code to initialize the runtime pcm based on the snd_soc_pcm_stream struct on both the playback and capture path. Factor this code into a helper function to make things a bit more tidy. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Acked-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Lars-Peter Clausen 提交于
snd_soc_set_runtime_hwparams() is the only PCM related function that lives in soc-core.c. All other PCM related functions live in soc-pcm.c, so move snd_soc_set_runtime_hwparams() over as well for a bit more consistency. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Acked-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 08 2月, 2013 1 次提交
-
-
由 Mark Brown 提交于
Help avoid noise from the power up of the capture path propagating through into the start of the recording (especially noise caused by the ramp of microphone biases) by keeping the capture muted until after we've finished powering things up with DAPM in the same manner we do for playback. This allows us to take advantage of soft mute support in the hardware more effectively and is more consistent. The core code using the existing digital mute operation is updated to take advantage of this. Some additional cases in the soc-pcm code and suspend will need separate handling but these are less practically relevant than the main runtime stream start/stop case. Rather than refactor the digital mute function in every single driver a new operation is added for drivers taking advantage of this functionality, the old operation should be phased out over time. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Acked-by Vinod Koul <vinod.koul@intel.com> Acked-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com>
-
- 12 1月, 2013 1 次提交
-
-
由 Dan Carpenter 提交于
I've removed several unreachable returns. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 20 12月, 2012 1 次提交
-
-
由 Patrick Lai 提交于
When front-end PCM session is in paused state, back-end PCM session will be put in paused state as well if given front-end PCM session is the only client of given back-end. Then, application closes front-end PCM session, DPCM framework will not allow back-end enters HW_FREE state so back-end will never get shutdown completely. Signed-off-by: NPatrick Lai <plai@codeaurora.org> Acked-by: NLiam Girdwood <lrg@ti.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
-
- 15 12月, 2012 1 次提交
-
-
由 Misael Lopez Cruz 提交于
pop_wait is used to determine if a deferred playback close needs to be cancelled when the a PCM is open or if after the power-down delay expires it needs to run. pop_wait is associated with the CODEC DAI, so the CODEC DAI must be unique. This holds true for most CODECs, except for the dummy CODEC and its DAI. In DAI links with non-unique dummy CODECs (e.g. front-ends), pop_wait can be overwritten by another DAI link using also a dummy CODEC. Failure to cancel a deferred close can cause mute due to the DAPM STOP event sent in the deferred work. One scenario where pop_wait is overwritten and causing mute is below (where hw:0,0 and hw:0,1 are two front-ends with default pmdown_time = 5 secs): aplay /dev/urandom -D hw:0,0 -c 2 -r 48000 -f S16_LE -d 1 sleep 1 aplay /dev/urandom -D hw:0,1 -c 2 -r 48000 -f S16_LE -d 3 & aplay /dev/urandom -D hw:0,0 -c 2 -r 48000 -f S16_LE Since CODECs may not be unique, pop_wait is moved to the PCM runtime structure. Creating separate dummy CODECs for each DAI link can also solve the problem, but at this point it's only pop_wait variable in the CODEC DAI that has negative effects by not being unique. Signed-off-by: NMisael Lopez Cruz <misael.lopez@ti.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 28 11月, 2012 1 次提交
-
-
由 Mark Brown 提交于
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 21 11月, 2012 1 次提交
-
-
由 Liam Girdwood 提交于
Currently ASoC has a mixture of message prefixes e.g. "ASoC", "asoc" or none and message types e.g. pr_debug or dev_dbg. Make sure all ASoC core messages use the same "ASoC" prefix and convert any component device specific messages to use dev_dbg instead of pr_debug. Signed-off-by: NLiam Girdwood <lrg@ti.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 07 7月, 2012 2 次提交
-
-
由 Liam Girdwood 提交于
Some userspace will open a PCM device and then configure mixers for routing before triggering. This patch allows userspace to do this sequence. Signed-off-by: NLiam Girdwood <lrg@ti.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Liam Girdwood 提交于
Use dev_ style logging throughout soc_new_pcm() Signed-off-by: NLiam Girdwood <lrg@ti.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 08 6月, 2012 1 次提交
-
-
由 Liam Girdwood 提交于
Make sure that the dpcm_get_be() only returns BE DAI links. Signed-off-by: NLiam Girdwood <lrg@ti.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-