25 Jul, 2015
1 commit
-
Pull sound fixes from Takashi Iwai:
"This has been a calm week again: one minor lockdep fix for PCM core,
and the most of the rest are HD-audio quirks and fixups for various
chips and machines"* tag 'sound-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda - Add headset mic pin quirk for a Dell device
ALSA: hda - remove one pin from ALC292_STANDARD_PINS
ALSA: hda - Add new GPU codec ID 0x10de007d to snd-hda
ALSA: hda: add new AMD PCI IDs with proper driver caps
ALSA: hda - Fix Skylake codec timeout
ALSA: hda - Add headset mic support for Acer Aspire V5-573G
ALSA: sparc: Add missing kfree in error path
ALSA: pcm: Fix lockdep warning with nonatomic PCM ops
17 Jul, 2015
1 commit
-
With the nonatomic PCM ops, the system may spew lockdep warnings like:
=============================================
[ INFO: possible recursive locking detected ]
4.2.0-rc1-jeejaval3 #12 Not tainted
---------------------------------------------
aplay/4029 is trying to acquire lock:
(snd_pcm_link_rwsem){.+.+.+}, at: [] snd_pcm_stream_lock+0x43/0x60but task is already holding lock:
(snd_pcm_link_rwsem){.+.+.+}, at: [] snd_pcm_action_nonatomic+0x29/0x80other info that might help us debug this:
Possible unsafe locking scenario:CPU0
----
lock(snd_pcm_link_rwsem);
lock(snd_pcm_link_rwsem);Although this is false-positive as the rwsem is taken always as
read-only for these code paths, it's certainly annoying to see this at
any occasion. A simple fix is to use down_read_nested() in
snd_pcm_stream_lock() that can be called inside another lock.Reported-by: Vinod Koul
Reported-by: Jeeja Kp
Tested-by: Jeeja Kp
Cc:
Signed-off-by: Takashi Iwai
02 Jul, 2015
2 commits
-
Merge third patchbomb from Andrew Morton:
- the rest of MM
- scripts/gdb updates
- ipc/ updates
- lib/ updates
- MAINTAINERS updates
- various other misc things
* emailed patches from Andrew Morton : (67 commits)
genalloc: rename of_get_named_gen_pool() to of_gen_pool_get()
genalloc: rename dev_get_gen_pool() to gen_pool_get()
x86: opt into HAVE_COPY_THREAD_TLS, for both 32-bit and 64-bit
MAINTAINERS: add zpool
MAINTAINERS: BCACHE: Kent Overstreet has changed email address
MAINTAINERS: move Jens Osterkamp to CREDITS
MAINTAINERS: remove unused nbd.h pattern
MAINTAINERS: update brcm gpio filename pattern
MAINTAINERS: update brcm dts pattern
MAINTAINERS: update sound soc intel patterns
MAINTAINERS: remove website for paride
MAINTAINERS: update Emulex ocrdma email addresses
bcache: use kvfree() in various places
libcxgbi: use kvfree() in cxgbi_free_big_mem()
target: use kvfree() in session alloc and free
IB/ehca: use kvfree() in ipz_queue_{cd}tor()
drm/nouveau/gem: use kvfree() in u_free()
drm: use kvfree() in drm_free_large()
cxgb4: use kvfree() in t4_free_mem()
cxgb3: use kvfree() in cxgb_free_mem()
... -
Pull sound fixes from Takashi Iwai:
"Here are a bunch of small fixes, mostly for HD-audio quirks, in
addition to a few regression fixes and trivial cleanups"* tag 'sound-fix-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: Fix uninintialized error return
ALSA: hda: Delete an unnecessary check before the function call "snd_info_free_entry"
ALSA: hda - Add a fixup for Dell E7450
ALSA: hda - Fix the dock headphone output on Fujitsu Lifebook E780
ALSA: hda - Add headset support to Acer Aspire V5
ALSA: hda - restore the MIC FIXUP for some Dell machines
ALSA: jack: Fix endless loop at unique index detection
ALSA: hda - set proper caps for newer AMD hda audio in KB/KV
ALSA: hda - Disable widget power-save for VIA codecs
ALSA: hda - Fix Dock Headphone on Thinkpad X250 seen as a Line Out
01 Jul, 2015
1 commit
-
To be consistent with other kernel interface namings, rename
of_get_named_gen_pool() to of_gen_pool_get(). In the original function
name "_named" suffix references to a device tree property, which contains
a phandle to a device and the corresponding device driver is assumed to
register a gen_pool object.Due to a weak relation and to avoid any confusion (e.g. in future
possible scenario if gen_pool objects are named) the suffix is removed.[sfr@canb.auug.org.au: crypto/marvell/cesa - fix up for of_get_named_gen_pool() rename]
Signed-off-by: Vladimir Zapolskiy
Cc: Nicolas Ferre
Cc: Philipp Zabel
Cc: Shawn Guo
Cc: Sascha Hauer
Cc: Alexandre Belloni
Cc: Russell King
Cc: Mauro Carvalho Chehab
Cc: Vinod Koul
Cc: Takashi Iwai
Cc: Jaroslav Kysela
Signed-off-by: Stephen Rothwell
Cc: Herbert Xu
Cc: Boris BREZILLON
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
30 Jun, 2015
1 commit
-
Static analysis with cppcheck found the following error:
[sound/core/init.c:118]: (error) Uninitialized variable: err..this was introduced by commit 2471b6c80a70e80de69f5ff4c37187c3912e5874
("ALSA: info: Register proc entries recursively, too") where the call
to snd_info_card_register was removed and no longer setting the error
return in err. When snd_info_create_card_entry fails to allocate a
an entry, the error path exits with garbage in err. Fix is to return
-ENOMEM if entry fails to be allocated.Fixes: 2471b6c80a ("ALSA: info: Register proc entries recursively, too")
Signed-off-by: Colin Ian King
Signed-off-by: Takashi Iwai
26 Jun, 2015
2 commits
-
While the commit [d0a601c278de: ALSA: jack: Fix the id uniqueness
check] fixes the wrong string check, it leads to a worse result -- the
loop in get_available_index() goes into an endless loop. The cause is
that snd_ctl_find_id() returns the object assigned to the numid if
it's set. Thus it points to the previous entry again.This patch clears the numid field for the next call properly.
Reported-and-tested-by: Tomáš Pružina
Signed-off-by: Takashi Iwai -
Pull sound updates from Takashi Iwai:
"It was a busy development cycle at this time, as you can see a wide
range of changes in diffstat. There are no big changes but many
refactoring and improvements. Here we go some highlights:ALSA core:
- Procfs codes were cleaned up to use seq_file
- Procfs can be opt out via Kconfig (only for EXPERT)
- Two types of jack API were unified finally; now both kctl and input
jack devs are handled via a single function call.HD-audio:
- Continued code restructuring for the future ASoC driver; now HDA
controller driver is split to a core helper module.
- Preliminary codes for Skylake audio support in HDA core.
- Proper i915 gfx power well management for SKL & co
- Enabled runtime PM as default for Intel HDMI/DP codecs
- Newer Tegra chip supports
- More quirks for Dell headsets, Alienware (with CA0132), etc.
- A couple of DRM ELD helper API functionsASoC:
- Support for loading ASoC topology maps from firmware, intended to
be used to allow self-describing DSP firmware images to be built
which can map controls added by the DSP to userspace without the
kernel needing to know about individual DSP firmwares
- Lots of refactoring to avoid direct access to snd_soc_codec where
it's not needed supporting future refactoring
- Big refactoring, cleanup and enhancement for the Wolfson ADSP
driver
- Cleanup series for TI TAS2552 and R-CAR drivers
- Fixes and improvements on RT56xx codecs
- Support for TI TAS571x power amplifiers
- Support for Qualcomm APQ8016 and ZTE ZX296702 SoCs
- Support for x86 systems with RT5650 and Qualcomm Storm
- Support for Mediatek AFE (Audio Front End) unit
- Other various small fixes to ASoC codec driversFirewire:
- Enhanced to allow non-blocking streams to use timestamp
synchronization
- Improve support for DM1500 and BeBoBv3Misc:
- Cleanup of old pci API functions over all PCI sound drivers
- Fix long-standing regression of the old powermac i2c setup"* tag 'sound-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (533 commits)
ALSA: pcm: Fix pcm_class sysfs output
ALSA: hda-beep: Update authors dead email address
ASoC: wm_adsp: Move DSP Rate controls into the codec
ASoC: wm8995: Fix setting sysclk for WM8995_SYSCLK_MCLK2 case
ALSA: hda: provide default bus io ops extended hdac
ALSA: hda: add hda link cleanup routine
ALSA: hda: add hdac_ext stream creation and cleanup routines
ASoC: rsrc-card: remove unused ret
ALSA: HDAC: move SND_HDA_PREALLOC_SIZE to core
ASoC: mediatek: Add machine driver for rt5650 rt5676 codec
ASoC: mediatek: Add machine driver for MAX98090 codec
ASoC: mediatek: Add AFE platform driver
ASoC: rsnd: remove io from rsnd_mod
ASoC: rsnd: move rsnd_mod_is_working() to rsnd_io_is_working()
ASoC: rsnd: don't use rsnd_mod_to_io() on snd_kcontrol
ASoC: rsnd: don't use rsnd_mod_to_io() on rsnd_src_xxx()
ASoC: rsnd: don't use rsnd_mod_to_io() on rsnd_ssi_xxx()
ASoC: rsnd: don't use rsnd_mod_to_io() on rsnd_dma_xxx()
ASoC: rsnd: don't use rsnd_mod_to_io() on rsnd_get_adinr()
ASoC: rsnd: add common interrupt handler for SSI/SRC/DMA
...
23 Jun, 2015
2 commits
-
The pcm_class sysfs of each PCM substream gives only "none" since the
recent code change to embed the struct device. Fix the code to point
directly to the embedded device object properly.Fixes: ef46c7af93f9 ('ALSA: pcm: Embed struct device')
Cc: # v4.0+
Signed-off-by: Takashi Iwai -
Pull timer updates from Thomas Gleixner:
"A rather largish update for everything time and timer related:- Cache footprint optimizations for both hrtimers and timer wheel
- Lower the NOHZ impact on systems which have NOHZ or timer migration
disabled at runtime.- Optimize run time overhead of hrtimer interrupt by making the clock
offset updates smarter- hrtimer cleanups and removal of restrictions to tackle some
problems in sched/perf- Some more leap second tweaks
- Another round of changes addressing the 2038 problem
- First step to change the internals of clock event devices by
introducing the necessary infrastructure- Allow constant folding for usecs/msecs_to_jiffies()
- The usual pile of clockevent/clocksource driver updates
The hrtimer changes contain updates to sched, perf and x86 as they
depend on them plus changes all over the tree to cleanup API changes
and redundant code, which got copied all over the place. The y2038
changes touch s390 to remove the last non 2038 safe code related to
boot/persistant clock"* 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (114 commits)
clocksource: Increase dependencies of timer-stm32 to limit build wreckage
timer: Minimize nohz off overhead
timer: Reduce timer migration overhead if disabled
timer: Stats: Simplify the flags handling
timer: Replace timer base by a cpu index
timer: Use hlist for the timer wheel hash buckets
timer: Remove FIFO "guarantee"
timers: Sanitize catchup_timer_jiffies() usage
hrtimer: Allow hrtimer::function() to free the timer
seqcount: Introduce raw_write_seqcount_barrier()
seqcount: Rename write_seqcount_barrier()
hrtimer: Fix hrtimer_is_queued() hole
hrtimer: Remove HRTIMER_STATE_MIGRATE
selftest: Timers: Avoid signal deadlock in leap-a-day
timekeeping: Copy the shadow-timekeeper over the real timekeeper last
clockevents: Check state instead of mode in suspend/resume path
selftests: timers: Add leap-second timer edge testing to leap-a-day.c
ntp: Do leapsecond adjustment in adjtimex read path
time: Prevent early expiry of hrtimers[CLOCK_REALTIME] at the leap second edge
ntp: Introduce and use SECS_PER_DAY macro instead of 86400
...
29 May, 2015
3 commits
-
snd_kctl_jack_new() tries to assign a unique index number when a name
string that has been already registered is passed. However, it checks
with the base string without "Jack" suffix, so it never hits.
Fix the call with the properly processed name string instead.Fixes: b8dd086674cf 'ALSA: Jack: handle jack embedded kcontrol creating within ctljack')
Signed-off-by: Takashi Iwai -
Merge back the latest HD-audio stuff for further development.
-
There are a few leftover CONFIG_PROC_FS forgotten to replace with
CONFIG_SND_PROC_FS.Fixes: cd6a65036f0e ('ALSA: replace CONFIG_PROC_FS with CONFIG_SND_PROC_FS')
Reported-by: Jim Davis
Signed-off-by: Takashi Iwai
28 May, 2015
2 commits
-
We may disable proc fs only for sound part, to reduce ALSA
memory footprint. So add CONFIG_SND_PROC_FS and replace the
old CONFIG_PROC_FSs in alsa code.With sound proc fs disabled, we can save about 9KB memory
size on X86_64 platform.Signed-off-by: Jie Yang
Reviewed-by: Mark Brown
Signed-off-by: Takashi Iwai -
For some embedded devices, we need reduce code size and data
footprint as much as possible, e.g. disabling procfs, hw/sw
params refinement, mmap, dpcm, dapm, compressed API...Here add SND_PROC_FS item for expert, we can unselect it to
disable sound proc FS and reduce memory footprint.Signed-off-by: Jie Yang
Reviewed-by: Mark Brown
Signed-off-by: Takashi Iwai
22 May, 2015
3 commits
-
Add a helper to create the IEC958 channel status from an ALSA
snd_pcm_runtime structure, taking account of the sample rate and
sample size.Signed-off-by: Russell King
Reviwed-by: Mark Brown
Signed-off-by: Takashi Iwai -
Add a helper for the EDID like data structure, which is typically passed
from a HDMI adapter to its associated audio driver. This informs the
audio driver of the capabilities of the attached HDMI sink.Signed-off-by: Russell King
Reviewed-by: Mark Brown
Signed-off-by: Takashi Iwai
21 May, 2015
1 commit
-
The jack interface is statically included in sound core. Having
doubly module information is rather confusing.Signed-off-by: Takashi Iwai
19 May, 2015
1 commit
-
Currently in snd_pcm_update_hw_ptr0 during interrupt,
we consider there were double acknowledged interrupts when:
1. HW reported pointer is smaller than expected, and
2. Time from last update time (hdelta) is over half a buffer time.However, when HW reported pointer is only a few bytes smaller than
expected, and when hdelta is just a little larger than half a buffer time
(e.g. ping-pong buffer), it wrongly treats this IRQ as double acknowledged.The condition #2 uses jiffies, but jiffies is not high resolution
since it is integer. We should consider jiffies inaccuracy.Signed-off-by: Koro Chen
Signed-off-by: Takashi Iwai
18 May, 2015
4 commits
-
It's no longer a part of API but merely a local function.
Signed-off-by: Takashi Iwai
-
Just a minor refactoring, no functional changes.
Signed-off-by: Takashi Iwai
-
The commit [c560a6797e3b: ALSA: core: Remove child proc file elements
recursively] converted snd_card_proc_new() with the normal
snd_info_*() call and removed snd_device chain for such info
entries. However, it misses one point: the creation of the proc entry
was managed by snd_device chain in the former code, and now it's also
gone, which results in no proc files creation at all. Mea culpa.This patch makes snd_info_card_register() creating the all pending
child proc entries in a shot. Also, since snd_card_register() might
be called multiple times, this function is also changed to be callable
multiple times.Along with the changes above, now the linked list of snd_info_entry is
added at creation time instead of snd_info_register() for keeping eyes
of pending info entries.Fixes: c560a6797e3b ('ALSA: core: Remove child proc file elements recursively')
Reported-by: "Lu, Han"
Signed-off-by: Takashi Iwai -
snd_info_free_entry() releases the all children nodes as well, but due
to the wrong timing of releasing the link, the children nodes may be
disconnected but left unreleased. This patch fixes it by moving the
link free at the right position. Also it eases list_for_each_entry()
without _safe option in snd_info_disconnect() because it no longer
frees the children nodes there.Fixes: c560a6797e3b ('ALSA: core: Remove child proc file elements recursively')
Signed-off-by: Takashi Iwai
30 Apr, 2015
3 commits
-
Another fixes for NULL jack->input_dev in some places in jack.c.
Fixes: 2ba2dfa1fcc7 ('ALSA: hda - Update to use the new jack kctls method')
Signed-off-by: Takashi Iwai -
There is no input_dev for phantom jack, we should not report
input event for it, otherwise, NULL pointer dereference error
will occur.Fixes: 2ba2dfa1fcc7 ('ALSA: hda - Update to use the new jack kctls method')
Signed-off-by: Jie Yang
Signed-off-by: Takashi Iwai
28 Apr, 2015
6 commits
-
snd_kctl_jack_new() and snd_kctl_jack_report() are internal only now
so make them static.Signed-off-by: Jie Yang
Signed-off-by: Takashi Iwai -
Jack snd_kcontrols can now be created during snd_jack_new()
or by later calling snd_jack_add_new_kctls().This patch creates the jacks during the initialisation stage
for both phantom and non phantom jacks.Signed-off-by: Jie Yang
Signed-off-by: Takashi Iwai -
Dont create input devices for phantom jacks.
Here, we extend snd_jack_new() to support phantom jack creating:
pass in a bool param for [non-]phantom flag, and a bool param
initial_jack to indicate whether we need to create a kctl at
this stage.We can also add a kctl to the jack after its created meaning we
can now integrate the HDA and ASoC jacks.Signed-off-by: Jie Yang
Signed-off-by: Takashi Iwai -
This patch adds a static method get_available_index() to
allocate the index of new jack kcontrols and also adds
jack_kctl_name_gen() which is used to ensure compatibility
with jack naming by removing " Jack" from some incorrectly
passed names.Signed-off-by: Jie Yang
Signed-off-by: Takashi Iwai -
Currently the ALSA jack core registers only input devices for each jack
registered. These jack input devices are not readable by userspace devices
that run as non root. This patch series will implement kctls inside the
core jack part, including kctls creating, status changing report, for both
HD-Audio and ASoC jack. This allows non root userspace to read jack status
and act on it.This patch adds a new API called snd_jack_add_new_kctl(), which will create
a kcontrol, add it to the card, and also attach it to the jack kctl list.This patch also initialises the jack kctl list after jack is newed, and
reports kctl status when jack insertion/removal events occur.snd_jack_new() is updated in the following patches to also support creating
phantom jacks and jack kcontrols. We then remove these duplicated features
from HDA jack and have jack kctls handled by core throughout HDA and ASoC.Signed-off-by: Liam Girdwood
Modified-by: Jie Yang
Signed-off-by: Jie Yang
Reveiwed-by: Mark Brown
Signed-off-by: Takashi Iwai
27 Apr, 2015
1 commit
24 Apr, 2015
6 commits
-
A few minor cleanups:
- Move the call of snd_info_minor_register() into snd_info_init() so
that we can call all proc-related stuff in a shot
- Add missing __init prefix to snd_info_minor_register()
- Return an error properly from snd_oss_info_register()
- Drop snd_info_minor_unregister() that is superfluous nowAcked-by: Jaroslav Kysela
Signed-off-by: Takashi Iwai -
Minor cleanups of Makefile to build some codes conditionally so that
a few ifdefs can be reduced.Acked-by: Jaroslav Kysela
Signed-off-by: Takashi Iwai -
So far we've ignored the errors at creating proc files in many places.
But they should be rather treated seriously.Also, by assuring the error handling, we can get rid of superfluous
snd_info_free_entry() calls as they will be removed by the parent in
the caller side.This patch fixes the missing error checks and reduces the superfluous
free calls.Acked-by: Jaroslav Kysela
Signed-off-by: Takashi Iwai -
Since each proc entry is freed automatically by the parent, we don't
have to take care of its life cycle any longer. This allows us to
reduce a few more lines of codes.Acked-by: Jaroslav Kysela
Signed-off-by: Takashi Iwai -
Using snd_info_entry for /proc/asound root makes easier to release the
all children, too. Further cleanups will follow.Acked-by: Jaroslav Kysela
Signed-off-by: Takashi Iwai -
This patch changes the way to manage the resource release of proc
files: namely, let snd_info_free_entry() freeing the whole children.This makes it us possible to drop the snd_device_*() management. Then
snd_card_proc_new() becomes merely a wrapper to
snd_info_create_card_entry().Together with this change, now you need to call snd_info_free_entry()
for a proc entry created via snd_card_proc_new(), while it was freed
via snd_device_free() beforehand.Acked-by: Jaroslav Kysela
Signed-off-by: Takashi Iwai