summaryrefslogtreecommitdiffstats
path: root/sound
AgeCommit message (Collapse)AuthorFilesLines
2016-11-30ASoC: intel: Fix crash at suspend/resume without card registrationTakashi Iwai1-0/+6
When ASoC Intel SST Medfield driver is probed but without codec / card assigned, it causes an Oops and freezes the kernel at suspend/resume, PM: Suspending system (freeze) Suspending console(s) (use no_console_suspend to debug) BUG: unable to handle kernel NULL pointer dereference at 0000000000000018 IP: [<ffffffffc09d9409>] sst_soc_prepare+0x19/0xa0 [snd_soc_sst_mfld_platform] Oops: 0000 [#1] PREEMPT SMP CPU: 0 PID: 1552 Comm: systemd-sleep Tainted: G W 4.9.0-rc6-1.g5f5c2ad-default #1 Call Trace: [<ffffffffb45318f9>] dpm_prepare+0x209/0x460 [<ffffffffb4531b61>] dpm_suspend_start+0x11/0x60 [<ffffffffb40d3cc2>] suspend_devices_and_enter+0xb2/0x710 [<ffffffffb40d462e>] pm_suspend+0x30e/0x390 [<ffffffffb40d2eba>] state_store+0x8a/0x90 [<ffffffffb43c670f>] kobj_attr_store+0xf/0x20 [<ffffffffb42b0d97>] sysfs_kf_write+0x37/0x40 [<ffffffffb42b02bc>] kernfs_fop_write+0x11c/0x1b0 [<ffffffffb422be68>] __vfs_write+0x28/0x140 [<ffffffffb43728a8>] ? apparmor_file_permission+0x18/0x20 [<ffffffffb433b2ab>] ? security_file_permission+0x3b/0xc0 [<ffffffffb422d095>] vfs_write+0xb5/0x1a0 [<ffffffffb422e3d6>] SyS_write+0x46/0xa0 [<ffffffffb4719fbb>] entry_SYSCALL_64_fastpath+0x1e/0xad Add proper NULL checks in the PM code of mdfld driver. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: <stable@vger.kernel.org>
2016-11-30ASoC: nau8825: lock longer to avoid playback pop upon resumeJohn Hsu1-6/+6
There is an issue about pop noise in NAU88L25 as follows. Issue 54078: Chell_headphone pop back from S3 (1)Play directly to hw, bypassing CRAS: sox -b 16 -n -t alsa hw:0,0 synth sine 200 sine 200 (2)Close lid or powerd_dbus_suspend, then press a key to resume. (3)no audio after resume (4)Audio will be back after close then reopen the pcm device. After verification, we find one defect is that semaphone lock is not long enough and expired. In this situation, the playback comes back early but pauses a while to wait for the crosstalk detection done. But the detection spends too much time and lock time is up. Therefore, the playback and jack detection sequence interfere to each other. That breaks sequence and makes noise. The driver extends the lock time for the issue. Signed-off-by: John Hsu <KCHSU0@nuvoton.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-30ASoC: intel: Replace kthread with workTakashi Iwai7-48/+24
The usage pattern of kthread worker in Intel SST drivers can be replaced gracefully with the normal workqueue, which is more light- weight and easier to manage in general. Let's do it. While in the replacement, move the schedule_work() call inside the spinlock for excluding the race, too. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Vinod Koul <vinod.koul@intel.com> Tested-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-30ASoC: arizona: Use component pin control functionsRichard Fitzgerald6-9/+18
We need to modify the state of some of our own pins and are currently not taking account that the pin name may have a name_prefix applied to it. Replace the snd_soc_dapm_x_pin functions with the equivalent snd_soc_component_x_pin functions so that any name_prefix will be handled automatically. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-30Merge branch 'topic/dapm-pin' of ↵Mark Brown1-0/+199
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-arizona
2016-11-30ASoC: core: Add component pin control functionsRichard Fitzgerald1-0/+199
It's often the case that a codec driver will need to control its own pins. However, if a name_prefix has been applied to this codec it must be included in the name passed to any of the snd_soc_dapm_x_pin() functions. The behaviour of the existing pin control functions is reasonable, since you may want to search for a fully-specified name within the scope of an entire card. This means that we can't apply the prefix in these functions because it will break card-scope searches. Constructing a prefixed string "manually" in codec drivers leads to a lot of repetition of the same code. To make this tidier in codec drivers this patch adds a new set of equivalent functions that take a struct snd_soc_component instead of a dapm context and automatically add the component's name_prefix to the given name. This makes it a simple change in codec drivers to be prefix-safe. The new functions are not quite trivial enough to be inlines and the compiler won't be able to compile-away any part of them. Although it looks somewhat inefficient to have to allocate a temporary buffer and combine strings, the current design of the widget list doesn't lend itself to a more optimized implementation - it's a single list of all widgets on a card and is searched linearly for a matching string. As pin state changes are generally low-frequency events it's unlikely to be a significant issue - at least not enough to rewrite the widget list handling just for this. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-30ASoC: rt5670: Add missing 10EC5072 ACPI IDTakashi Iwai1-0/+1
rt5670 driver supports also RT5672 codec, but its ACPI ID is missing. This was found on Dell Wyse 3040 box. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-30ASoC: rt5670: Enable Braswell platform workaround for Dell Wyse 3040Takashi Iwai1-0/+7
Dell Wyse 3040 requires the platform workaround for enabling dmic and jack detection as defined for Braswell CRB. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-30ASoC: Intel: Add missing 10EC5672 ACPI ID matching for Cherry TrailTakashi Iwai1-0/+2
Add the missing ACPI ID 10EC5672 for Cherry Trail, which bounds with cht-bsw-rt5672 driver. This combination was found on Dell Wyse 3040. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-30Merge tag 'drm-qemu-20161121' of git://git.kraxel.org/linux into drm-nextDave Airlie24-188/+196
drm/virtio: fix busid in a different way, allocate more vbufs. drm/qxl: various bugfixes and cleanups, * tag 'drm-qemu-20161121' of git://git.kraxel.org/linux: (224 commits) drm/virtio: allocate some extra bufs qxl: Allow resolution which are not multiple of 8 qxl: Don't notify userspace when monitors config is unchanged qxl: Remove qxl_bo_init() return value qxl: Call qxl_gem_{init, fini} qxl: Add missing '\n' to qxl_io_log() call qxl: Remove unused prototype qxl: Mark some internal functions as static Revert "drm: virtio: reinstate drm_virtio_set_busid()" drm/virtio: fix busid regression drm: re-export drm_dev_set_unique Linux 4.9-rc5 gp8psk: Fix DVB frontend attach gp8psk: fix gp8psk_usb_in_op() logic dvb-usb: move data_mutex to struct dvb_usb_device iio: maxim_thermocouple: detect invalid storage size in read() aoe: fix crash in page count manipulation lightnvm: invalid offset calculation for lba_shift Kbuild: enable -Wmaybe-uninitialized warnings by default pcmcia: fix return value of soc_pcmcia_regulator_set ...
2016-11-29ALSA: usb-audio: Fix bogus error return in snd_usb_create_stream()Takashi Iwai1-1/+0
The function returns -EINVAL even if it builds the stream properly. The bogus error code sneaked in during the code refactoring, but it wasn't noticed until now since the returned error code itself is ignored in anyway. Kill it here, but there is no behavior change by this patch, obviously. Fixes: e5779998bf8b ('ALSA: usb-audio: refactor code') Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-29ALSA: line6: Claim pod x3 usb data interfaceAndrej Krutak2-4/+31
Userspace apps have to claim USB interfaces before using endpoints in them (drivers/usb/core/devio.c:checkintf()). It's a lock mechanism so that two "drivers" don't steal data from each other. Kernel drivers don't have to claim interfaces to work - but they should, to lock out userspace. While there, fix line6_properties struct to match checkpatch.pl. Signed-off-by: Andrej Krutak <dev@andree.sk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-29ALSA: echoaudio: Fix improper return value in function load_asicPan Bian1-1/+1
When the second call to load_asic_generic() fails in function load_asic(), "false" is returned. The real value of "false" is 0, which indicates success in the context. As a result, the execution status and the return value may be inconsistent. This patch fixes the bug. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188761 Signed-off-by: Pan Bian <bianpan2016@163.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-29ASoC: rt298: disable IRQ when jack is NULLBard Liao1-2/+22
Disable IRQ when jack is NULL in rt298_mic_detect. So machine driver can use it in suspend/resume. Signed-off-by: Bard Liao <bardliao@realtek.com> Reviewed-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-29ASoC: Intel: atom: Make some messages to debug levelTakashi Iwai2-3/+3
Intel sst driver spews lots of kernel messages in INFO level; typically, it gives a kernel message at each time it allocates or frees a stream, or at each time when a stream is started or stopped. This will piles up quickly, and it's almost useless for normal users, so let's hide them to KERN_DEBUG level. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-29ASoC: wm_adsp: Remove redundant extern declarationsCharles Keepax1-13/+12
Functions are given external linkage by default making the extern's unnecessary, as such remove them. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-29ASoC: arizona: Remove redundant extern declarationsCharles Keepax1-42/+38
Functions are given external linkage by default making the extern's unnecessary, as such remove them. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-29ALSA: hda/realtek - Add support for headset MIC for ALC622Kailang Yang1-0/+41
Add headset MIC support for ALC622 of USI platform. It only support headset of iphone type. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-29Merge branch 'for-linus' into for-nextTakashi Iwai5-5/+9
2016-11-28Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparcLinus Torvalds1-10/+16
Pull sparc fixes from David Miller: "Two ugly build warning fixes" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: dbri: Fix compiler warning qlogicpti: Fix compiler warnings
2016-11-28dbri: Fix compiler warningTushar Dave1-10/+16
dbri uses 'u32' for dma handle while invoking kernel DMA APIs, instead of using dma_addr_t. This hasn't caused any 'incompatible pointer type' warning on SPARC because until now dma_addr_t is of type u32. However, recent changes in SPARC ATU (iommu) enabled 64bit DMA and therefore dma_addr_t became of type u64. This makes 'incompatible pointer type' warnings inevitable. e.g. sound/sparc/dbri.c: In function ‘snd_dbri_create’: sound/sparc/dbri.c:2538: warning: passing argument 3 of ‘dma_zalloc_coherent’ from incompatible pointer type ./include/linux/dma-mapping.h:608: note: expected ‘dma_addr_t *’ but argument is of type ‘u32 *’ For the record, dbri(sbus) driver never executes on sun4v. Therefore even though 64bit DMA is enabled on SPARC, dbri continues to use legacy iommu that guarantees DMA address is always in 32bit range. This patch resolves above compiler warning. Signed-off-by: Tushar Dave <tushar.n.dave@oracle.com> Reviewed-by: thomas tai <thomas.tai@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-11-25ALSA: hda/ca0132 - Add quirk for Alienware 15 R2 2016Sven Hahne1-0/+1
I'm using an Alienware 15 R2 and had to use the alienware quirks to get my headphone output working. I fixed it by adding, SND_PCI_QUIRK(0x1028, 0x0708, "Alienware 15 R2 2016", QUIRK_ALIENWARE) to the patch. Signed-off-by: Sven Hahne <hahne@zeitkunst.eu> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-25ASoC: Intel: Skylake: Removed the unused I2S blob structureGuruprasadX Pawse1-17/+0
Now that I2S conflig blob structure is no longer in use, remove it. Signed-off-by: GuruprasadX Pawse <guruprasadx.pawse@intel.com> Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-25ASoC: Intel: Skylake: Don't use dma I2S config structure in kernelGuruprasadX Pawse1-6/+3
I2S blob config structure can change between DSP copier module versions. We are not modifying these structures anyway and NHLT blobs specify them properly, so use the blob directly to send the dma_control ipc instead of using the predefined I2S blob config structure. Signed-off-by: GuruprasadX Pawse <guruprasadx.pawse@intel.com> Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-24ASoC: sunxi: Uninitialized variable in probe()Dan Carpenter1-1/+1
Oddly enough, my version of GCC misses this uninitialized variable. Fixes: ba2ff3027b5a ("ASoC: sunxi: Add support for A23/A33/H3 codec's analog path controls") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-24ALSA: hda - fix headset-mic problem on a Dell laptopHui Wang1-0/+3
This group of new pins is not in the pin quirk table yet, adding them to the pin quirk table to fix the headset-mic problem. Cc: <stable@vger.kernel.org> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-24ALSA: hda - ignore the assoc and seq when comparing pin configurationsHui Wang1-1/+1
More and more pin configurations have been adding to the pin quirk table, lots of them are only different from assoc and seq, but they all apply to the same QUIRK_FIXUP, if we don't compare assoc and seq when matching pin configurations, it will greatly reduce the pin quirk table size. We have tested this change on a couple of Dell laptops, it worked well. Cc: <stable@vger.kernel.org> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-23ASoC: ab8500: Remove explicit initialization of driver callbacks to NULLLars-Peter Clausen1-2/+0
Fields of structs with global storage are implicitly initialized to 0/NULL, there is usually no need to do this explicitly. Removing the initialization of the legacy suspend/resume callback fields also gets the driver ready for the day when they are eventually removed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-23ASoC: uda1380: Request GPIOs at bus probe timeLars-Peter Clausen1-35/+20
Resources should be requested when the device is probed on the control bus rather then when the CODEC is bound to the sound card. This allows things like probe deferring and device managed allocations to work. So move the GPIO request calls from the CODEC probe to the bus probe and also make them managed along the way. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-23ASoC: uda1380: Remove unused DAI ID definesLars-Peter Clausen1-4/+0
The DAI ID defines are back from the time when DAIs were referenced by a numerical ID. These days a string is used for matching instead and the defines are unused. The last user of these defines was removed in commit f0fba2ad1b6b ("ASoC: multi-component - ASoC Multi-Component Support"). So remove the defines as well. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-22ASoC: wm_adsp: Check return value from wm_adsp_buffer_initCharles Keepax1-1/+6
We are not checking the return value from a call to wm_adsp_buffer_init it looks like this used to be returned at the bottom of the function but probably got missed when more error paths were added. This patch adds the appropriate error check. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-22ASoC: sunxi: Add support for A23/A33/H3 codec's analog path controlsChen-Yu Tsai3-0/+674
The internal codec on A23/A33/H3 is split into 2 parts. The analog path controls are routed through an embedded custom register bus accessed through the PRCM block. The SoCs share a common set of inputs, outputs, and audio paths. The following table lists the differences. ---------------------------------------- | Feature \ SoC | A23 | A33 | H3 | ---------------------------------------- | Headphone | v | v | | ---------------------------------------- | Line Out | | | v | ---------------------------------------- | Phone In/Out | v | v | | ---------------------------------------- Add an ASoC component driver for it. This should be tied to the codec audio card as an auxiliary device. This patch adds the commont paths and controls, and variant specific headphone out and line out. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-22ASoC: rsnd: use dma_sync_single_for_xxx() for IOMMUKuninori Morimoto2-6/+82
IOMMU needs DMA mapping function to use it. One solution is that we can use DMA mapped dev on snd_pcm_lib_preallocate_pages_for_all() for SNDRV_DMA_TYPE_DEV. But pcm_new and dma map timing are mismatched. Thus, this patch uses SNDRV_DMA_TYPE_CONTINUOUS for pcm_new, and use dma_sync_single_for_xxx() for each transfer. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-22ASoC: rsnd: Request/Release DMA channel each timeKuninori Morimoto1-77/+107
Current Renesas Sound driver requests DMA channel when .probe timing, and release it when .remove timing. And use DMA on .start/.stop But, Audio DMAC power ON was handled when request timing (= .probe), and power OFF was when release timing (= .remove). This means Audio DMAC power is always ON during driver was enabled. The best choice to solve this issue is that DMAEngine side handle this. But current DMAEngine API design can't solve atmic/non-atmic context issue for power ON/OFF. So next better choice is sound driver request/release DMA channel each time. This patch do it Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-22ASoC: wm_adsp: Remove unused wm_coeff_ctl.kcontrolRichard Fitzgerald1-3/+0
The kcontrol pointer in wm_coeff_ctl is not used now. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-22ASoC: wm_adsp: Firmware controls should be added as codec controlsRichard Fitzgerald2-5/+5
We were adding firmware controls as card controls (using snd_soc_add_codec_controls). The DSP is part of a specific codec so we should be adding them as codec controls. Adding as codec controls also means that if the codec has a name_prefix it will be added to the control name, which won't happen when adding as a card control. As that was the only use of the card pointer in struct wm_adsp it can be removed. For ADSP2 codecs a wm_adsp2_codec_probe() was added since the original control handling was written, and that's the logical place to store a pointer to the codec rather than delaying it until the codec is powered-up. For ADSP1 we don't use a codec_probe() stage so the codec pointer initialization replaces the original card pointer initialization in wm_adsp1_event(). Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-22ASoC: cht_bsw_rt5645: Fix leftover kmallocTakashi Iwai1-3/+3
cht_bsw_rt5645 driver allocates the own codec_id string but doesn't release it. For simplicity, put the string in cht_mc_private; then the string is allocated in a shot and released altogether. Fixes: c8560b7c917f ("ASoC: cht_bsw_rt5645: Fix writing to string literal") Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-22ASoC: samsung: Enable COMPILE_TEST for SmartQ and WM8580Krzysztof Kozlowski1-2/+3
The I2S sound drivers for SmartQ board and WM8580 codec can be compile tested to increase build coverage. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-22ASoC: samsung: Enable COMPILE_TEST for entire Samsung ASocKrzysztof Kozlowski1-1/+2
Instead of build time, Samsung ASoC drivers have rather runtime dependency on Exynos or other Samsung platforms. For building they require Common Clock Framework. If it is provided they could be compile tested to increase build coverage. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-22ASoC: samsung: smdk_wm8580: Remove old platforms and drop mach-types usageKrzysztof Kozlowski1-27/+3
MACH_SMDKC100, MACH_SMDKV210 and MACH_SMDKC110 are no longer supported so we can drop the dead code. After this the driver no longer differentiates between machines (S3C24xx machines are not supported by it) so there is no need to override I2S device id in cpu_dai_name and SEC_PLAYBACK dai_link can be removed as well. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-22ASoC: samsung: Remove non-existing MACH dependenciesKrzysztof Kozlowski1-1/+1
MACH_SMDKC100 was removed in commit b8529ec1c1b0 ("ARM: S5PC100: no more support S5PC100 SoC"). MACH_SMDKV210 and MACH_SMDKC110 in commit 28c8331d386 ("ARM: S5PV210: Remove support for board files"). Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-22ASoC: Make return type of dpcm_state_string() const char *Lars-Peter Clausen1-1/+1
dpcm_state_string() returns a pointer to a string literal. Modifying a string literal causes undefined behaviour. So make the return type of the function const char * to make it explicit that the returned value should not be modified. This patch is purely cosmetic, none of the users of dpcm_state_string() attempt to modify the returned content. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-22ASoC: wm8580: Remove #if IS_ENABLED(CONFIG_I2C)Kuninori Morimoto1-24/+1
wm8580 driver doesn't work without CONFIG_I2C anyway. Let's remove #if IS_ENABLED(CONFIG_I2C), and use module_i2c_driver(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-21ASoC: wm8523: Remove #if IS_ENABLED(CONFIG_I2C)Kuninori Morimoto1-23/+1
wm8523 driver doesn't work without CONFIG_I2C anyway. Let's remove #if IS_ENABLED(CONFIG_I2C), and use module_i2c_driver(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-21ASoC: wm_adsp: Only write shutdown controls for active firmwaresCharles Keepax1-0/+3
The control list may contain shutdown controls for firmwares that are not currently active, attempting to write this will at best fail. To avoid this issue we skip any control that is not active. Fixes: commit f4f0c4c60c39 ("ASoC: wm_adsp: Signal firmware shutdown through event control") Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-18Merge tag 'sound-4.9-rc6' of ↵Linus Torvalds3-4/+4
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Three trivial fixes: A regression fix for ASRock mobo, a use-after-free fix at hot-unplug of USB-audio, and a quirk for new Thinkpad models" * tag 'sound-4.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: usb-audio: Fix use-after-free of usb_device at disconnect ALSA: hda - Fix mic regression by ASRock mobo fixup ALSA: hda - add a new condition to check if it is thinkpad
2016-11-18ASoC: wm9081: Remove #if IS_ENABLED(CONFIG_I2C)Kuninori Morimoto2-2/+1
wm9081 driver doesn't work without CONFIG_I2C anyway. Let's remove #if IS_ENABLED(CONFIG_I2C) And, this patch adds "depends on I2C" to Kconfig Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-18ASoC: uda1380: Remove #if IS_ENABLED(CONFIG_I2C)Kuninori Morimoto2-21/+2
uda1380 driver doesn't work without CONFIG_I2C anyway. Let's remove #if IS_ENABLED(CONFIG_I2C), and use module_i2c_driver(). And, this patch adds "depends on I2C" to Kconfig Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-18ALSA: bebob: compare whole string for model name so that readers are not ↵Takashi Sakamoto1-2/+2
confused A modalias of 'ieee1394:ven00000D6Cmo00010060sp' hits units for M-Audio FireWire Audiophile only. However the unit has two states relevant to loaded firmware. Initial firmware returns 'FW Audiophile Bootloader', while functional firmware returns 'FW Audiophile'. ALSA bebob driver compares the units' model name to strings of 24 characters by the first 15 characters. This is shorter way to differentiate these two states but confusing to readers. This commit improves the code for this point. Kernel stack is consumed more in call of check_audiophile_booted() by a bit. With initial firmware: $ ./linux-firewire-utils/src/crpp < /sys/bus/firewire/devices/fw1/config_rom ROM header and bus information block ----------------------------------------------------------------- 400 04276da6 bus_info_length 4, crc_length 39, crc 28070 404 31333934 bus_name "1394" 408 006481f2 irmc 0, cmc 0, isc 0, bmc 0, pmc 0, cyc_clk_acc 100, max_rec 8 (512), max_rom 1, gen 15, spd 2 (S400) 40c 000d6c03 company_id 000d6c | 410 102b7e2e device_id 03102b7e2e | EUI-64 000d6c03102b7e2e root directory ----------------------------------------------------------------- 414 00067414 directory_length 6, crc 29716 418 0c0083c0 node capabilities per IEEE 1394 41c 03000d6c vendor 420 81000009 --> descriptor leaf at 444 424 17010060 model 428 8100000c --> descriptor leaf at 458 42c d1000001 --> unit directory at 430 unit directory at 430 ----------------------------------------------------------------- 430 00049da1 directory_length 4, crc 40353 (should be 48611) 434 1200a02d specifier id: 1394 TA 438 13014001 version: Vender Unique and AV/C 43c 17010060 model 440 8100000f --> descriptor leaf at 47c descriptor leaf at 444 ----------------------------------------------------------------- 444 0004073e leaf_length 4, crc 1854 448 00000000 textual descriptor 44c 00000000 minimal ASCII 450 4d2d4155 "M-AU" 454 44494f00 "DIO" descriptor leaf at 458 ----------------------------------------------------------------- 458 00086f21 leaf_length 8, crc 28449 45c 00000000 textual descriptor 460 00000000 minimal ASCII 464 46572041 "FW A" 468 7564696f "udio" 46c 7068696c "phil" 470 6520426f "e Bo" 474 6f746c6f "otlo" 478 61646572 "ader" descriptor leaf at 47c ----------------------------------------------------------------- 47c 00086f21 leaf_length 8, crc 28449 480 00000000 textual descriptor 484 00000000 minimal ASCII 488 46572041 "FW A" 48c 7564696f "udio" 490 7068696c "phil" 494 6520426f "e Bo" 498 6f746c6f "otlo" 49c 61646572 "ader" With functional firmware: $ ./linux-firewire-utils/src/crpp < /sys/bus/firewire/devices/fw1/config_rom ROM header and bus information block ----------------------------------------------------------------- 400 042de16f bus_info_length 4, crc_length 45, crc 57711 404 31333934 bus_name "1394" 408 f0648122 irmc 1, cmc 1, isc 1, bmc 1, pmc 0, cyc_clk_acc 100, max_rec 8 (512), max_rom 1, gen 2, spd 2 (S400) 40c 000d6c03 company_id 000d6c | 410 002b7e2e device_id 03002b7e2e | EUI-64 000d6c03002b7e2e root directory ----------------------------------------------------------------- 414 0009dac4 directory_length 9, crc 56004 418 0400000d hardware version 41c 0c0083c0 node capabilities per IEEE 1394 420 03000d6c vendor 424 81000012 --> descriptor leaf at 46c 428 17010060 model 42c 81000015 --> descriptor leaf at 480 430 13ffffff version 434 d1000002 --> unit directory at 43c 438 d4000006 --> dependent info directory at 450 unit directory at 43c ----------------------------------------------------------------- 43c 00041eb9 directory_length 4, crc 7865 440 1200a02d specifier id: 1394 TA 444 13014001 version: Vender Unique and AV/C 448 17010060 model 44c 81000014 --> descriptor leaf at 49c dependent info directory at 450 ----------------------------------------------------------------- 450 000637c7 directory_length 6, crc 14279 454 120007f5 specifier id 458 13000001 version 45c 3affffc7 (immediate value) 460 3b100000 (immediate value) 464 3cffffc7 (immediate value) 468 3d600000 (immediate value) descriptor leaf at 46c ----------------------------------------------------------------- 46c 0004b8e4 leaf_length 4, crc 47332 470 00000000 textual descriptor 474 00000000 minimal ASCII 478 4d2d4175 "M-Au" 47c 64696f00 "dio" descriptor leaf at 480 ----------------------------------------------------------------- 480 0006194b leaf_length 6, crc 6475 484 00000000 textual descriptor 488 00000000 minimal ASCII 48c 46572041 "FW A" 490 7564696f "udio" 494 7068696c "phil" 498 65000000 "e" descriptor leaf at 49c ----------------------------------------------------------------- 49c 0006194b leaf_length 6, crc 6475 4a0 00000000 textual descriptor 4a4 00000000 minimal ASCII 4a8 46572041 "FW A" 4ac 7564696f "udio" 4b0 7068696c "phil" 4b4 65000000 "e" Reported-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org> Reported-by: Joe Perches <joe@perches.com> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-16ASoC: rt5677: Remove superfluous linux/kthread.h inclusionTakashi Iwai1-1/+0
It's nowhere used in this driver code. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>