18 Apr, 2015
1 commit
-
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
Signed-off-by: Takashi Iwai
17 Apr, 2015
1 commit
-
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
Signed-off-by: Takashi Iwai
16 Apr, 2015
3 commits
-
The commit [a551d91473e5: 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: a551d91473e5 ('ALSA: hda - Use regmap for command verb caches, too')
Reported-and-tested-by: Markus Trippelsdorf
Signed-off-by: Takashi Iwai -
DEVICE_ALI previously would jump to port_inited after calling
pci_iomap(), bypassing the check for bmaddr being NULL.Signed-off-by: Scott Wood
Signed-off-by: Takashi Iwai -
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
Signed-off-by: Takashi Iwai
14 Apr, 2015
1 commit
-
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
Signed-off-by: Takashi Iwai
13 Apr, 2015
26 commits
-
…/sound into for-linus
ASoC: Updates for v4.1
More updates for v4.1, pretty much all drivers:
- Lots of cleanups from Lars, mainly moving things from the CODEC level
to the card level.
- Continuing improvements to rcar from Morimoto-san, pcm512x from
Howard and Peter, the Intel platforms from Vinod, Jie, Jin and Han,
and to rt5670 from Bard.
- Support for some non-DSP Qualcomm platforms, Google's Storm
platform, Maxmim MAX98925 CODECs and the Ingenic JZ4780 SoC. -
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
Cc:
Signed-off-by: Takashi Iwai -
Although some races in runtime PM refcount was fixed by the commit
[664c715573c2: 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
-
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
-
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
Signed-off-by: Takashi Iwai -
…opic/wm8731', 'asoc/topic/wm8804' and 'asoc/topic/wm8996' into asoc-next
-
…'asoc/topic/ux500' into asoc-next
-
…c/topic/sh-cleanup' into asoc-next
-
…/rcar' and 'asoc/topic/rt286' into asoc-next
-
…asoc/topic/max98925' and 'asoc/topic/nuc900' into asoc-next
-
…topic/kirkwood' into asoc-next
-
…opic/fsl' and 'asoc/topic/fsl-ssi' into asoc-next
-
…ic/ak4642', 'asoc/topic/arizona' and 'asoc/topic/atmel' into asoc-next
-
ASoC: Changes for v4.1
A selection of changes for v4.1 so far. The main things are:
- Move of jack registration to the card where it belongs.
- Support for DAPM routes specified by both the machine driver and DT.# gpg: Signature made Thu 05 Mar 2015 01:10:27 GMT using RSA key ID 5D5487D0
# gpg: WARNING: digest algorithm MD5 is deprecated
# gpg: please see https://gnupg.org/faq/weak-digest-algos.html for more information
# gpg: Oops: keyid_from_fingerprint: no pubkey
# gpg: Good signature from "Mark Brown "
# gpg: aka "Mark Brown "
# gpg: aka "Mark Brown "
# gpg: aka "Mark Brown "
# gpg: aka "Mark Brown "
# gpg: aka "Mark Brown " -
…4271', 'asoc/fix/davinci' and 'asoc/fix/rcar' into asoc-linus
-
ASoC: Last minute fix for v4.0
This patch backs out a change that came in during the merge window which
selects a configuration for GPIO4 on pcm512x CODECs that may not be
suitable for all systems using the device. Changes for v4.1 will make
this properly configurable but for now it's safest to revert to the
v3.19 behaviour and leave the pin configuration alone.Sorry for sending this direct at the last minute but due to the GPIO
misuse it'd be really good to get it in the release and I'd not realised
it hadn't been sent yet - between some travel, a job change and other
non-urgent fixes coming in I'd lost track of the urgency. It's been in
-next for several weeks now, is isolated to the driver and fairly clear
to inspection.# gpg: Signature made Sat 11 Apr 2015 22:14:17 BST using RSA key ID 5D5487D0
# gpg: WARNING: digest algorithm MD5 is deprecated
# gpg: please see https://gnupg.org/faq/weak-digest-algos.html for more information
# gpg: Oops: keyid_from_fingerprint: no pubkey
# gpg: Good signature from "Mark Brown "
# gpg: aka "Mark Brown "
# gpg: aka "Mark Brown "
# gpg: aka "Mark Brown "
# gpg: aka "Mark Brown "
# gpg: aka "Mark Brown " -
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
Signed-off-by: Fengguang Wu
Signed-off-by: Mark Brown
12 Apr, 2015
8 commits
-
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
Acked-by: Jarkko Nikula
Signed-off-by: Mark Brown -
Some callers of n810_ext_control() pass the card DAPM context and some pass
the CODEC DAPM context. Given that some of the widgets that are accessed in
the function are in the card's context, always passing it is the obvious
choice.Signed-off-by: Lars-Peter Clausen
Acked-by: Jarkko Nikula
Signed-off-by: Mark Brown -
The dapm field of the snd_soc_codec struct will eventually be removed
(replaced with the DAPM context from the component embedded inside the
CODEC). Replace its usage with the card's DAPM context. The idea is that
DAPM is hierarchical and with the card at the root it is possible to access
widgets from other contexts through the card context.Signed-off-by: Lars-Peter Clausen
Signed-off-by: Mark Brown -
The dapm field of the snd_soc_codec struct will eventually be removed
(replaced with the DAPM context from the component embedded inside the
CODEC). Replace its usage with the card's DAPM context. The idea is that
DAPM is hierarchical and with the card at the root it is possible to access
widgets from other contexts through the card context.Signed-off-by: Lars-Peter Clausen
Signed-off-by: Mark Brown -
The dapm field of the snd_soc_codec struct will eventually be removed
(replaced with the DAPM context from the component embedded inside the
CODEC). Replace its usage with the card's DAPM context. The idea is that
DAPM is hierarchical and with the card at the root it is possible to access
widgets from other contexts through the card context.Signed-off-by: Lars-Peter Clausen
Signed-off-by: Mark Brown -
The Atmel ASoC machine drivers don't have any compile time arch dependencies
anymore. Make it possible to select them when COMPILE_TEST is enabled to get
better compile test coverage.Signed-off-by: Lars-Peter Clausen
Signed-off-by: Mark Brown -
The SND_AT91_SOC_SAM9G20_WM8731 and SND_AT91_SOC_SAM9X5_WM8731 machine
driver symbols select SND_SOC_WM8731 which depends on SND_SOC_I2C_AND_SPI.
So the machine driver symbols need to depend on SND_SOC_I2C_AND_SPI as well,
otherwise we might end up with a invalid configuration, which will sooner or
later upset the randconfig auto-builders.Signed-off-by: Lars-Peter Clausen
Signed-off-by: Mark Brown -
The commit [39d118677baa: ALSA: ctl: evaluate macro instead of
numerical value] replaced the numbers with constants, but one place
was replaced wrongly with a different type. Fixed now.Fixes: 39d118677baa ('ALSA: ctl: evaluate macro instead of numerical value')
Signed-off-by: Takashi Iwai