- Apr 29, 2015
-
-
Bard Liao authored
DMIC clock source is not from codec system clock directly. it is generated from the division of system clock. And it should be 256 * sample rate of AIF1. Signed-off-by:
Bard Liao <bardliao@realtek.com> Signed-off-by:
Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
-
Peter Zubaj authored
Looks like audigy emu10k2 (probably emu10k1 - sb live too) support two modes for DMA. Second mode is useful for 64 bit os with more then 2 GB of ram (fixes problems with big soundfont loading) 1) 32MB from 2 GB address space using 8192 pages (used now as default) 2) 16MB from 4 GB address space using 4096 pages Mode is set using HCFG_EXPANDED_MEM flag in HCFG register. Also format of emu10k2 page table is then different. Signed-off-by:
Peter Zubaj <pzubaj@marticonet.sk> Tested-by:
Takashi Iwai <tiwai@suse.de> Cc: <stable@vger.kernel.org> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Apr 28, 2015
-
-
Takashi Iwai authored
The OSS emulation in synth-emux helper has a potential AB/BA deadlock at the simultaneous closing and opening: close -> snd_seq_release() -> sne_seq_free_client() -> snd_seq_delete_all_ports(): takes client->ports_mutex -> port_delete() -> snd_emux_unuse(): takes emux->register_mutex open -> snd_seq_oss_open() -> snd_emux_open_seq_oss(): takes emux->register_mutex -> snd_seq_event_port_attach() -> snd_seq_create_port(): takes client->ports_mutex This patch addresses the deadlock by reducing the rance taking emux->register_mutex in snd_emux_open_seq_oss(). The lock is needed for the refcount handling, so move it locally. The calls in emux_seq.c are already with the mutex, thus they are replaced with the version without mutex lock/unlock. Cc: <stable@vger.kernel.org> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Apr 27, 2015
-
-
Axel Lin authored
Current code uses wrong mask when setting RT5645_DMIC_2_DP_GPIO12 bit, fix it. Signed-off-by:
Axel Lin <axel.lin@ingics.com> Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Takashi Iwai authored
Reported by coverity CID 1296024. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
The emux-synth driver has a possible AB/BA mutex deadlock at unloading the emu10k1 driver: snd_emux_free() -> snd_emux_detach_seq(): mutex_lock(&emu->register_mutex) -> snd_seq_delete_kernel_client() -> snd_seq_free_client(): mutex_lock(®ister_mutex) snd_seq_release() -> snd_seq_free_client(): mutex_lock(®ister_mutex) -> snd_seq_delete_all_ports() -> snd_emux_unuse(): mutex_lock(&emu->register_mutex) Basically snd_emux_detach_seq() doesn't need a protection of emu->register_mutex as it's already being unregistered. So, we can get rid of this for avoiding the deadlock. Cc: <stable@vger.kernel.org> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Some models provide too long string for the shortname that has 32bytes including the terminator, and it results in a non-terminated string exposed to the user-space. This isn't too critical, though, as the string is stopped at the succeeding longname string. This patch fixes such entries by dropping "SB" prefix (it's enough to fit within 32 bytes, so far). Meanwhile, it also changes strcpy() with strlcpy() to make sure that this kind of problem won't happen in future, too. Cc: <stable@vger.kernel.org> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
This patch adds the missing flag to enable "Mute-LED Mode" mixer enum ctl for Thinkpads that have also the software mute-LED control. Reported-and-tested-by:
Pali Rohár <pali.rohar@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
The mute-LED mode control has the fixed on/off states that are supposed to remain on/off regardless of the master switch. However, this doesn't work actually because the vmaster hook is called in the vmaster code itself. This patch fixes it by calling the hook indirectly after checking the mute LED mode. Reported-and-tested-by:
Pali Rohár <pali.rohar@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Dell XPS13 produces a click noise at boot up, and Gabriele spotted out that it's triggered by the initial pin control of the mic (NID 0x19). This has to be set to Hi-Z Vref while the driver initializes to Vref 80% as a normal mic. This patch fixes the generic parser code not to override the target vref if it has been already set by the driver, and adds a proper initialization of the target vref for this pin in the Realtek driver side. Reported-and-tested-by:
Gabriele Mazzotta <gabriele.mzt@gmail.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Apr 24, 2015
-
-
Fang, Yang A authored
This patch adds the ACPI match ID for rt5645/5650 codec Signed-off-by:
Fang, Yang A <yang.a.fang@intel.com> Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Bard Liao authored
The PLL output will be unstable in some cases. We can fix it by setting some registers. Signed-off-by:
Bard Liao <bardliao@realtek.com> Signed-off-by:
Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
-
Hui Wang authored
We have two machines with alc256 codec in the pin quirk table, so moving the common pins to ALC256_STANDARD_PINS. Cc: stable@vger.kernel.org BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1447909 Signed-off-by:
Hui Wang <hui.wang@canonical.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Apr 23, 2015
-
-
Kailang Yang authored
Switch default pcbeep path to Line in path. Signed-off-by:
Kailang Yang <kailang@realtek.com> Tested-by:
Hui Wang <hui.wang@canonical.com> Cc: <stable@vger.kernel.org> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Vinod Koul authored
The tom code should be using SND_SST_MFLD_PLATFORM and not the baytrail one. So fix it now Signed-off-by:
Vinod Koul <vinod.koul@intel.com> Signed-off-by:
Mark Brown <broonie@kernel.org>
-
- Apr 21, 2015
-
-
David Henningsson authored
The ALC256 does not have a mixer nid at 0x0b, and there's no loopback path (the output pins are directly connected to the DACs). This commit fixes an "num_steps = 0 for NID=0xb (ctl = Beep Playback Volume)" error (and as a result, problems with amixer/alsamixer). If there's pcbeep functionality, it certainly isn't controlled by setting an amp on 0x0b, so disable beep functionality (at least for now). Cc: stable@vger.kernel.org BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1446517 Signed-off-by:
David Henningsson <david.henningsson@canonical.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takamichi Horikawa authored
Roland SC-D70 reports its device class as vendor specific class and the quirk QUIRK_AUDIO_FIXED_ENDPOINT was used for audio output. In the quirks table the sampling rate was hard-coded to 44100 Hz and therefore not worked when the sound module was in 48000 Hz mode. In this change the quirk is changed to QUIRK_AUDIO_STANDARD_INTERFACE but as the sound module reports incorrect bSubframeSize in its descriptors, additional change is made in format.c to detect it and to override it (which uses the existing code for Edirol SD-90). Tested both when the sound module was in 44100 Hz mode and 48000 Hz mode and both audio input and output. MIDI related part of the driver is not touched. Signed-off-by:
Takamichi Horikawa <takamichiho@gmail.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Mengdong Lin authored
This patch addes AZX_DCAPS_I915_POWERWELL to BYT (Baytrail). Like Braswell and Skylake, the HDMI codec on Bytrail is also in the shared power well with GPU. This power well must be turned on before we reset link to probe the codec, to avoid communication failure with the codec. The side effect is that this power is always ON in S0 because the BYT HDMI codec does not support EPSS or D3ClkStop and so the controller doesn't enter D3 at runtime, and the HDMI codec and analog codec share a single physical HD-A link and so we cannot reset the HD-A link freely when we re-enable the power to use the HDMI codec. Next step is to test if an AGP reset or double AGP reset on BYT HDMI codec is okay to bring the HDMI codec back to a functional state after restoring the power. If okay, we can bind the power on/off with the HDMI codec PM without interrupting the analog audio. Signed-off-by:
Mengdong Lin <mengdong.lin@intel.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Apr 20, 2015
-
-
Mengdong Lin authored
Only Intel Haswell and Broadwell have a separate HD-A controller (PCI device 3) for display audio, which needs to get 24MHz HD-A link BCLK from the variable display core clock through vendor specific registers EM4 & EM5. Other platforms (Baytrail, Braswell and Skylake) don't have this feature. So this patch checks the PCI device ID of the controller in haswell_set_bclk() and only sync BCLK for HSW and BDW. Signed-off-by:
Mengdong Lin <mengdong.lin@intel.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Gabriele Mazzotta authored
Muting the headphone output pin right before the codec suspension prevents pop noises when headphones are plugged in (except for a barely audible click noise). This solution allows to truly save some power when headphones are plugged in unlike the previous solution (033b0a7c: "ALSA: hda - Pop noises fix for XPS13 9333") Signed-off-by:
Gabriele Mazzotta <gabriele.mzt@gmail.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Apr 18, 2015
-
-
Alexey Khoroshilov authored
A deadlock can be initiated by userspace via ioctl(SNDCTL_SEQ_OUTOFBAND) on /dev/sequencer with TMR_ECHO midi event. In this case the control flow is: sound_ioctl() -> case SND_DEV_SEQ: case SND_DEV_SEQ2: sequencer_ioctl() -> case SNDCTL_SEQ_OUTOFBAND: spin_lock_irqsave(&lock,flags); play_event(); -> case EV_TIMING: seq_timing_event() -> case TMR_ECHO: seq_copy_to_input() -> spin_lock_irqsave(&lock,flags); It seems that spin_lock_irqsave() around play_event() is not necessary, because the only other call location in seq_startplay() makes the call without acquiring spinlock. So, the patch just removes spinlocks around play_event(). By the way, it removes unreachable code in seq_timing_event(), since (seq_mode == SEQ_2) case is handled in the beginning. Compile tested only. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by:
Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Apr 17, 2015
-
-
Wei Yongjun authored
It's not necessary to free memory allocated with devm_kzalloc and using kfree leads to a double free. Signed-off-by:
Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by:
Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Dan Carpenter authored
This function is a bit unusual because it accepts negative values as "conn_len". It's theoretically possible for both "cache_len" and "conn_len" to be -ENOSPC and in that case we would oops trying to run memcmp() on the uninitialized "list" pointer. Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Wei Yongjun authored
In case of error, the function devm_ioremap_resource() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by:
Wei Yongjun <yongjun_wei@trendmicro.com.cn> Reviewed-by:
Krzysztof Kozlowski <k.kozlowski.k@gmail.com> Signed-off-by:
Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
-
Wei Yongjun authored
In case of error, the function devm_kzalloc() returns NULL not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by:
Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by:
Peter Rosin <peda@axentia.se> Signed-off-by:
Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
-
Fabio Estevam authored
We should check whether platform_get_irq() returns a negative number and propagate the error in this case. Signed-off-by:
Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Javi Merino authored
Now that the kernel provides DIV_ROUND_CLOSEST_ULL(), drop the internal implementation and use the kernel one. Signed-off-by:
Javi Merino <javi.merino@arm.com> Reported-by:
kbuild test robot <fengguang.wu@intel.com> Cc: Peter Rosin <peda@axentia.se> Acked-by:
Mark Brown <broonie@kernel.org> Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Apr 16, 2015
-
-
Takashi Iwai authored
The commit [a551d914: ALSA: hda - Use regmap for command verb caches, too] introduced a regression due to a typo in the conversion; the IEC958 status bits of slave digital devices aren't updated correctly. This patch corrects it. Fixes: a551d914 ('ALSA: hda - Use regmap for command verb caches, too') Reported-and-tested-by:
Markus Trippelsdorf <markus@trippelsdorf.de> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Scott Wood authored
DEVICE_ALI previously would jump to port_inited after calling pci_iomap(), bypassing the check for bmaddr being NULL. Signed-off-by:
Scott Wood <scottwood@freescale.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
David Henningsson authored
Because AZX_DCAPS_PM_RUNTIME is always defined as non-zero, the initial part of the expression can be skipped. Signed-off-by:
David Henningsson <david.henningsson@canonical.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Apr 15, 2015
-
-
Jin Yao authored
kbuild robot reports following warning: "sound/soc/intel/haswell/sst-haswell-ipc.c:2204:1-6: WARNING: invalid free of devm_ allocated data" As julia explains to me, the memory allocated with devm_kalloc is freed automatically on failure of a probe function. So this kfree should be removed otherwise the double free will be got in error handler path. Signed-off-by:
Jin Yao <yao.jin@linux.intel.com> Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
rsnd_dmaen_quit() is assuming dmaen->chan is NULL if it failed to get DMAEngine channel. but, current dmaen->chan might have error value when error case (this driver is checking it by IS_ERR_OR_NULL()) This patch makes sure dmaen->chan is NULL when error case. Otherwise, it will contact to unknown address in rsnd_dmaen_quit() Signed-off-by:
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Takashi Iwai authored
Fix a compile warning sound/soc/qcom/lpass-cpu.c: In function ‘lpass_cpu_daiops_trigger’: sound/soc/qcom/lpass-cpu.c:224:2: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized] return ret; ^ Although switch () lists the most of existing cases, it's still better to cover the rest as an error properly. Signed-off-by:
Takashi Iwai <tiwai@suse.de> Acked-by:
Kenneth Westfield <kwestfie@codeaurora.org> Signed-off-by:
Mark Brown <broonie@kernel.org>
-
- Apr 14, 2015
-
-
Mengdong Lin authored
Some HD-A codecs may add their own vendor 'set' verb to the regmap, thru func snd_hdac_add_vendor_verb(). This patch sets the GET bit (bit 11) when adding the verb so that its peer vendor 'get' verb is actually added. This can avoid I/O error when writing the 'set' verb thru remap, since HD-A regmap internally looks up a writable vendor verb with GET bit set at first. Signed-off-by:
Mengdong Lin <mengdong.lin@intel.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Apr 13, 2015
-
-
Jo-Philipp Wich authored
The Lenovo Thinkpad T450 requires the ALC292_FIXUP_TPT440_DOCK as well in order to get working sound output on the docking stations headphone jack. Patch tested on a Thinkpad T450 (20BVCTO1WW) using kernel 4.0-rc7 in conjunction with a ThinkPad Ultradock. Signed-off-by:
Jo-Philipp Wich <jow@openwrt.org> Cc: <stable@vger.kernel.org> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Although some races in runtime PM refcount was fixed by the commit [664c7155: ALSA: hda - Work around races of power up/down with runtime PM], there is still a race in the following case: CPU0: CPU1 : runtime suspend: codec->in_pm = 1 snd_hdac_power_up_pm(): pm_runtime_get_sync() skipped suspend finished: codec->in_pm = 0 snd_hdac_power_down_pm(): pm_runtime_put_*() is called! For avoiding this situation, increment in_pm flag atomically when it's non-zero, and decrement accordingly, to ensure that in_pm is set consistently for the whole concurrent operations. Also, since atomic_inc_not_zero() and atomic_dec_if_positive() are lengthy inline functions, move snd_hdac_power_up_pm() and _down_pm() to sound/hda/hdac_device.c as no inline functions. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
The type field of HD-audio codec object should be exposed to user-space so that it can identify which driver type to bind (legacy / asoc). Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Takashi Sakamoto authored
An element instance can have several elements with the same feature. Some userspace applications can add such an element instance by add operation with the number of elements. Then, the element instance gets a memory object to keep states of these elements. But the element instance has just one memory object for the elements. This causes the same result to each read/write operations to the different elements. This commit fixes this bug by allocating enough memory objects to the element instance for each of elements. Signed-off-by:
Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Apr 12, 2015
-
-
kbuild test robot authored
sound/soc/intel/haswell/sst-haswell-ipc.c:646:28-29: WARNING: Use ARRAY_SIZE Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element Semantic patch information: This makes an effort to find cases where ARRAY_SIZE can be used such as where there is a division of sizeof the array by the sizeof its first element or by any indexed element or the element type. It replaces the division of the two sizeofs by ARRAY_SIZE. Generated by: scripts/coccinelle/misc/array_size.cocci CC: Jie Yang <yang.jie@intel.com> Signed-off-by:
Fengguang Wu <fengguang.wu@intel.com> Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Lars-Peter Clausen authored
All CODEC input and output widgets are either in the DAPM routing table or manually marked as non-connected. This means the card is fully routed and we can let the core take care of disconnecting non-connected pins. Signed-off-by:
Lars-Peter Clausen <lars@metafoo.de> Acked-by:
Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by:
Mark Brown <broonie@kernel.org>
-