]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ASoC: SDCA: Export Q7.8 volume control helpers
authorNiranjan H Y <niranjan.hy@ti.com>
Wed, 1 Apr 2026 13:21:45 +0000 (18:51 +0530)
committerMark Brown <broonie@kernel.org>
Fri, 3 Apr 2026 14:12:38 +0000 (15:12 +0100)
commitba2a0e81d4d71c3bbc61c420b6fac5abaeddd77d
tree086086953c27ae7012405e2b86fd85c91a258e7f
parent04cc47624a33a6b56c62bfd65ad6b2d1c42e17c4
ASoC: SDCA: Export Q7.8 volume control helpers

Export the Q7.8 volume control helpers to allow reuse
by other ASoC drivers. These functions handle 16-bit
signed Q7.8 fixed-point format values for volume controls.

Changes include:
- Rename q78_get_volsw to sdca_asoc_q78_get_volsw
- Rename q78_put_volsw to sdca_asoc_q78_put_volsw
- Add a convenience macro SDCA_SINGLE_Q78_TLV and
  SDCA_DOUBLE_Q78_TLV for creating mixer controls

This allows other ASoC drivers to easily implement controls
using the Q7.8 fixed-point format without duplicating code.

Signed-off-by: Niranjan H Y <niranjan.hy@ti.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260401132148.2367-1-niranjan.hy@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/sdca_asoc.h
sound/soc/sdca/sdca_asoc.c