summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MIPS: math-emu: Get rid of the useless parts of exception handling.Ralf Baechle2014-05-2332-263/+92
| | | | | | All it really did was throw a printk for no obvious reason. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: math-emu: Move various objects into an ar library.Ralf Baechle2014-05-233-7/+8
| | | | | | | | | | | | | | | ieee754d.o contains only debug code and dp_sqrt.o and sp_sqrt.o contain code which for MIPS I/II/III systems we don't want to link. Again the savings can be considerable for some systems: $ mips-linux-size --totals ieee754d.o dp_sqrt.o sp_sqrt.o text data bss dec hex filename 1624 0 0 1624 658 ieee754d.o 2016 0 0 2016 7e0 dp_sqrt.o 736 0 0 736 2e0 sp_sqrt.o 4376 0 0 4376 1118 (TOTALS) Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: math-emu: Inline ieee754sp_issnan and ieee754dp_issnan.Ralf Baechle2014-05-234-4/+2
| | | | | | Shaves another 16 bytes off but more importantly avoids function calls. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: math-emu: Remove unused code.Ralf Baechle2014-05-2321-699/+6
| | | | | | Shrinks the FPU emulator by 4528 bytes. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: math-emu: Remove unused ieee754sp_bestnan() and ieee754dp_bestnan().Ralf Baechle2014-05-234-26/+0
| | | | | | | Both are unused since lmo commit fdffbafbb38723618626c70ffdc6ff9175cdffa2 [Lots of FPU bug fixes from Kjeld Borch Egevang.] Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: math-emu: Inline ieee754dp_finite and ieee754dp_finite().Ralf Baechle2014-05-235-12/+10
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: math-emu: Eleminate duplicate definitions of identical macros.Ralf Baechle2014-05-238-63/+33
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: math-emu: Use SPSIGN() rather than DPSIGN() in ieee754sp_sub().Ralf Baechle2014-05-231-1/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: math-emu: Replace DP_MBITS with DP_FBITS and SP_MBITS with SP_FBITS.Ralf Baechle2014-05-2325-100/+100
| | | | | | | Both were defined as 23 rsp. 52 though the mentissa is actually a bit more than the fraction. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: math-emu: Call ieee754di_xcpt, not ieee754si_xcpt in ieee754dp_cmp.Ralf Baechle2014-05-231-1/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: math-emu: Cleanup stdarg usage including apparently bogus comment.Ralf Baechle2014-05-234-8/+4
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: math-emu: Remove #if 1 and dead code from its #else branch.Ralf Baechle2014-05-231-10/+0
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: math-emu: Cleanup ieee754si_indef() / ieee754di_indef().Ralf Baechle2014-05-231-6/+10
| | | | | | | | LONG_LONG_MAX is a symbol defined in <limits.h> which may not be available so better rely on something provided by a kernel header. While at it, turn these function-like macros into inline functions. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: math-emu: Convert debug printks to pr_debug getting.Ralf Baechle2014-05-232-16/+9
| | | | | | And another bunch of #ifdefs bite the dust. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: math-emu: Get rid of unuable extended precision support.Ralf Baechle2014-05-231-3/+0
| | | | | | No usable functionality and nothig does ever define IEEE854_XP anyway. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: IP22: This platform may come with either MIPS III or MIPS IV CPUs.Ralf Baechle2014-05-231-0/+4
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: math-emu: Remove most ifdefery.Ralf Baechle2014-05-213-82/+144
| | | | | | | | Most of these tests should be runtime tests. This also finally means that on a MIPS III systems MIPS IV opcodes are going to result in an exception as they're supposed to. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: math-emu: Turn macros into functions where possible.Ralf Baechle2014-05-2139-131/+143
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: math-emu: Harden ieee754int.h against multiple inclusion.Ralf Baechle2014-05-211-1/+4
| | | | | | | The header file had no include guards; this only happened to work because the file only contains macro definitions and protypes. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: math-emu: Reformat code according to coding style.Ralf Baechle2014-05-217-133/+140
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: math-emu: Move all debug fs code to a separate file.Ralf Baechle2014-05-213-56/+62
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: math-emu: Remove fine example of cargo cult programming.Ralf Baechle2014-05-211-7/+0
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: math-emu: Header file weeding.Ralf Baechle2014-05-217-29/+12
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: branch: Make inclusion of <asm/branch.h> safe.Ralf Baechle2014-05-211-0/+2
| | | | | | It was relying on other headers having been included before. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: math-emu: Use helpers to manipulate CAUSEF_BD flag.Ralf Baechle2014-05-212-8/+8
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: branch: New helpers to modify branch delay slot flag in struct pt_regsRalf Baechle2014-05-211-0/+10
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: math-emu: Get rid of typedefs.Ralf Baechle2014-05-2140-212/+212
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: math-emu: Use English spelling of `constant' rather than Danish.Ralf Baechle2014-05-212-8/+8
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: math-emu: Mark exception handling functions as __cold.Ralf Baechle2014-05-217-16/+23
| | | | | | | Optimizes the code flow and shaves of half a percent of the math-emu code size. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: math-emu: Use __BITFIELD_FIELD to eleminate redundant definitions.Ralf Baechle2014-05-211-63/+23
| | | | | | | Union _ieee754sp was even duplicated even though there are no endian dependencies in it all. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* MIPS: Move definition of __BITFIELD_FIELD to sharable header.Ralf Baechle2014-05-213-18/+32
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Merge tag 'sound-3.15-rc6' of ↵Linus Torvalds2014-05-2024-92/+190
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Unfortunately this update became bigger than previous pull requests, which is almost a pattern in rc5-6. But, the only obvious big changes are for the new Intel DSP ASoC drivers, so the impact must be fairly limited. Other than that, usual small fixes in various fields: HD-audio, ASoC core and ASoC fsl and codec drivers" * tag 'sound-3.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (26 commits) ALSA: sb_mixer: missing return statement ASoC: wm8962: Update register CLASS_D_CONTROL_1 to be non-volatile ASoC: Intel: Fix Baytrail SST DSP firmware loading ALSA: hda - mask buggy stream DMA0 for Broadwell display controller ALSA: hda - Add new GPU codec ID to snd-hda ASoC: fsl_esai: Set PCRC and PRRC registers at the end of hw_params() ASoC: fsl_esai: Only bypass sck_div for EXTAL source ASoC: fsl_esai: Fix incorrect condition within ratio range check for FP ASoC: dapm: Fix SUSPEND -> OFF bias sequence ASoC: dapm: Skip CODEC<->CODEC links in connect_dai_link_widgets() ASoC: pcm: Fix incorrect condition check for case SNDRV_PCM_TRIGGER_SUSPEND ALSA: hda - add headset mic detect quirks for three Dell laptops ASoC: Update Cirrus Logic CODEC maintainers. ASoC: Intel: Fix block offset calculations. ASoC: Intel: Fix check for pdata usage before dereference. ASoC: Intel: Fix stream position pointer. ASoC: Intel: Fix allow hw_params to be called more than once. ASoC: Intel: Fix Audio DSP usage when IOMMU is enabled. ASoC: Intel: Fix Haswell/Broadwell DSP page table creation. ASoC: Intel: Fix allocated block list usage when adding blocks. ...
| * ALSA: sb_mixer: missing return statementDan Carpenter2014-05-141-6/+8
| | | | | | | | | | | | | | | | | | The if condition here was supposed to return on error but the return statement is missing. The effect is that the ->mixername is set to "???" instead of "DT019X". Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * Merge tag 'asoc-v3.15-rc5-intel' of ↵Takashi Iwai2014-05-1411-59/+126
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Intel fixes for v3.15 This is a relatively large batch of fixes for the newly added Haswell/Baytrail drivers from Intel. It's a bit larger than is good for this point in the cycle but it's all for a newly added driver so not so worrying as it might otherwise be. Some of it's integration problems, some of it's the sort of problem usually turned up in stress tests.
| | * ASoC: Intel: Fix Baytrail SST DSP firmware loadingJarkko Nikula2014-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 10df350977b1 ("ASoC: Intel: Fix Audio DSP usage when IOMMU is enabled.") caused following regression in Baytrail SST: baytrail-pcm-audio baytrail-pcm-audio: error: DMA alloc failed baytrail-pcm-audio baytrail-pcm-audio: error: failed to load firmware Fix this by calling dma_coerce_mask_and_coherent() in sst_byt_init() with the same dma_dev device what is now used in sst_fw_new() when allocating the DMA buffer. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * ASoC: Intel: Fix block offset calculations.Liam Girdwood2014-05-071-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | Block offset calculations are done in the contiguous allocator so are not required here. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * ASoC: Intel: Fix check for pdata usage before dereference.Liam Girdwood2014-05-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following dereference check ordering. sound/soc/intel/sst-haswell-pcm.c:749 hsw_pcm_probe() warn: variable dereferenced before check 'pdata' (see line 746) git remote add asoc git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git git remote update asoc git checkout 0b708c87f66a15190fb43661c2320fd48c4dc6c8 vim +/pdata +749 sound/soc/intel/sst-haswell-pcm.c a4b12990 Mark Brown 2014-03-12 740 }; a4b12990 Mark Brown 2014-03-12 741 a4b12990 Mark Brown 2014-03-12 742 static int hsw_pcm_probe(struct snd_soc_platform *platform) a4b12990 Mark Brown 2014-03-12 743 { a4b12990 Mark Brown 2014-03-12 744 struct sst_pdata *pdata = dev_get_platdata(platform->dev); a4b12990 Mark Brown 2014-03-12 745 struct hsw_priv_data *priv_data; 0b708c87 Liam Girdwood 2014-05-02 @746 struct device *dma_dev = pdata->dma_dev; 0b708c87 Liam Girdwood 2014-05-02 747 int i, ret = 0; a4b12990 Mark Brown 2014-03-12 748 a4b12990 Mark Brown 2014-03-12 @749 if (!pdata) a4b12990 Mark Brown 2014-03-12 750 return -ENODEV; a4b12990 Mark Brown 2014-03-12 751 a4b12990 Mark Brown 2014-03-12 752 priv_data = devm_kzalloc(platform->dev, sizeof(*priv_data), GFP_KERNEL); Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * ASoC: Intel: Fix stream position pointer.Liam Girdwood2014-05-023-7/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | Read the stream offset and presentation position from DSP memory rather than using the old estimated position. This fixes timing issues with pulseaudio. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * ASoC: Intel: Fix allow hw_params to be called more than once.Liam Girdwood2014-05-021-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | hw_params() can be called multiple times. Make sure we release the DSP stream that was allocated on previous hw_params() calls before allocating a new DSP stream. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * ASoC: Intel: Fix Audio DSP usage when IOMMU is enabled.Liam Girdwood2014-05-027-15/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Intel IOMMU requires that the ACPI device is used to allocate all DMA memory buffers. This means we need to pass the DMA device pointer into child component devices that allocate DMA memory. We also only set the DMA mask for the ACPI device now instead of for each component device. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * ASoC: Intel: Fix Haswell/Broadwell DSP page table creation.Liam Girdwood2014-05-021-27/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix page table creation on Haswell and Broadwell to remove unsafe virt_to_phys mappings and use more portable SG buffer. Use audio buffer APIs to allocate DMA buffers. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * ASoC: Intel: Fix allocated block list usage when adding blocks.Liam Girdwood2014-05-021-0/+3
| | | | | | | | | | | | | | | | | | | | | Make sure we add the allocated blocks to the modules list of blocks. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * ASoC: Intel: Fix block allocation so we only allocate blocks once.Liam Girdwood2014-05-021-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | Make sure we dont alloc blocks twice with requests spanning more than one block. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * ASoC: Intel: Cancel hsw_notification_work before freeing the streamJarkko Nikula2014-04-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I suppose there is a possibility that hsw_notification_work() may run after sst_hsw_stream_free() which can lead to a kernel crash since struct sst_hsw_stream is freed at that point and stream = container_of(work, struct sst_hsw_stream, notify_work) is not valid when hsw_notification_work() is run. Reported-by: Derek Basehore <dbasehore@chromium.org> Reported-by: Wenkai Du <wenkai.du@intel.com> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * ASoC: Intel: Fix audio crash due to race condition in stream deletionWenkai Du2014-04-232-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a race between sst_byt_stream_free() and sst_byt_get_stream() if sst_byt_get_stream() called from sst_byt_irq_thread() context is accessing the byt->stream_list while a stream is deleted from the list. A stream is added to byt->stream_list in sst_byt_stream_new() and deleted in sst_byt_stream_free(). sst_byt_get_stream() is always protected by sst->spinlock, but the stream addition and deletion are not protected. The patch adds spinlock to both stream addition and deletion. [Jarkko: Same fix added to sst-haswell-ipc.c too] Signed-off-by: Wenkai Du <wenkai.du@intel.com> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | Merge tag 'asoc-v3.15-rc5-drivers' of ↵Takashi Iwai2014-05-146-16/+34
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Driver fixes for v3.15 A small set of driver fixes, nothing remarkable in itself or of any relevance outside of the driver.
| | | \
| | | \
| | | \
| | | \
| | | \
| | | \
| | | \
| | | \
| | | \
| | | \
| | *---------. \ Merge remote-tracking branches 'asoc/fix/audmux', 'asoc/fix/cs42l52', ↵Mark Brown2014-05-1410-26/+46
| | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'asoc/fix/fsl-esai', 'asoc/fix/fsl-spdif', 'asoc/fix/rcar', 'asoc/fix/tlv320aic31xx' and 'asoc/fix/wm8962' into asoc-linus
| | | | | | | | * | ASoC: wm8962: Update register CLASS_D_CONTROL_1 to be non-volatileCharles Keepax2014-05-132-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The register CLASS_D_CONTROL_1 is marked as volatile because it contains a bit, DAC_MUTE, which is also mirrored in the ADC_DAC_CONTROL_1 register. This causes problems for the "Speaker Switch" control, which will report an error if the CODEC is suspended because it relies on a volatile register. To resolve this issue mark CLASS_D_CONTROL_1 as non-volatile and manually keep the register cache in sync by updating both bits when changing the mute status. Reported-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Tested-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
| | | | | | | * | | ASoC: tlv320aic31xx: Convert /n to \nJoe Perches2014-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a newline character appropriately. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | | | | | * | | | ASoC: rsnd: call rsnd_dai_pointer_update() from outside of lockKuninori Morimoto2014-04-231-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rsnd_soc_dai_trigger() will be called after rsnd_dai_pointer_update() function which is using rsnd_lock(). Thus, it should be called from outside of rsnd_lock(). Kernel will be hangup without this patch. Special thanks to Kataoka-san Reported-by: Ryo Kataoka <ryo.kataoka.wt@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>