summaryrefslogtreecommitdiffstats
path: root/sound
AgeCommit message (Collapse)AuthorFilesLines
2016-12-25ktime: Cleanup ktime_set() usageThomas Gleixner3-5/+5
ktime_set(S,N) was required for the timespec storage type and is still useful for situations where a Seconds and Nanoseconds part of a time value needs to be converted. For anything where the Seconds argument is 0, this is pointless and can be replaced with a simple assignment. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org>
2016-12-25ktime: Get rid of the unionThomas Gleixner1-1/+1
ktime is a union because the initial implementation stored the time in scalar nanoseconds on 64 bit machine and in a endianess optimized timespec variant for 32bit machines. The Y2038 cleanup removed the timespec variant and switched everything to scalar nanoseconds. The union remained, but become completely pointless. Get rid of the union and just keep ktime_t as simple typedef of type s64. The conversion was done with coccinelle and some manual mopping up. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org>
2016-12-25clocksource: Use a plain u64 instead of cycle_tThomas Gleixner1-3/+3
There is no point in having an extra type for extra confusion. u64 is unambiguous. Conversion was done with the following coccinelle script: @rem@ @@ -typedef u64 cycle_t; @fix@ typedef cycle_t; @@ -cycle_t +u64 Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: John Stultz <john.stultz@linaro.org>
2016-12-24Replace <asm/uaccess.h> with <linux/uaccess.h> globallyLinus Torvalds7-7/+7
This was entirely automated, using the script by Al: PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*<asm/uaccess.h>' sed -i -e "s!$PATT!#include <linux/uaccess.h>!" \ $(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h) to do the replacement at the end of the merge window. Requested-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-12-21Revert "ALSA: usb-audio: Fix race at stopping the stream"Takashi Iwai1-8/+4
This reverts commit 16200948d8353fe29a473a394d7d26790deae0e7. The commit was intended to cover the race condition, but it introduced yet another regression for devices with the implicit feedback, leading to a kernel panic due to NULL-dereference in an irq context. As the race condition that was addressed by the commit is very rare and the regression is much worse, let's revert the commit for rc1, and fix the issue properly in a later patch. Fixes: 16200948d835 ("ALSA: usb-audio: Fix race at stopping the stream") Reported-by: Ioan-Adrian Ratiu <adi@adirat.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-12-14Merge tag 'sound-4.10-rc1' of ↵Linus Torvalds234-4475/+21271
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "No dramatic changes are found in this development cycle, but as usual, many commits are applied in a wide range of drivers. Most of big changes are in ASoC, where a few bits of framework work and quite a lot of cleanups and improvements to existing code have been done. The rest are usual stuff, a few HD-audio and USB-audio quirks and fixes, as well as the drop of kthread usages in the whole subsystem. Below are some highlights: ASoC: - support for stereo DAPM controls - some initial work on the of-graph sound card - regmap conversions of the remaining AC'97 drivers - a new version of the topology ABI; this should be backward compatible - updates / cleanups of rsnd, sunxi, sti, nau8825, samsung, arizona, Intel skylake, atom-sst - new drivers for Cirrus Logic CS42L42, Qualcomm MSM8916-WCD, and Realtek RT5665 USB-audio: - yet another race fix at disconnection - tolerated packet size calculation for some Android devices - quirks for Axe-Fx II, QuickCam, TEAC 501/503 HD-audio: - improvement of Dell pin fixup mapping - quirks for HP Z1 Gen3, Alienware 15 R2 2016 and ALC622 headset mic Misc: - replace all kthread usages with simple works" * tag 'sound-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (296 commits) ALSA: hiface: Fix M2Tech hiFace driver sampling rate change ALSA: usb-audio: Eliminate noise at the start of DSD playback. ALSA: usb-audio: Add native DSD support for TEAC 501/503 DAC ASoC: wm_adsp: wm_adsp_buf_alloc should use kfree in error path ASoC: topology: avoid uninitialized kcontrol_type ALSA: usb-audio: Add QuickCam Communicate Deluxe/S7500 to volume_control_quirks ALSA: usb-audio: add implicit fb quirk for Axe-Fx II ASoC: zte: spdif: correct ZX_SPDIF_CLK_RAT define ASoC: zte: spdif and i2s drivers are not zx296702 specific ASoC: rsnd: setup BRGCKR/BRRA/BRRB when starting ASoC: rsnd: enable/disable ADG when suspend/resume timing ASoC: rsnd: tidyup ssi->usrcnt counter check in hw_params ALSA: cs46xx: add a new line ASoC: Intel: update bxt_da7219_max98357a to support quad ch dmic capture ASoC: nau8825: disable sinc filter for high THD of ADC ALSA: usb-audio: more tolerant packetsize ALSA: usb-audio: avoid setting of sample rate multiple times on bus ASoC: cs35l34: Simplify the logic to set CS35L34_MCLK_CTL setting ALSA: hda - Gate the mic jack on HP Z1 Gen3 AiO ALSA: hda: when comparing pin configurations, ignore assoc in addition to seq ...
2016-12-13Merge tag 'drm-for-v4.10' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds3-10/+17
Pull drm updates from Dave Airlie: "This is the main pull request for drm for 4.10 kernel. New drivers: - ZTE VOU display driver (zxdrm) - Amlogic Meson Graphic Controller GXBB/GXL/GXM SoCs (meson) - MXSFB support (mxsfb) Core: - Format handling has been reworked - Better atomic state debugging - drm_mm leak debugging - Atomic explicit fencing support - fbdev helper ops - Documentation updates - MST fbcon fixes Bridge: - Silicon Image SiI8620 driver Panel: - Add support for new simple panels i915: - GVT Device model - Better HDMI2.0 support on skylake - More watermark fixes - GPU idling rework for suspend/resume - DP Audio workarounds - Scheduler prep-work - Opregion CADL handling - GPU scheduler and priority boosting amdgfx/radeon: - Support for virtual devices - New VM manager for non-contig VRAM buffers - UVD powergating - SI register header cleanup - Cursor fixes - Powermanagement fixes nouveau: - Powermangement reworks for better voltage/clock changes - Atomic modesetting support - Displayport Multistream (MST) support. - GP102/104 hang and cursor fixes - GP106 support hisilicon: - hibmc support (BMC chip for aarch64 servers) armada: - add tracing support for overlay change - refactor plane support - de-midlayer the driver omapdrm: - Timing code cleanups rcar-du: - R8A7792/R8A7796 support - Misc fixes. sunxi: - A31 SoC display engine support imx-drm: - YUV format support - Cleanup plane atomic update mali-dp: - Misc fixes dw-hdmi: - Add support for HDMI i2c master controller tegra: - IOMMU support fixes - Error handling fixes tda998x: - Fix connector registration - Improved robustness - Fix infoframe/audio compliance virtio: - fix busid issues - allocate more vbufs qxl: - misc fixes and cleanups. vc4: - Fragment shader threading - ETC1 support - VEC (tv-out) support msm: - A5XX GPU support - Lots of atomic changes tilcdc: - Misc fixes and cleanups. etnaviv: - Fix dma-buf export path - DRAW_INSTANCED support - fix driver on i.MX6SX exynos: - HDMI refactoring fsl-dcu: - fbdev changes" * tag 'drm-for-v4.10' of git://people.freedesktop.org/~airlied/linux: (1343 commits) drm/nouveau/kms/nv50: fix atomic regression on original G80 drm/nouveau/bl: Do not register interface if Apple GMUX detected drm/nouveau/bl: Assign different names to interfaces drm/nouveau/bios/dp: fix handling of LevelEntryTableIndex on DP table 4.2 drm/nouveau/ltc: protect clearing of comptags with mutex drm/nouveau/gr/gf100-: handle GPC/TPC/MPC trap drm/nouveau/core: recognise GP106 chipset drm/nouveau/ttm: wait for bo fence to signal before unmapping vmas drm/nouveau/gr/gf100-: FECS intr handling is not relevant on proprietary ucode drm/nouveau/gr/gf100-: properly ack all FECS error interrupts drm/nouveau/fifo/gf100-: recover from host mmu faults drm: Add fake controlD* symlinks for backwards compat drm/vc4: Don't use drm_put_dev drm/vc4: Document VEC DT binding drm/vc4: Add support for the VEC (Video Encoder) IP drm: Add TV connector states to drm_connector_state drm: Turn DRM_MODE_SUBCONNECTOR_xx definitions into an enum drm/vc4: Fix ->clock_select setting for the VEC encoder drm/amdgpu/dce6: Set MASTER_UPDATE_MODE to 0 in resume_mc_access as well drm/amdgpu: use pin rather than pin_restricted in a few cases ...
2016-12-12printk/sound: handle more message headersPetr Mladek1-6/+14
Commit 4bcc595ccd80 ("printk: reinstate KERN_CONT for printing continuation lines") allows to define more message headers for a single message. The motivation is that continuous lines might get mixed. Therefore it make sense to define the right log level for every piece of a cont line. This patch allows to copy only the real message level. We should ignore KERN_CONT because <filename:line> is added for each message. By other words, we want to know where each piece of the line comes from. [pmladek@suse.com: fix a check of the valid message level] Link: http://lkml.kernel.org/r/20161111183444.GE2145@dhcp128.suse.cz Link: http://lkml.kernel.org/r/1478695291-12169-5-git-send-email-pmladek@suse.com Signed-off-by: Petr Mladek <pmladek@suse.com> Cc: Joe Perches <joe@perches.com> Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Jason Wessel <jason.wessel@windriver.com> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.com> Cc: Chris Mason <clm@fb.com> Cc: Josef Bacik <jbacik@fb.com> Cc: David Sterba <dsterba@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-12-12ALSA: hiface: Fix M2Tech hiFace driver sampling rate changeJussi Laako1-0/+2
Sampling rate changes after first set one are not reflected to the hardware, while driver and ALSA think the rate has been changed. Fix the problem by properly stopping the interface at the beginning of prepare call, allowing new rate to be set to the hardware. This keeps the hardware in sync with the driver. Signed-off-by: Jussi Laako <jussi@sonarnerd.net> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-12-12ALSA: usb-audio: Eliminate noise at the start of DSD playback.Nobutaka Okabe1-1/+15
[Problem] In some USB DACs, a terrible pop noise comes to be heard at the start of DSD playback (in the following situations). - play first DSD track - change from PCM track to DSD track - change from DSD64 track to DSD128 track (and etc...) - seek DSD track - Fast-Forward/Rewind DSD track [Cause] At the start of playback, there is a little silence. The silence bit pattern "0x69" is required on DSD mode, but it is not like that. [Solution] This patch adds DSD silence pattern to the endpoint settings. Signed-off-by: Nobutaka Okabe <nob77413@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-12-12ALSA: usb-audio: Add native DSD support for TEAC 501/503 DACNobutaka Okabe1-0/+38
This patch adds native DSD support for the following devices. - TEAC NT-503 - TEAC UD-503 - TEAC UD-501 (1) Add quirks for native DSD support for TEAC devices. (2) A specific vendor command is needed to switch between PCM/DOP and DSD mode, same as Denon/Marantz devices. Signed-off-by: Nobutaka Okabe <nob77413@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-12-12Merge tag 'asoc-v4.10' of ↵Takashi Iwai200-4301/+20977
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v4.10 There's been a few bits of framework work this time around and quite a lot of cleanups and improvements to existing code: - Support for stereo DAPM controls from Chen-yu Tsai. - Some initial work on the of-graph sound card from Morimoto-san, the main bulk of this is currently in binding review. - Lots of Renesas cleanups from Morimoto-san and sunxi work from Chen-yu Tsai. - regmap conversions of the remaining AC'97 drivers from Lars-Peter Clausen. - A new version of the topology ABI from Mengdong Lin. - New drivers for Cirrus Logic CS42L42, Qualcomm MSM8916-WCD, and Realtek RT5665.
2016-12-12Merge remote-tracking branches 'asoc/topic/wm9712', 'asoc/topic/wm9713' and ↵Mark Brown12-120/+97
'asoc/topic/zte' into asoc-next
2016-12-12Merge remote-tracking branches 'asoc/topic/wm8580', 'asoc/topic/wm8753', ↵Mark Brown9-128/+157
'asoc/topic/wm8978', 'asoc/topic/wm9081' and 'asoc/topic/wm9705' into asoc-next
2016-12-12Merge remote-tracking branches 'asoc/topic/tlv320aic31xx', ↵Mark Brown9-225/+682
'asoc/topic/topology', 'asoc/topic/uda1380', 'asoc/topic/wm2200' and 'asoc/topic/wm8523' into asoc-next
2016-12-12Merge remote-tracking branches 'asoc/topic/stac9766', 'asoc/topic/sti', ↵Mark Brown21-461/+1737
'asoc/topic/sti-codec', 'asoc/topic/sunxi' and 'asoc/topic/tegra' into asoc-next
2016-12-12Merge remote-tracking branches 'asoc/topic/rt5665', 'asoc/topic/rt5670', ↵Mark Brown20-1206/+709
'asoc/topic/rt5677', 'asoc/topic/samsung' and 'asoc/topic/simple' into asoc-next
2016-12-12Merge remote-tracking branches 'asoc/topic/rt5514', 'asoc/topic/rt5616', ↵Mark Brown14-1148/+8065
'asoc/topic/rt5640', 'asoc/topic/rt5660' and 'asoc/topic/rt5663' into asoc-next
2016-12-12Merge remote-tracking branches 'asoc/topic/rl6231', 'asoc/topic/rl6347a', ↵Mark Brown7-10/+30
'asoc/topic/rockchip', 'asoc/topic/rt286' and 'asoc/topic/rt298' into asoc-next
2016-12-12Merge remote-tracking branches 'asoc/topic/of-graph', 'asoc/topic/pxa', ↵Mark Brown16-84/+1876
'asoc/topic/qcom' and 'asoc/topic/rk808' into asoc-next
2016-12-12Merge remote-tracking branches 'asoc/topic/inntel', 'asoc/topic/input', ↵Mark Brown3-17/+142
'asoc/topic/max98504' and 'asoc/topic/nau8825' into asoc-next
2016-12-12Merge remote-tracking branches 'asoc/topic/dpcm', 'asoc/topic/es8328', ↵Mark Brown7-92/+32
'asoc/topic/extcon' and 'asoc/topic/fsl' into asoc-next
2016-12-12Merge remote-tracking branches 'asoc/topic/cs42l42', 'asoc/topic/cs42l56', ↵Mark Brown7-24/+2777
'asoc/topic/cs42l73' and 'asoc/topic/cs42xx8' into asoc-next
2016-12-12Merge remote-tracking branches 'asoc/topic/compress', 'asoc/topic/const' and ↵Mark Brown23-32/+1653
'asoc/topic/cs35l34' into asoc-next
2016-12-12Merge remote-tracking branches 'asoc/topic/ab8500', 'asoc/topic/arizona', ↵Mark Brown18-271/+1201
'asoc/topic/atmel', 'asoc/topic/bcm' and 'asoc/topic/bitfield' into asoc-next
2016-12-12Merge remote-tracking branch 'asoc/topic/rcar' into asoc-nextMark Brown10-249/+516
2016-12-12Merge remote-tracking branch 'asoc/topic/intel' into asoc-nextMark Brown28-97/+726
2016-12-12Merge remote-tracking branch 'asoc/topic/dmaengine' into asoc-nextMark Brown5-25/+3
2016-12-12Merge remote-tracking branch 'asoc/topic/dapm-pin' into asoc-nextMark Brown1-0/+199
2016-12-12Merge remote-tracking branch 'asoc/topic/dapm' into asoc-nextMark Brown5-35/+127
2016-12-12Merge remote-tracking branch 'asoc/topic/core' into asoc-nextMark Brown1-2/+6
2016-12-12Merge remote-tracking branch 'asoc/topic/component' into asoc-nextMark Brown3-46/+76
2016-12-12Merge remote-tracking branches 'asoc/fix/da7219-pops' and 'asoc/fix/qcom' ↵Mark Brown4-22/+143
into asoc-linus
2016-12-12Merge remote-tracking branch 'asoc/fix/intel' into asoc-linusMark Brown3-3/+11
2016-12-12ASoC: wm_adsp: wm_adsp_buf_alloc should use kfree in error pathRichard Fitzgerald1-1/+1
buf was allocated by kzalloc() so it should be passed to kfree() Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-12ASoC: topology: avoid uninitialized kcontrol_typeArnd Bergmann1-0/+1
When num_kcontrols is zero, widget->dobj.widget.kcontrol_type gets set to an uninitialized local variable: sound/soc/soc-topology.c: In function 'soc_tplg_dapm_widget_create': sound/soc/soc-topology.c:1566:36: error: 'kcontrol_type' may be used uninitialized in this function [-Werror=maybe-uninitialized] I could not figure out which of the valid types would be appropriate here, so this sets it to '0', which is invalid but at least well-defined here. There is probably a better way to address the issue. Fixes: eea3dd4f1247 ("ASoC: topology: Only free TLV for volume mixers of a widget") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-09Merge branch 'for-linus' into for-nextTakashi Iwai4-6/+30
2016-12-09ALSA: usb-audio: Add QuickCam Communicate Deluxe/S7500 to volume_control_quirksCon Kolivas1-1/+2
The Logitech QuickCam Communicate Deluxe/S7500 microphone fails with the following warning. [ 6.778995] usb 2-1.2.2.2: Warning! Unlikely big volume range (=3072), cval->res is probably wrong. [ 6.778996] usb 2-1.2.2.2: [5] FU [Mic Capture Volume] ch = 1, val = 4608/7680/1 Adding it to the list of devices in volume_control_quirks makes it work properly, fixing related typo. Signed-off-by: Con Kolivas <kernel@kolivas.org> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-12-09ALSA: usb-audio: add implicit fb quirk for Axe-Fx IIAlberto Aguirre1-0/+10
The Axe-Fx II implicit feedback end point and the data sync endpoint are in different interface descriptors. Add quirk to ensure a sync endpoint is properly configured. Signed-off-by: Alberto Aguirre <albaguirre@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-12-08ASoC: zte: spdif: correct ZX_SPDIF_CLK_RAT defineShawn Guo1-1/+1
The macro ZX_SPDIF_CLK_RAT should be 2 instead of 4. With this fix, we can get correct audio output on HDMI through SPDIF interface. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Jun Nie <jun.nie@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-08ASoC: zte: spdif and i2s drivers are not zx296702 specificShawn Guo4-10/+10
ZTE ZX SPDIF and I2S drivers can work on not only ZX296702 but also other ZTE ZX family SoCs like ZX296718, which is an arm64 platform. Let's make a few renaming and tweak the Kconfig a bit to get the drivers available for other ZTE ZX platforms. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Reviewed-by: Jun Nie <jun.nie@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-07ASoC: rsnd: setup BRGCKR/BRRA/BRRB when startingKuninori Morimoto1-9/+12
Current rsnd driver setups BRGCKR/BRRA/BRRB when .probe timing. But it breaks sound after Suspend/Resume. These should be setups every start timing. This patch is tested on R-Car Gen3 Salvator-X board Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Gaku Inami <gaku.inami.xw@bp.renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-07ASoC: rsnd: enable/disable ADG when suspend/resume timingKuninori Morimoto3-14/+51
Current rsnd driver enables ADG clock when .probe timing, but it breaks sound after Suspend/Resume. These should be setups every suspend/resume timing too. This patch is tested on R-Car Gen3 Salvator-X board Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Gaku Inami <gaku.inami.xw@bp.renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-07ASoC: rsnd: tidyup ssi->usrcnt counter check in hw_paramsKuninori Morimoto1-3/+6
ssi->usrcnt will be updated on snd_soc_dai_ops::trigger, but snd_pcm_ops::hw_params will be called *before* it. Thus, ssi->usrcnt is still 0 when 1st call. rsnd_ssi_hw_params() needs to check its called count, this means trigger should be if (ssi->usrcnt) instead of if (ssi->usrcnt > 1). Reported-by: Nguyen Viet Dung <nv-dung@jinso.co.jp> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-07ALSA: cs46xx: add a new lineDan Carpenter1-1/+2
We accidentally deleted a newline so now the "nreallocated++;" statement is hanging out way off to the right of the screen. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-12-06dbri: move dereference after check for NULLDan Carpenter1-1/+2
We accidentally introduced a dereference before the NULL check in xmit_descs() as part of silencing a GCC warning. Fixes: 16f46050e709 ("dbri: Fix compiler warning") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-06ASoC: Intel: update bxt_da7219_max98357a to support quad ch dmic captureSathyanarayana Nujella1-3/+17
This patch updates FE channel constraints & BE fixup to support quad channel DMIC capture. DMIC pin's BE fixup is configured based on channel input, i.e. either stereo or quad. Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com> Signed-off-by: Harsha Priya <harshapriya.n@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-06ASoC: nau8825: disable sinc filter for high THD of ADCJohn Hsu2-1/+4
This bit will enable 4th order SINC filter. =1, filter will enable; but it consumes higher power. =0, the sinc filter is disable, and it should always keep 0 value to get high THD. Therefor, disable the filter when codec initiation for better performance when recording. Signed-off-by: John Hsu <KCHSU0@nuvoton.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-06ALSA: usb-audio: more tolerant packetsizeAndreas Pape1-2/+2
since commit 57e6dae1087b ("ALSA: usb-audio: do not trust too-big wMaxPacketSize values"), the expected packetsize is always limited to nominal + 25%. It was discovered, that some devices (Android audio accessory) have a much higher jitter in used packetsizes than 25% which would result in BABBLE condition and dropping of packets. A better solution is so assume the jitter to be the nominal packetsize: -one nearly empty packet followed by a almost 150% sized one. V2: changed to assume max frequency is +50 of nominal packetsize. Signed-off-by: Andreas Pape <apape@de.adit-jv.com> Signed-off-by: Jiada Wang <jiada_wang@mentor.com> Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-12-06ALSA: usb-audio: avoid setting of sample rate multiple times on busDaniel Girnus1-10/+11
Some of userland applications call 'snd_pcm_hw_params()' and 'snd_pcm_hw_prepare()' sequentially, which means 'snd_pcm_hw_prepare()' is called twice and the second 'snd_pcm_hw_prepare()' is called in 'SNDRV_PCM_STATE_PREPARED' state. Some devices are not able to manage this and they will stop playback if the sample rate will be configured several times over USB protocol. V2: updated Changelog Signed-off-by: Daniel Girnus <dgirnus@de.adit-jv.com> Signed-off-by: Jens Lorenz <jlorenz@de.adit-jv.com> Signed-off-by: Jiada Wang <jiada_wang@mentor.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>