summaryrefslogtreecommitdiffstats
path: root/sound
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'asoc/topic/pcm' into for-tiwaiMark Brown2014-01-165-18/+53
|\
| * ASoC: pcm: Use snd_pcm_rate_mask_intersect() helperLars-Peter Clausen2014-01-141-7/+2Star
| | | | | | | | | | | | | | | | | | 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: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| * ALSA: Add helper function for intersecting two rate masksLars-Peter Clausen2014-01-141-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A bit of special care is necessary when creating the intersection of two rate masks. This comes from the special meaning of the SNDRV_PCM_RATE_CONTINUOUS and SNDRV_PCM_RATE_KNOT bits, which needs special handling when intersecting two rate masks. SNDRV_PCM_RATE_CONTINUOUS means the hardware supports all rates in a specific interval. SNDRV_PCM_RATE_KNOT means the hardware supports a set of discrete rates specified by a list constraint. For all other cases the supported rates are specified directly in the rate mask. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| * ASoC: s6000: Don't mix SNDRV_PCM_RATE_CONTINUOUS with specific ratesLars-Peter Clausen2014-01-141-2/+1Star
| | | | | | | | | | | | | | | | | | SNDRV_PCM_RATE_CONTINUOUS means that all rates (possibly limited to a certain interval) are supported. There is no need to manually set other rate bits. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Daniel Glöckner <daniel-gl@gmx.net> Signed-off-by: Mark Brown <broonie@linaro.org>
| * ASoC: fsl: Don't mix SNDRV_PCM_RATE_CONTINUOUS with specific ratesLars-Peter Clausen2014-01-142-4/+2Star
| | | | | | | | | | | | | | | | SNDRV_PCM_RATE_CONTINUOUS means that all rates (possibly limited to a certain interval) are supported. There is no need to manually set other rate bits. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| * ASoC: pcm: Properly initialize hw->rate_maxLars-Peter Clausen2014-01-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| * Merge tag 'v3.13-rc3' into asoc-pcmMark Brown2014-01-1423-126/+282
| |\ | | | | | | | | | Linux 3.13-rc3
| * | ASoC: Allow PCMs to restrict the supported formatsLars-Peter Clausen2014-01-091-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Lars-Peter Clausen <lars@metafoo.de> Tested-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | ASoC: dpcm: Explicitly set BE DAI link supported stream directionsLiam Girdwood2014-01-071-4/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | | Merge remote-tracking branch 'asoc/topic/dma' into for-tiwaiMark Brown2014-01-164-29/+44
|\ \ \
| * | | ASoC: samsung: Remove SND_DMAENGINE_PCM_FLAG_NO_RESIDUE flagLars-Peter Clausen2014-01-141-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Samsung dmaengine ASoC driver is used with two different dmaengine drivers. The pl80x, which properly supports residue reporting and the pl330, which reports that it does not support residue reporting. So there is no need to manually set the NO_RESIDUE flag. This has the advantage that a proper (race condition free) PCM pointer() implementation is used when the pl80x driver is used. Also once the pl330 driver supports residue reporting the ASoC PCM driver will automatically start using it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | ASoC: axi-{spdif,i2s}: Remove SND_DMAENGINE_PCM_FLAG_NO_RESIDUE flagLars-Peter Clausen2014-01-142-4/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pl330 driver properly reports that it does not have residue reporting support, which means the PCM dmanegine driver is able to figure this out on its own. So there is no need to set the flag manually. Removing the flag has the advantage that once the pl330 driver gains support for residue reporting it will automatically be used by the generic dmaengine PCM driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | ASoC: generic-dmaengine-pcm: Check DMA residue granularityLars-Peter Clausen2014-01-141-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dmaengine framework now exposes the granularity with which it is able to report the transfer residue for a certain DMA channel. Check the granularity in the generic dmaengine PCM driver and a) Set the SNDRV_PCM_INFO_BATCH if the granularity is per period or worse. b) Fallback to the (race condition prone) period counting if the driver does not support any residue reporting. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | ASoC: generic-dmaengine-pcm: Check NO_RESIDUE flag at runtimeLars-Peter Clausen2014-01-141-24/+15Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we have two different snd_soc_platform_driver structs in the generic dmaengine PCM driver. One for dmaengine drivers that support residue reporting and one for those which do not. When registering the PCM component we check whether the NO_RESIDUE flag is set or not and use the corresponding snd_soc_platform_driver. This patch modifies the driver to only have one snd_soc_platform_driver struct where the pointer() callback checks the NO_RESIDUE flag at runtime. This allows us to set the NO_RESIDUE flag after the PCM component has been registered. This becomes necessary when querying whether the dmaengine driver supports residue reporting from the dmaengine driver itself since the DMA channel might only be requested after the PCM component has been registered. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | Merge branch 'topic/samsung' of ↵Mark Brown2014-01-1411-73/+154
| |\ \ \ | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-dma
| * \ \ \ Merge branch 'topic/axi' of ↵Mark Brown2014-01-146-0/+577
| |\ \ \ \ | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-dma
* | \ \ \ \ Merge remote-tracking branch 'asoc/topic/dapm' into for-tiwaiMark Brown2014-01-163-11/+72
|\ \ \ \ \ \
| * | | | | | ASoC: dapm: Change prototype of soc_widget_readArun Shamanna Lakshmi2014-01-151-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | soc_widget_read API returns the register data and it is possible that a register can contain 0xffffffff. Thus, change the prototype of soc_widget_read to return only the error code and pass the reg data through pointer argument. Signed-off-by: Arun Shamanna Lakshmi <aruns@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | | | ASoC: sapm: Automatically connect DAI link widgets in DAPM graph.Liam Girdwood2014-01-082-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Connect the DAPM graph through each BE DAI link to the componnent(s) on the other side of the BE DAI link. This allows the graph to be walked on both sides of the link when graph changes are made. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | | | ASoC: utils: Add internal call to determine if DAI is dummy.Liam Girdwood2014-01-081-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide a quick way to tell if a DAI is a dummy DAI or a regular DAI. This is for internal DAPM usage only and is used to determine whether to insert a DAI link connection into the DAPM graph. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | | | | | | Merge remote-tracking branch 'asoc/topic/core' into for-tiwaiMark Brown2014-01-162-18/+21
|\ \ \ \ \ \ \
| * | | | | | | ASoC: core: Return -ENOTSUPP from set_sysclk() if no operation providedMark Brown2014-01-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it easier for generic code to work with set_sysclk() by distinguishing between the operation not being supported and an error as is done for other operations like set_dai_fmt() Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | | | | ASoC: pcm: Fix lack of platform bespoke_trigger() callJean-Francois Moine2014-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the platform driver has no ops, the platform function bespoke_trigger() is no more called. The problem was introduced by the commit c5914b0aaea6494aaa9e415cbd32f8b7eb604af0 "ASoC: pcm: Check for ops before deferencing them" Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | | | | ASoC: dpcm: Allow PCMs to omit the set of supported formatsLars-Peter Clausen2014-01-061-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | | | | ASoC: dpcm: Add helper function for initializing runtime pcmLars-Peter Clausen2014-01-061-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| | | | | | | |
| \ \ \ \ \ \ \
*-. \ \ \ \ \ \ \ Merge remote-tracking branches 'asoc/fix/adau1701' and ↵Mark Brown2014-01-162-3/+3
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'asoc/fix/tlv320aic32x4' into for-tiwai
| | * | | | | | | | ASoC: tlv320aic32x4: Fix regmap range_minMarkus Pargmann2014-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | range_min is the lowest address in the virtual register range. This is the first register with address 0, not the first register of page 1. Currently all writes to page 1 are mapped to page 0, so the codec fails to operate. Fixes: 4d208ca429ad (ASoC: tlv320aic32x4: Convert to direct regmap API usage) Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org (v3.13 if the fix misses -final)
| | * | | | | | | | ASoC: codec: tlv320aic32x4: Fix regmap range configMarkus Pargmann2014-01-131-1/+1
| | | |_|_|_|_|/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This codec driver fails to probe because it has a higher regmap range_max value than max_register. This patch sets the range_max to the max_register value as described in the for struct regmap_range_cfg: "@range_max: Address of the highest register in virtual range." Fixes: 4d208ca429ad (ASoC: tlv320aic32x4: Convert to direct regmap API usage) Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org (v3.13 if the fix misses -final)
| * / | | | | | | ASoC: adau1701: Fix ADAU1701_SEROCTL_WORD_LEN_16 constantLars-Peter Clausen2014-01-081-1/+1
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver defines ADAU1701_SEROCTL_WORD_LEN_16 as 0x10 while it should be b10, so 0x2. This patch fixes it. Reported-by: Magnus Reftel <magnus.reftel@lockless.no> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
* | | | | | | | sound: oss: remove last sleep_on usersArnd Bergmann2014-01-144-23/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are three files in oss for which I could not find an easy way to replace interruptible_sleep_on_timeout with a non-racy version. This patch instead just adds a private implementation of the function, now named oss_broken_sleep_on, and changes over the remaining users in sound/oss/ so we can remove the global interface. [fixed coding style warnings by tiwai] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | | | | | sound: oss: dmasound: kill SLEEP() macro to avoid raceArnd Bergmann2014-01-142-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The use of interruptible_sleep_on_timeout in the dmasound driver is questionable and we want to kill off all sleep_on variants. This replaces the calls with wait_event_interruptible_timeout where possible, to wait for a particular event instead of blocking in a racy way. In the sq_write function, the easiest solution is an open-coded prepare_to_wait loop. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | | | | | sound: oss: midibuf: fix sleep_on racesArnd Bergmann2014-01-141-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sleep_on is known to be racy and going away because of this. All instances of interruptible_sleep_on and interruptible_sleep_on_timeout in the midibuf driver can trivially be replaced with wait_event_interruptible and wait_event_interruptible_timeout. [fixed coding style warnings by tiwai] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | | | | | sound: oss: vwsnd: avoid interruptible_sleep_onArnd Bergmann2014-01-141-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Interruptible_sleep_on is racy and we want to remove it. This replaces the use in the vwsnd driver with an open-coded prepare_to_wait loop that fixes the race between concurrent open() and close() calls, and also drops the global mutex while waiting here, which restores the original behavior that was changed during the BKL removal. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | | | | | sound: oss: msnd_pinnacle: avoid interruptible_sleep_on_timeoutArnd Bergmann2014-01-141-13/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to remove all sleep_on variants from the kernel because they are racy. In case of the pinnacle driver, we can replace interruptible_sleep_on_timeout with wait_event_interruptible_timeout by changing the meaning of a few flags used in the driver so they are cleared at wakeup time, which is a somewhat more appropriate way to do the same, although probably still racy. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | | | | | ALSA: hda - Fix endless vmaster hook call in thinkpad_helper.cTakashi Iwai2014-01-141-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new vmaster hook, update_tpacpi_mute_led(), calls the original vmaster hook, but I forgot to save the original hook function but keep calling the updated one, which of course results in a stupid endless loop. Fixed now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | | | | | ALSA: snd-usb: re-order some quirk entriesDaniel Mack2014-01-141-86/+84Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No code change, just a cosmetic cleanup to keep entries ordered by the device ID within a block of unique vendor IDs. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | | | | | ALSA: usb-audio: Fix Creative VF0420 ratePavel Hofman2014-01-141-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Creative Live! Cam Vista IM (VF0420) reports rate of 16kHz while working at 8kHz. The patch adds its USB ID to the existing quirk. Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | | | | | ALSA: usb-audio: Add support for Focusrite Saffire 6 USBEduard Gilmutdinov2014-01-142-4/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Eduard Gilmutdinov <edgilmutdinov@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | | | | | ALSA: hda - automute via amp instead of pinctl on some AIO modelsHui Wang2014-01-141-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some AIO (All In One) models with the codec alc668 (Vendor ID: 0x10ec0668) on it, when we plug a headphone into the jack, the system will switch the output to headphone and set the speaker to automute as well as change the speaker Pin-ctls from 0x40 to 0x00, this will bring loud noise to the headphone. I tried to disable the corresponding EAPD, but it did not help to eliminate the noise. According to Takashi's suggestion, we use amp operation to replace the pinctl modification for the automute, this really eliminate the noise. BugLink: https://bugs.launchpad.net/bugs/1268468 Cc: David Henningsson <david.henningsson@canonical.com> Cc: stable@vger.kernel.org Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | | | | | ALSA: hda - Apply codec power_filter to FG nodesTakashi Iwai2014-01-134-29/+27Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apply the codec->power_filter to the FG nodes in general for reducing hackish set_power_state ops override in patch_sigmatel.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | | | | | ALSA: hda - Don't set indep_hp flag for old AD codecsTakashi Iwai2014-01-131-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some old AD codecs don't like the independent HP handling, either it contains a single DAC (AD1981) or it mandates the mixer routing (AD1986A). This patch removes the indep_hp flag for such codecs. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=68081 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | | | | | ALSA: Enable CONFIG_ZONE_DMA for smaller PCI DMA masksTakashi Iwai2014-01-111-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PCI devices with DMA masks smaller than 32bit should enable CONFIG_ZONE_DMA. Since the recent change of page allocator, page allocations via dma_alloc_coherent() with the limited DMA mask bits may fail more frequently, ended up with no available buffers, when CONFIG_ZONE_DMA isn't enabled. With CONFIG_ZONE_DMA, the system has much more chance to obtain such pages. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=68221 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | | | | | ALSA: PCM: Warn when buffer preallocation failsTakashi Iwai2014-01-111-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The failures of buffer preallocations at driver initializations aren't critical but it's still helpful to inform, so that user can know that something doesn't work as expected. For example, the recent page allocator change triggered regressions, but developers didn't notice until recently because the driver didn't complain. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | | | | | ALSA: ctxfi - Work around emu20k1 glitch to prevent buffered sound data lossSarah Bessmer2014-01-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Occasionally, on playback stream ringbuffer wraparound, the EMU20K1 hardware will momentarily return 0 instead of the proper current(loop) address. This patch handles that case, fixing the problem of playback position corruption and subsequent loss of buffered sound data, that occurs with some common buffering layout patterns(e.g. multiple simultaneous output streams with differently-sized or non-power-of-2-sized buffers). An alternate means of fixing the problem would be to read the ca register continuously, until two sequential reads return the same value; however, that would be a more invasive change, has performance implications, and isn't necessary unless there are also issues with the value not being updated atomically in regards to individual bits or something similar(which I have not encountered through light testing). I have no EMU20K2 hardware to confirm if the issue is present there, but even if it's not, this change shouldn't break anything that's not already broken. Signed-off-by: Sarah Bessmer <aotos@fastmail.fm> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | | | | | ALSA: Merge memalloc code into snd-pcm moduleTakashi Iwai2014-01-092-16/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of keeping a separate snd-page-alloc module, merge into the core snd-pcm module, as we don't need to keep it as an individual module due to the drop of page reservation. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | | | | | ALSA: Remove superfluous header inclusions in memalloc.cTakashi Iwai2014-01-091-4/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After cutting off the proc and page reservation codes, we don't need many headers any longer. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | | | | | ALSA: Remove memory reservation code from memalloc helperTakashi Iwai2014-01-095-313/+18Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nowadays we have CMA for obtaining the contiguous memory pages efficiently. Let's kill the old kludge for reserving the memory pages for large buffers. It was rarely useful (only for preserving pages among module reloading or a little help by an early boot scripting), used only by a couple of drivers, and yet it gives too much ugliness than its benefit. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | | | | | ALSA: Remove memory accounting in memalloc helperTakashi Iwai2014-01-091-29/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's almost superfluous, and doesn't help much for real uses. Let's reduce the layer size. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | | | | | ALSA: hda/hdmi - apply all Haswell fix-ups to Broadwell display codecMengdong Lin2014-01-091-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Broadwell and Haswell have the same behavior on display audio. So this patch defines is_haswell_plus() to include codecs for both Haswell and its successor Broadwell, and apply all Haswell fix-ups to Broadwell. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | | | | | | ALSA: hda - add codec ID for Broadwell display audio codecMengdong Lin2014-01-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds codec ID (0x80862808) and module alias for Broadwell display codec. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>