aboutsummaryrefslogtreecommitdiffstats
path: root/sound (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-03-28Merge remote-tracking branches 'asoc/topic/max9850', 'asoc/topic/max9860', 'asoc/topic/max9867', 'asoc/topic/max98925' and 'asoc/topic/max98926' into asoc-nextMark Brown9-200/+177
2018-03-28Merge remote-tracking branches 'asoc/topic/max98090', 'asoc/topic/max98095', 'asoc/topic/max98357a', 'asoc/topic/max98371' and 'asoc/topic/max98373' into asoc-nextMark Brown9-471/+454
2018-03-28Merge remote-tracking branches 'asoc/topic/isabelle', 'asoc/topic/jz4740', 'asoc/topic/lm49453', 'asoc/topic/max9759' and 'asoc/topic/max98088' into asoc-nextMark Brown7-254/+446
2018-03-28Merge remote-tracking branches 'asoc/topic/hdmi-codec', 'asoc/topic/ics43432', 'asoc/topic/imx-wm8962' and 'asoc/topic/inno_rk3036' into asoc-nextMark Brown6-387/+54
2018-03-28Merge remote-tracking branches 'asoc/topic/fsl_esai', 'asoc/topic/fsl_ssi', 'asoc/topic/fsl_utils', 'asoc/topic/generic-dmaengine' and 'asoc/topic/gtm601' into asoc-nextMark Brown6-388/+475
2018-03-28Merge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/es7134', 'asoc/topic/es8316', 'asoc/topic/es8328' and 'asoc/topic/fsl' into asoc-nextMark Brown7-151/+127
2018-03-28Merge remote-tracking branches 'asoc/topic/da7219', 'asoc/topic/da732x', 'asoc/topic/da9055' and 'asoc/topic/dmic' into asoc-nextMark Brown5-269/+390
2018-03-28Merge remote-tracking branches 'asoc/topic/cx20442', 'asoc/topic/cygnus', 'asoc/topic/da7210', 'asoc/topic/da7213' and 'asoc/topic/da7218' into asoc-nextMark Brown7-577/+543
2018-03-28Merge remote-tracking branches 'asoc/topic/cs42l73', 'asoc/topic/cs42xx8', 'asoc/topic/cs43130', 'asoc/topic/cs4349' and 'asoc/topic/cs53l30' into asoc-nextMark Brown7-265/+256
2018-03-28Merge remote-tracking branches 'asoc/topic/cs4271', 'asoc/topic/cs42l42', 'asoc/topic/cs42l51', 'asoc/topic/cs42l52' and 'asoc/topic/cs42l56' into asoc-nextMark Brown9-352/+316
2018-03-28Merge remote-tracking branches 'asoc/topic/cs35l33', 'asoc/topic/cs35l34', 'asoc/topic/cs35l35', 'asoc/topic/cs4265' and 'asoc/topic/cs4270' into asoc-nextMark Brown5-336/+303
2018-03-28Merge remote-tracking branches 'asoc/topic/cpcap', 'asoc/topic/cq93vc' and 'asoc/topic/cs35l32' into asoc-nextMark Brown5-39/+1607
2018-03-28Merge remote-tracking branches 'asoc/topic/arizona', 'asoc/topic/atmel', 'asoc/topic/bd28623', 'asoc/topic/blackfin' and 'asoc/topic/bt-sco' into asoc-nextMark Brown41-5944/+811
2018-03-28Merge remote-tracking branches 'asoc/topic/ak5386', 'asoc/topic/ak5558', 'asoc/topic/alc5623', 'asoc/topic/alc5632' and 'asoc/topic/amd' into asoc-nextMark Brown12-272/+1022
2018-03-28Merge remote-tracking branches 'asoc/topic/ak4554', 'asoc/topic/ak4613', 'asoc/topic/ak4641', 'asoc/topic/ak4642' and 'asoc/topic/ak4671' into asoc-nextMark Brown5-188/+173
2018-03-28Merge remote-tracking branches 'asoc/topic/adav80x', 'asoc/topic/ads117x', 'asoc/topic/ak4104', 'asoc/topic/ak4458' and 'asoc/topic/ak4535' into asoc-nextMark Brown10-175/+893
2018-03-28Merge remote-tracking branches 'asoc/topic/ad73311', 'asoc/topic/adau1373', 'asoc/topic/adau17x1', 'asoc/topic/adau1977' and 'asoc/topic/adau7002' into asoc-nextMark Brown10-261/+243
2018-03-28Merge remote-tracking branches 'asoc/topic/88pm860x', 'asoc/topic/ab8500', 'asoc/topic/ac97', 'asoc/topic/ad1836' and 'asoc/topic/ad193x' into asoc-nextMark Brown17-701/+642
2018-03-28Merge remote-tracking branch 'asoc/topic/samsung' into asoc-nextMark Brown8-130/+393
2018-03-28Merge remote-tracking branch 'asoc/topic/rt5665' into asoc-nextMark Brown2-184/+169
2018-03-28Merge remote-tracking branch 'asoc/topic/pcm512x' into asoc-nextMark Brown1-82/+80
2018-03-28Merge remote-tracking branch 'asoc/topic/pcm5102a' into asoc-nextMark Brown1-9/+7
2018-03-28Merge remote-tracking branch 'asoc/topic/pcm3168a' into asoc-nextMark Brown1-26/+25
2018-03-28Merge remote-tracking branch 'asoc/topic/pcm3008' into asoc-nextMark Brown1-21/+15
2018-03-28Merge remote-tracking branch 'asoc/topic/pcm186x' into asoc-nextMark Brown4-92/+68
2018-03-28Merge remote-tracking branch 'asoc/topic/pcm179x' into asoc-nextMark Brown4-38/+20
2018-03-28Merge remote-tracking branch 'asoc/topic/pcm1789' into asoc-nextMark Brown5-0/+369
2018-03-28Merge remote-tracking branch 'asoc/topic/pcm1681' into asoc-nextMark Brown1-33/+29
2018-03-28Merge remote-tracking branch 'asoc/topic/pcm' into asoc-nextMark Brown1-0/+11
2018-03-28Merge remote-tracking branch 'asoc/topic/intel' into asoc-nextMark Brown48-1486/+3021
2018-03-28Merge remote-tracking branch 'asoc/topic/dapm' into asoc-nextMark Brown1-0/+42
2018-03-28Merge remote-tracking branch 'asoc/topic/core' into asoc-nextMark Brown1-55/+21
2018-03-28Merge remote-tracking branch 'asoc/topic/component-platform' into asoc-nextMark Brown62-601/+529
2018-03-28Merge remote-tracking branches 'asoc/fix/mtk', 'asoc/fix/rt5659', 'asoc/fix/ssm2602' and 'asoc/fix/topology' into asoc-linusMark Brown5-15/+35
2018-03-28Merge remote-tracking branch 'asoc/fix/component' into asoc-linusMark Brown1-5/+2
2018-03-28ASoC: tscs42xx: Remove owner assignment from i2c_driverFabio Estevam1-1/+0
Structure i2c_driver does not need to set the owner field, as this will be populated by the driver core. Generated by scripts/coccinelle/api/platform_no_drv_owner.cocci. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-28ASoC: cpcap: replace codec to componentKuninori Morimoto1-79/+73
Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-28ASoC: Intel: bytcr_rt5651: don't use codec anymoreKuninori Morimoto1-2/+2
commit aeec6cc08215 ("ASoC: Intel: bytcr_rt5651: Configure PLL1 before using it") is using codec->dev, but codec is replaced to component. Let's use component Fixes: aeec6cc08215 ("ASoC: Intel: bytcr_rt5651: Configure PLL1 before using it") Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-28ASoC: amd: don't use codec anymoreKuninori Morimoto1-2/+1
commit c88d31153356 ("ASoC: amd: Enable da7219 master clock using common clock framework") is using rtd->codec, but codec is replaced to component. Let's use component Fixes: c88d31153356 ("ASoC: amd: Enable da7219 master clock using common clock framework") Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-27ALSA: usb-audio: fix memory leak on cvalColin Ian King1-1/+3
With the current exit return path of the ctl_info allocation failure cval is not being freed resulting in a memory leak. Fix this by kfree'ing it on the return. Detected by CoverityScan, CID#1466878 ("Resource Leak") Fixes: 21e9b3e931f7 ("ALSA: usb-audio: fix uac control query argument") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-03-27ALSA: pcm: Fix mutex unbalance in OSS emulation ioctlsTakashi Iwai1-25/+42
The previous fix 40cab6e88cb0 ("ALSA: pcm: Return -EBUSY for OSS ioctls changing busy streams") introduced some mutex unbalance; the check of runtime->oss.rw_ref was inserted in a wrong place after the mutex lock. This patch fixes the inconsistency by rewriting with the helper functions to lock/unlock parameters with the stream check. Fixes: 40cab6e88cb0 ("ALSA: pcm: Return -EBUSY for OSS ioctls changing busy streams") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-03-27ALSA: pcm: potential uninitialized return valuesDan Carpenter1-2/+2
Smatch complains that "tmp" can be uninitialized if we do a zero size write. Fixes: 02a5d6925cd3 ("ALSA: pcm: Avoid potential races between OSS ioctls and read/write") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-03-27ASoC: topology: Fix kcontrol name string handlingLiam Girdwood1-5/+18
Fix the topology kcontrol string handling so that string pointer references are strdup()ed instead of being copied. This fixes issues with kcontrol templates on the stack or ones that are freed. Remember and free the strings too when topology is unloaded. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2018-03-27ALSA: aloop: Mark paused device as inactiveRobert Rosengren1-3/+9
Show paused ALSA aloop device as inactive, i.e. the control "PCM Slave Active" set as false. Notification sent upon state change. This makes it possible for client capturing from aloop device to know if data is expected. Without it the client expects data even if playback is paused. Signed-off-by: Robert Rosengren <robert.rosengren@axis.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-03-26ALSA: pcm: Use dma_bytes as size parameter in dma_mmap_coherent()Stefan Roese1-1/+1
When trying to use the driver (e.g. aplay *.wav), the 4MiB DMA buffer will get mmapp'ed in 16KiB chunks. But this fails with the 2nd 16KiB area, as the page offset is outside of the VMA range (size), which is currently used as size parameter in snd_pcm_lib_default_mmap(). By using the DMA buffer size (dma_bytes) instead, the complete DMA buffer can be mmapp'ed and the issue is fixed. This issue was detected on an ARM platform (TI AM57xx) using the RME HDSP MADI PCIe soundcard. Fixes: 657b1989dacf ("ALSA: pcm - Use dma_mmap_coherent() if available") Signed-off-by: Stefan Roese <sr@denx.de> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-03-26treewide: Align function definition open/close bracesJoe Perches1-1/+1
Some functions definitions have either the initial open brace and/or the closing brace outside of column 1. Move those braces to column 1. This allows various function analyzers like gnu complexity to work properly for these modified functions. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Paul Moore <paul@paul-moore.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Martin K. Petersen <martin.petersen@oracle.com> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Acked-by: Martin K. Petersen <martin.petersen@oracle.com> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-03-24ALSA: usb-audio: update clock valid controlAndrew Chant1-14/+19
Make the "clock valid" control a global control instead of a mixer so that it doesn't appear in mixer applications. Additionally, remove the check for writeability prohibited by spec, and Use common code to read the control value. Tested with a UAC2 Audio device that presents a clock validity control. The control still shows up in /proc usbmixer but not in alsamixer. Signed-off-by: Andrew Chant <achant@google.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-03-24ALSA: usb-audio: UAC2 jack detectionAndrew Chant1-1/+97
This implements UAC2 jack detection support, presenting jack status as a boolean read-only mono mixer. The presence of any channel in the UAC2_TE_CONNECTOR control for a terminal will result in the mixer saying the jack is connected. Mixer naming follows the convention in sound/core/ctljack.c, terminating the mixer with " Jack". For additional clues as to which jack is being presented, the name is prefixed with " - Input Jack" or " - Output Jack" depending on if it's an input or output terminal. This is required because terminal names are ambiguous between inputs and outputs and often duplicated - Bidirectional terminal types (0x400 -> 0x4FF) "... may be used separately for input only or output only. These types require two Terminal descriptors. Both have the same type." (quote from "USB Device Class Definition for Terminal Types") Since bidirectional terminal types are common for headphone adapters, this distinguishes between two otherwise identically-named jack controls. Tested with a UAC2 audio device with connector control capability. Signed-off-by: Andrew Chant <achant@google.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-03-23ALSA: pcm: Return -EBUSY for OSS ioctls changing busy streamsTakashi Iwai1-9/+27
OSS PCM stream management isn't modal but it allows ioctls issued at any time for changing the parameters. In the previous hardening patch ("ALSA: pcm: Avoid potential races between OSS ioctls and read/write"), we covered these races and prevent the corruption by protecting the concurrent accesses via params_lock mutex. However, this means that some ioctls that try to change the stream parameter (e.g. channels or format) would be blocked until the read/write finishes, and it may take really long. Basically changing the parameter while reading/writing is an invalid operation, hence it's even more user-friendly from the API POV if it returns -EBUSY in such a situation. This patch adds such checks in the relevant ioctls with the addition of read/write access refcount. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-03-23ALSA: pcm: Avoid potential races between OSS ioctls and read/writeTakashi Iwai1-28/+106
Although we apply the params_lock mutex to the whole read and write operations as well as snd_pcm_oss_change_params(), we may still face some races. First off, the params_lock is taken inside the read and write loop. This is intentional for avoiding the too long locking, but it allows the in-between parameter change, which might lead to invalid pointers. We check the readiness of the stream and set up via snd_pcm_oss_make_ready() at the beginning of read and write, but it's called only once, by assuming that it remains ready in the rest. Second, many ioctls that may change the actual parameters (i.e. setting runtime->oss.params=1) aren't protected, hence they can be processed in a half-baked state. This patch is an attempt to plug these holes. The stream readiness check is moved inside the read/write inner loop, so that the stream is always set up in a proper state before further processing. Also, each ioctl that may change the parameter is wrapped with the params_lock for avoiding the races. The issues were triggered by syzkaller in a few different scenarios, particularly the one below appearing as GPF in loopback_pos_update. Reported-by: syzbot+c4227aec125487ec3efa@syzkaller.appspotmail.com Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>