- 04 12月, 2013 1 次提交
-
-
由 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>
-
- 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>
-
- 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>
-
- 10 5月, 2012 1 次提交
-
-
由 Mark Brown 提交于
They pollute the global namespace and cause sparse to complain. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: NLiam Girdwood <lrg@ti.com>
-
- 08 5月, 2012 1 次提交
-
-
由 Mark Brown 提交于
When we instantiate an aux_dev we use a fake rtd as part of the process which doesn't have a dai_link associated with it. Fix the dpcm startup code to cope with this. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: NLiam Girdwood <lrg@ti.com>
-
- 28 4月, 2012 1 次提交
-
-
由 Liam Girdwood 提交于
Remove writable debugFS permission, use simple_open() and fix indentation. Signed-off-by: NLiam Girdwood <lrg@ti.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 27 4月, 2012 5 次提交
-
-
由 Liam Girdwood 提交于
Provide an ioctl marshaller for ASoC platform drivers. This will use the default ALSA handler if no platform handler exists. This is also required for DPCM BE PCMs as snd_pcm_info() will call the ioctl as part of stream startup. Signed-off-by: NLiam Girdwood <lrg@ti.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Liam Girdwood 提交于
Some on SoC DSP HW is very tightly coupled with DMA and DAI drivers. It's necessary to allow some flexability wrt to PCM operations here so that we can define a bespoke DPCM trigger() PCM operation for such HW. A bespoke DPCM trigger() allows exact ordering and timing of component triggering by allowing a component driver to manage the final enable and disable configurations without adding extra complexity to other component drivers. e.g. The McPDM DAI and ABE are tightly coupled on OMAP4 so we have a bespoke trigger to manage the trigger to improve performance and reduce complexity when triggering new McPDM BEs. Signed-off-by: NLiam Girdwood <lrg@ti.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Liam Girdwood 提交于
This patch allows DPCM to dynamically alter the FE to BE PCM links at runtime based on mixer setting updates. DAPM is looked up after every mixer update and we perform a DPCM runtime update if the mixer has a change of value. This patchs adds/changes the following :- o Adds DPCM runtime update core. o Changes soc_dapm_mixer_update_power() and soc_dapm_mux_update_power() to return if a change has occured rather than 0. No other users check atm. Signed-off-by: NLiam Girdwood <lrg@ti.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Liam Girdwood 提交于
Add debugFS files for DPCM link management information. Signed-off-by: NLiam Girdwood <lrg@ti.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Liam Girdwood 提交于
The Dynamic PCM core allows digital audio data to be dynamically routed between different ALSA PCMs and DAI links on SoC CPUs with on chip DSP devices. e.g. audio data could be played on pcm:0,0 and routed to any (or all) SoC DAI links. Dynamic PCM introduces the concept of Front End (FE) PCMs and Back End (BE) PCMs. The FE PCMs are normal ALSA PCM devices except that they can dynamically route digital audio data to any supported BE PCM. A BE PCM has no ALSA device, but represents a DAI link and it's substream and audio HW parameters. e.g. pcm:0,0 routing digital data to 2 external codecs. FE pcm:0,0 ----> BE (McBSP.0) ----> CODEC 0 +--> BE (McPDM.0) ----> CODEC 1 e.g. pcm:0,0 and pcm:0,1 routing digital data to 1 external codec. FE pcm:0,0 --- +--> BE (McBSP.0) ----> CODEC FE pcm:0,1 --- The digital audio routing is controlled by the usual ALSA method of mixer kcontrols. Dynamic PCM uses a DAPM graph to work out the routing based upon the mixer settings and configures the BE PCMs based on routing and the FE HW params. DPCM is designed so that most ASoC component drivers will need no modification at all. It's intended that existing CODEC, DAI and platform drivers can be used in DPCM based audio devices without any changes. However, there will be some cases where minor changes are required (e.g. for very tightly coupled HW) and there are helpers to support this too. Somethimes the HW params of a FE and BE do not match or are incompatible, so in these cases the machine driver can reconfigure any hw_params and make any DSP perform sample rate / format conversion. This patch adds the core DPCM code and contains :- o The FE and BE PCM operations. o FE and BE DAI link support. o FE and BE PCM creation. o BE support API. o BE and FE link management. Signed-off-by: NLiam Girdwood <lrg@ti.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 01 4月, 2012 1 次提交
-
-
由 Liam Girdwood 提交于
Currently stream events are only perfomed on codec stream widgets only. There is now a need to be able to perform stream events on platform widgets too. e.g. we have the ABE platform driver with several DAI links to dummy codecs. We need to be able to perform stream events on any of the dummy codec DAI links. This patch also removes the snd_soc_dai * parameter since it's already contained within the rtd * parameter. Finally makle stream event return void since no one checks it anyway. Signed-off-by: NLiam Girdwood <lrg@ti.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 18 2月, 2012 1 次提交
-
-
由 Mark Brown 提交于
In order to allow us to do something smarter than iterate through widgets doing strcmp() to work out what to power up for stream events change the interface used to generate them to be based on the combination of a DAI and a stream direction rather than just a simple string identifying the stream. At some point we'll probably want a set of channels too. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: NLiam Girdwood <lrg@ti.com>
-
- 09 2月, 2012 1 次提交
-
-
由 Mark Brown 提交于
Since we've already got logic to special case immediate teardown of the stream we may as well use it if the pmdown_time has been set to zero by the application layer instead of scheduling a work item with zero delay. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: NLiam Girdwood <lrg@ti.com>
-
- 02 2月, 2012 1 次提交
-
-
由 Mark Brown 提交于
Use the standard logging macros and use dev_ variants where we can, also reporting error codes whenever we report an error. These changes (the error codes in particular) make it noticeably easier to figure out what went wrong just from the basic dmesg output. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: NLiam Girdwood <lrg@ti.com>
-
- 25 1月, 2012 1 次提交
-
-
由 Peter Ujfalusi 提交于
As per discussion we can safely ignore the 8 and 16 bit sample sizes when applying the msbits constraint. Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 22 1月, 2012 1 次提交
-
-
由 Mark Brown 提交于
On the off chance that an application both pays attention and gets confused. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 20 1月, 2012 1 次提交
-
-
由 Mark Brown 提交于
Most devices accept data in formats that don't correspond directly to their internal format. ALSA allows us to set a msbits constraint which tells userspace about this in case it finds it useful (for example, in order to avoid wasting effort dithering bits that will be ignored when raising the sample size of data) so provide a mechanism for drivers to specify the number of bits that are actually significant on a DAI and add the appropriate constraints along with all the others. This is done slightly awkwardly as the constraint is specified per sample size - we loop over every possible sample size, including ones that the device doesn't support and including ones that have fewer bits than are actually used, but this is harmless as the upper layers do the right thing in these cases. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: NLiam Girdwood <lrg@ti.com>
-
- 04 1月, 2012 1 次提交
-
-
由 Sangsu Park 提交于
The original code does not cover the case that two DAIs(CPU) have different ASoC core PCM operations(like mmap, pointer...). Currently we have only one global soc_pcm_ops for ASoC core PCM operation. When two DAIs have different pointer functions, second DAI's pointer function is set for both first DAI and second DAI in case of original code. This patch uses runtime's pcm_ops instead of global pcm_ops for each DAIs. So each DAIs can have different ASoC core PCM operations. This is needed to support multiple DAIs. Signed-off-by: NSangsu Park <sangsu4u.park@samsung.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 08 12月, 2011 1 次提交
-
-
由 Mark Brown 提交于
Every device that implements runtime power management for DAIs is doing it in pretty much the same way: in the startup callback they take a runtime PM reference and then in the shutdown callback they release that reference, keeping the device active while the DAI is active. Given the frequency with which this is done and the obviousness of the need to keep the device active in this period factor the code out into the core, taking references on the device for each CPU DAI, CODEC DAI and DMA device in the core. As runtime PM is reference counted this shouldn't interfere with any other reference holding by the drivers, and since (in common with the existing implementations) we don't check for errors on enabling it shouldn't matter if the device actually has runtime PM enabled or not. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Tested-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
-