mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
The put() operation is expected to return: 1) 0 on success if no changes were made 2) 1 on success if changes were made 3) error code otherwise Currently 2) is usually ignored when writing control-operations. While forcing compliance is not an option right now, make it easier for developers to adhere to the expectations and notice problems by logging them when CONFIG_SND_CTL_DEBUG is enabled. Due to large size of struct snd_ctl_elem_value, 'value_buf' is provided as a reusable buffer for kctl->put() verification. This prevents exhausting the stack when verifying the operation. >From user perspective, patch introduces a new trace/events category 'snd_ctl' containing a single 'snd_ctl_put' event type. Log sample: amixer-1086 [003] ..... 8.035939: snd_ctl_put: success: expected=0, actual=0 for ctl numid=1, iface=MIXER, name='Master Playback Volume', index=0, device=0, subdevice=0, card=0 amixer-1087 [003] ..... 8.938721: snd_ctl_put: success: expected=1, actual=1 for ctl numid=1, iface=MIXER, name='Master Playback Volume', index=0, device=0, subdevice=0, card=0 amixer-1088 [003] ..... 9.631470: snd_ctl_put: success: expected=1, actual=1 for ctl numid=1, iface=MIXER, name='Master Playback Volume', index=0, device=0, subdevice=0, card=0 amixer-1089 [000] ..... 9.636786: snd_ctl_put: fail: expected=1, actual=0 for ctl numid=5, iface=MIXER, name='Loopback Mute', index=0, device=0, subdevice=0, card=0 Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Mark Brown <broonie@kernel.org> Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260224205619.584795-1-cezary.rojewski@intel.com
58 lines
1.7 KiB
Makefile
58 lines
1.7 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Makefile for ALSA
|
|
# Copyright (c) 1999,2001 by Jaroslav Kysela <perex@perex.cz>
|
|
#
|
|
|
|
snd-y := sound.o init.o memory.o control.o misc.o device.o
|
|
ifneq ($(CONFIG_SND_PROC_FS),)
|
|
snd-y += info.o
|
|
snd-$(CONFIG_SND_OSSEMUL) += info_oss.o
|
|
endif
|
|
snd-$(CONFIG_ISA_DMA_API) += isadma.o
|
|
snd-$(CONFIG_SND_OSSEMUL) += sound_oss.o
|
|
snd-$(CONFIG_SND_VMASTER) += vmaster.o
|
|
snd-$(CONFIG_SND_JACK) += ctljack.o jack.o
|
|
|
|
snd-pcm-y := pcm.o pcm_native.o pcm_lib.o pcm_misc.o \
|
|
pcm_memory.o memalloc.o
|
|
snd-pcm-$(CONFIG_SND_PCM_TIMER) += pcm_timer.o
|
|
snd-pcm-$(CONFIG_SND_PCM_ELD) += pcm_drm_eld.o
|
|
snd-pcm-$(CONFIG_SND_PCM_IEC958) += pcm_iec958.o
|
|
|
|
# for trace-points
|
|
CFLAGS_pcm_lib.o := -I$(src)
|
|
CFLAGS_pcm_native.o := -I$(src)
|
|
CFLAGS_control.o := -I$(src)
|
|
|
|
snd-pcm-dmaengine-y := pcm_dmaengine.o
|
|
|
|
snd-ctl-led-y := control_led.o
|
|
snd-rawmidi-y := rawmidi.o
|
|
snd-ump-y := ump.o
|
|
snd-ump-$(CONFIG_SND_UMP_LEGACY_RAWMIDI) += ump_convert.o
|
|
snd-timer-y := timer.o
|
|
snd-hrtimer-y := hrtimer.o
|
|
snd-hwdep-y := hwdep.o
|
|
snd-seq-device-y := seq_device.o
|
|
|
|
snd-compress-y := compress_offload.o
|
|
|
|
obj-$(CONFIG_SND) += snd.o
|
|
obj-$(CONFIG_SND_CTL_LED) += snd-ctl-led.o
|
|
obj-$(CONFIG_SND_HWDEP) += snd-hwdep.o
|
|
obj-$(CONFIG_SND_TIMER) += snd-timer.o
|
|
obj-$(CONFIG_SND_HRTIMER) += snd-hrtimer.o
|
|
obj-$(CONFIG_SND_PCM) += snd-pcm.o
|
|
obj-$(CONFIG_SND_DMAENGINE_PCM) += snd-pcm-dmaengine.o
|
|
obj-$(CONFIG_SND_SEQ_DEVICE) += snd-seq-device.o
|
|
obj-$(CONFIG_SND_RAWMIDI) += snd-rawmidi.o
|
|
obj-$(CONFIG_SND_UMP) += snd-ump.o
|
|
|
|
obj-$(CONFIG_SND_CORE_TEST) += sound_kunit.o
|
|
|
|
obj-$(CONFIG_SND_OSSEMUL) += oss/
|
|
obj-$(CONFIG_SND_SEQUENCER) += seq/
|
|
|
|
obj-$(CONFIG_SND_COMPRESS_OFFLOAD) += snd-compress.o
|