aboutsummaryrefslogtreecommitdiffstats
path: root/sound (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-08-28ASoC: blackfin: Convert to devm_snd_soc_register_platformAxel Lin2-16/+4
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-28ASoC: au1x: Convert to devm_snd_soc_register_platformAxel Lin2-18/+4
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-28ASoC: qcom: Constify asoc_qcom_lpass_cpu_dai_opsAxel Lin2-2/+2
asoc_qcom_lpass_cpu_dai_ops is exported and used by multiple drivers, make it const to prevent modifying it at run time. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-28ASoC: sh: ssi: Convert to devm_snd_soc_register_componentAxel Lin1-9/+3
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-28ASoC: pxa2xx-i2s: Convert to devm_snd_soc_register_componentAxel Lin1-9/+2
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-28ASoC: pxa-ssp: Convert to devm_snd_soc_register_componentAxel Lin1-9/+2
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-28ASoC: ics43432: Fix build errorsRicard Wanderlof1-1/+1
Fix build errors Signed-off-by: Ricard Wanderlof <ricardw@axis.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-28ASoC: ics43432: Fix module licenseAxel Lin1-2/+2
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-28ASoC: ics43432: fix platform_no_drv_owner.cocci warningskbuild test robot1-1/+0
sound/soc/codecs/ics43432.c:66:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci CC: Ricard Wanderlof <ricard.wanderlof@axis.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-28ALSA: usb-audio: correct the value cache check.Yao-Wen Mao1-1/+1
The check of cval->cached should be zero-based (including master channel). Signed-off-by: Yao-Wen Mao <yaowen@google.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-27Merge branch 'topic/ics43432' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-gtm601Mark Brown3-0/+83
2015-08-27Merge branch 'topic/gtm601' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-ics43432Mark Brown3-0/+101
2015-08-27ASoC: bcm2835-i2s: Fix module autoload for OF platform driversLuis de Bethencourt1-0/+2
These platform drivers have a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <luis@debethencourt.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-27ASoC: rt5645: Prevent the pop sound of the headphone while rebooting or shutdowningOder Chiou2-11/+25
Add i2c shutdown function to prevent the pop sound of the headphone while the system is rebooting or shutdowning. It de-initials the jack detection function, and it cannot be turned off in _BIAS_OFF. If we don't de-initial it, the pop sound will be heard in the situation of powering off. And replace the related register settings from magic number to meaningful defined name. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-27ASoC: ics43432: Add codec driver for InvenSense ICS-43432Ricard Wanderlof3-0/+83
Add support for the InvenSense ICS-43432 I2S MEMS microphone. This is a non-software-configurable MEMS microphone with I2S output. Tested on a setup with a single ICS-43432 (the device itself supports stereo operation using a hardware pin controlling left vs. right channel output). Signed-off-by: Ricard Wanderlof <ricardw@axis.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-26ASoC: tegra: Use devm_ioremap_resource instead of open codeAxel Lin5-111/+23
Use devm_ioremap_resource() to simplify the code. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-26ASoC: omap-hdmi-audio: Set buffer bytes step constraint to 128Jyri Sarha1-1/+9
Set buffer bytes step constraint to 128. A matching constraint has already been set to period size. This helps PCM setup to tolerate ALSA clients that set the PCM hw params in unusual order. Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-26ALSA: usb-audio: Handle normal and auto-suspend equallyTakashi Iwai1-20/+10
In theory, the device may get suspended even at runtime PM suspend. Currently we don't save the mixer state for autopm, and it may bring inconsistency. This patch removes the special handling for autosuspend. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-26ALSA: usb-audio: Replace probing flag with active refcountTakashi Iwai2-9/+4
We can use active refcount for preventing autopm during probe. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-26ALSA: usb-audio: Avoid nested autoresume callsTakashi Iwai7-143/+145
After the recent fix of runtime PM for USB-audio driver, we got a lockdep warning like: ============================================= [ INFO: possible recursive locking detected ] 4.2.0-rc8+ #61 Not tainted --------------------------------------------- pulseaudio/980 is trying to acquire lock: (&chip->shutdown_rwsem){.+.+.+}, at: [<ffffffffa0355dac>] snd_usb_autoresume+0x1d/0x52 [snd_usb_audio] but task is already holding lock: (&chip->shutdown_rwsem){.+.+.+}, at: [<ffffffffa0355dac>] snd_usb_autoresume+0x1d/0x52 [snd_usb_audio] This comes from snd_usb_autoresume() invoking down_read() and it's used in a nested way. Although it's basically safe, per se (as these are read locks), it's better to reduce such spurious warnings. The read lock is needed to guarantee the execution of "shutdown" (cleanup at disconnection) task after all concurrent tasks are finished. This can be implemented in another better way. Also, the current check of chip->in_pm isn't good enough for protecting the racy execution of multiple auto-resumes. This patch rewrites the logic of snd_usb_autoresume() & co; namely, - The recursive call of autopm is avoided by the new refcount, chip->active. The chip->in_pm flag is removed accordingly. - Instead of rwsem, another refcount, chip->usage_count, is introduced for tracking the period to delay the shutdown procedure. At the last clear of this refcount, wake_up() to the shutdown waiter is called. - The shutdown flag is replaced with shutdown atomic count; this is for reducing the lock. - Two new helpers are introduced to simplify the management of these refcounts; snd_usb_lock_shutdown() increases the usage_count, checks the shutdown state, and does autoresume. snd_usb_unlock_shutdown() does the opposite. Most of mixer and other codes just need this, and simply returns an error if it receives an error from lock. Fixes: 9003ebb13f61 ('ALSA: usb-audio: Fix runtime PM unbalance') Reported-and-tested-by: Alexnader Kuleshov <kuleshovmail@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-26ALSA: hda - Remove superfluous pcm NULL checkTakashi Iwai1-2/+1
The variable pcm can be never NULL since it was rewritten with list_for_each_entry(). Suggested-by: Markus Osterhoff <linux-kernel@k-raum.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-26ASoC: rockchip: fix platform_no_drv_owner.cocci warningskbuild test robot1-1/+0
sound/soc/rockchip/rockchip_rt5645.c:214:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-26ASoC: rockchip: fix platform_no_drv_owner.cocci warningskbuild test robot1-1/+0
sound/soc/rockchip/rockchip_max98090.c:225:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-26ASoC: rockchip: fix a misjudgement by returnXing Zheng1-1/+1
Being careless, judge the return value of snd_soc_card_jack_new is opposite, so it should be fixed. Signed-off-by: Xing Zheng <zhengxing@rock-chips.com> Reviewed-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-26ALSA: hda - Fix widget sysfs tree corruption after refreshTakashi Iwai2-6/+11
When snd_hdac_refresh_widget_sysfs() is called before the first hda_widget_sysfs_init(), the next call overrides and eventually fails. This results in unexpected Oops, something like: BUG: unable to handle kernel NULL pointer dereference at 00000000000000c8 IP: [<ffffffff8180e2a3>] hdmi_chmap_ctl_info+0x23/0x40 The fix is to add a check of the existing sysfs tree. Also, for more safety, this patch adds the checks of device_is_registered() in snd-hdac_refresh_wdiget_sysfs(), too. Fixes: fa4f18b4f402 ('ALSA: hda - Refresh widgets sysfs at probing Haswell+ HDMI codecs') Bugizlla: https://bugzilla.kernel.org/show_bug.cgi?id=103431 Reported-by: Andreas Reis <andreas.reis@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-25ASoC: arizona: Poll for FLL clock OK rather than use interruptsCharles Keepax2-29/+19
The extcon driver takes the DAPM mutex from within the interrupt thread in several places, which makes it possible to get into a situation where the interrupt thread is blocked waiting on the DAPM mutex whilst a DAPM sequence is running which is attempting to configure the FLL. In this case the FLL completion can't be completed as as the IRQ handler is ONE_SHOT, which cause the FLL lock to use the full time out (250mS) and report that the process timed out. It is not really practical to make the extcon driver not take the DAPM mutex from within the interrupt thread, at least not without extensive modification. So this patch fixes the issue by switching the wait for the FLL lock to polling. A few fast polls are done first as the FLL should lock quickly for a good quality reference clock, (indeed it hits on the first poll on my system) and it will poll every 20mS after that until it times out. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2015-08-25ASoC: rt5645: Add struct dmi_system_id "Google Celes" for chrome platformOder Chiou1-0/+7
Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2015-08-25ASoC: rt5645: Add the register RT5645_CHARGE_PUMP to readable check functionOder Chiou1-0/+1
Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-25ASoC: rt5645: Remove the incorrect setting of the JD modeOder Chiou1-2/+0
The patch removes the incorrect setting of the JD mode. It will cause pop sound in the booting time. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-25ASoC: rt5645: Modify the jack detection function to prevent the pop sound while the jack plug inOder Chiou1-2/+11
The patch corrects the sequence of the jack detection. It will prevent the pop sound while the jack plug in. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-25ASoC: rt5645: Modify the headphone depop and calibration function to prevent the pop sound in the booting timeOder Chiou1-79/+32
Remove the original calibration function and modify the depop and calibration function to prevent the pop sound in the booting time. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-25ASoC: rt5677: Allow arbitrary block read/write via SPIBen Zhang3-67/+178
Added rt5677_spi_read() and refactored rt5677_spi_write() so that an arbitrary block in the DSP address space can be read/written via SPI. For example, this allows us to load an ELF DSP firmware with sparse sections, and stream audio samples from DSP ring buffer. Signed-off-by: Ben Zhang <benzh@chromium.org> Acked-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-25ALSA: ppc: Add missing inclusion of linux/module.hTakashi Iwai1-0/+1
Otherwise it triggers a compile warning like: sound/ppc/keywest.c:104:1: warning: data definition has no type or storage class sound/ppc/keywest.c:104:1: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE' [-Werror=implicit-int] Fixes: a2bc2af66a5b ('ALSA: ppc: keywest: Export I2C module alias information') Reported-by: kbuild test robot <fengguang.wu@intel.com> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-25ALSA: ppc: keywest: Export I2C module alias informationJavier Martinez Canillas1-0/+1
The I2C core always reports the MODALIAS uevent as "i2c:<client name" regardless if the driver was matched using the I2C id_table or the of_match_table. So the driver needs to export the I2C table and this be built into the module or udev won't have the necessary information to auto load the correct module when the device is added. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-25ASoC: tegra: Fix unused variable 'spdif' warningAxel Lin1-2/+0
Fix below build warning: CC [M] sound/soc/tegra/tegra20_spdif.o sound/soc/tegra/tegra20_spdif.c: In function 'tegra20_spdif_platform_remove': sound/soc/tegra/tegra20_spdif.c:361:24: warning: unused variable 'spdif' [-Wunused-variable] Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-25ASoC: SPEAr: Convert to use devm_ioremap_resourceAxel Lin1-15/+5
Use devm_ioremap_resource() instead of open code. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-25ASoC: omap-mcbsp: Convert to use devm_ioremap_resourceAxel Lin1-15/+5
Use devm_ioremap_resource() instead of open code. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-25ASoC: davinci: Convert to use devm_ioremap_resourceAxel Lin2-33/+10
Use devm_ioremap_resource() instead of open code. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-25ASoC: cs4349: fix platform_no_drv_owner.cocci warningskbuild test robot1-1/+0
sound/soc/codecs/cs4349.c:389:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci CC: Tim Howe <tim.howe@cirrus.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-25ALSA: hda - Refresh sysfs at snd_hda_codec_update_widgets()Takashi Iwai2-2/+1
In the commit [fa4f18b4f402: ALSA: hda - Refresh widgets sysfs at probing Haswell+ HDMI codecs], snd_hdac_refresh_widget_sysfs() is explicitly called in the codec driver. But this results in refreshing twice, as snd_hdac_refresh_widget_sysfs() itself calls snd_hdac_refresh_widgets() function. Instead, we can replace the call in snd_hda_codec_update_widgets() with snd_hdac_refresh_widget_sysfs(). This also fixes the missing sysfs update for ca0132, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-25Merge branch 'for-linus' into for-nextTakashi Iwai2-8/+5
2015-08-25ALSA: hda - Fix path power activationTakashi Iwai1-5/+1
The widget power-saving code tries to turn up/down the power of each widget in the I/O paths that are modified at each jack plug/unplug. The recent report revealed that the power activation leaves some widgets unpowered after plugging. This is because snd_hda_activate_path() turns on path->active flag at the end of the function while the path power management is done before that. Then it's regarded as if nothing is active, and the driver turns off the power. The fix is simply to set the flag at the beginning of the function, before trying to power up. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=102521 Cc: <stable@vger.kernel.org> [v4.1+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-25ALSA: hda - Check all inputs for is_active_nid_for_any()Takashi Iwai1-2/+3
The is_active_nid_for_any() function in the generic parser is supposed to check all connections from/to the given widget, but the current code checks only the first input connection (index = 0). This patch corrects the code to check all inputs by passing -1 to index argument. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=102521 Cc: <stable@vger.kernel.org> [v4.1+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-24ALSA: hda: fix possible NULL dereferenceMarkus Osterhoff1-1/+1
After a for-loop was replaced by list_for_each_entry, see Commit bbbc7e8502c9 ("ALSA: hda - Allocate hda_pcm objects dynamically"), Commit 751e2216899c ("ALSA: hda: fix possible null dereference"), a possible NULL pointer dereference has been introduced; this patch adds the NULL check on pcm->pcm, while leaving a potentially superfluous check on pcm itself untouched. Signed-off-by: Markus Osterhoff <linux-kernel@k-raum.org> Cc: <stable@vger.kernel.org> #v4.1+ Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-23ALSA: hdac: Add snd_hdac_get_hdac_stream()Jeeja KP1-0/+22
Add a helper to find the stream using stream tag and direction. This is useful for drivers to query stream based on stream tag and direction, fox example while downloading FW thru DSP loader code Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-23ALSA: hdac: fix the spbmaxfifo APIVinod Koul1-3/+3
spbmaxfifo API is actually a query function not a set function so name it snd_hdac_ext_stream_get_spbmaxfifo() Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-23ALSA: hdac: Fix size allocation for ext device allocationVinod Koul1-1/+1
While creating hdac_ext_device, we used hdev for sizeof insteadof edev, which resulted in eventual crash of the system Fix the size here Fixes: a512f5611646 ('ALSA: hdac: add hdac extended device') Reported-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-22ALSA: hdsp: silence a sprinft() overflow warningDan Carpenter1-2/+2
card->shortname is a 32 char string so the sprintf() can theoretically overflow. snd_rawmidi_new() can accept strings up to 64 bytes long. I have made the temporay buf[] array 40 bytes long and changed the sprintf() to snprintf(). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-21ASoC: topology: Add support for TLV bytes controlsMengdong Lin1-3/+39
Allow vendor drivers to define bespoke bytes ext handlers and IDs for TLV bytes controls. And the topology core will bind these handlers by matching IDs defined by the vendor driver and user space topology data file. And TLV callback binding is moved to soc_tplg_kcontrol_bind_io(). This function process all handler binding now. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-21ASoC: topology: Reduce arguments of soc_tplg_kcontrol_bind_io()Mengdong Lin1-24/+21
Add the pointer of struct soc_tplg as one argument, so no need to pass standard/vendor specific kcontrol handlers and their count. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>