Skip to content

Commit

Permalink
audio: volume: move volume related config to component config
Browse files Browse the repository at this point in the history
volume related config are missed to move during volume move out
from module adapter, move volume kconfig from module adapter folder
to volume folder with a specific volume kconfig file.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
  • Loading branch information
btian1 authored and kv2019i committed Oct 10, 2023
1 parent a83df49 commit d24abbc
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 79 deletions.
2 changes: 2 additions & 0 deletions src/audio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

menu "Audio components"

rsource "volume/Kconfig"

config COMP_BASEFW_IPC4
bool "BASEFW component"
default y
Expand Down
79 changes: 0 additions & 79 deletions src/audio/module_adapter/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -150,85 +150,6 @@ if CADENCE_CODEC

endif # Cadence

config COMP_VOLUME
bool "Volume component"
default y
depends on COMP_MODULE_ADAPTER
help
Select for Volume component

if COMP_VOLUME

config COMP_VOLUME_WINDOWS_FADE
bool "Windows Fade shape volume transitions support"
help
This option enables volume ramp shape that follows
power of 1.75. The shape is not linear, not logarithmic.
The power function uses a lookup table that consumes
256 bytes. The topology must set volume ramp token to
SOF_VOLUME_WINDOWS_FADE for the volume instance to use
this ramp shape.

config COMP_VOLUME_LINEAR_RAMP
bool "Linear ramp volume transitions support"
default y
help
This option enables volume linear ramp shape.

config COMP_PEAK_VOL
bool "Report peak vol data to host"
default y
depends on IPC_MAJOR_4
help
This option enables reporting to host peak vol regs.
See: struct ipc4_peak_volume_regs

choice "PEAK_METER_UPDATE_PERIOD_CHOICE"
prompt "The periods(ms) of updating peak meter value"
default PEAK_METER_UPDATE_10MS
depends on COMP_PEAK_VOL

config PEAK_METER_UPDATE_1MS
bool "1ms"
help
Update the peak meter value every 1ms

config PEAK_METER_UPDATE_10MS
bool "10ms"
help
Update the peak meter value every 10ms

config PEAK_METER_UPDATE_100MS
bool "100ms"
help
Update the peak meter value every 100ms

config PEAK_METER_UPDATE_1000MS
bool "1000ms"
help
Update the peak meter value every 1000ms
endchoice

config PEAK_METER_UPDATE_PERIOD
int
depends on COMP_PEAK_VOL
default 1 if PEAK_METER_UPDATE_1MS
default 10 if PEAK_METER_UPDATE_10MS
default 100 if PEAK_METER_UPDATE_100MS
default 1000 if PEAK_METER_UPDATE_1000MS
help
Decide which period of update the peak volume meter value

config COMP_GAIN
bool "GAIN component"
default y
depends on IPC_MAJOR_4
help
This option enables gain to change volume. It works
as peak volume without updating peak vol to host

endif # volume

config PASSTHROUGH_CODEC
bool "Passthrough codec"
default n
Expand Down
79 changes: 79 additions & 0 deletions src/audio/volume/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# SPDX-License-Identifier: BSD-3-Clause

config COMP_VOLUME
bool "Volume component"
default y
help
Select for Volume component

if COMP_VOLUME

config COMP_VOLUME_WINDOWS_FADE
bool "Windows Fade shape volume transitions support"
help
This option enables volume ramp shape that follows
power of 1.75. The shape is not linear, not logarithmic.
The power function uses a lookup table that consumes
256 bytes. The topology must set volume ramp token to
SOF_VOLUME_WINDOWS_FADE for the volume instance to use
this ramp shape.

config COMP_VOLUME_LINEAR_RAMP
bool "Linear ramp volume transitions support"
default y
help
This option enables volume linear ramp shape.

config COMP_PEAK_VOL
bool "Report peak vol data to host"
default y
depends on IPC_MAJOR_4
help
This option enables reporting to host peak vol regs.
See: struct ipc4_peak_volume_regs

choice "PEAK_METER_UPDATE_PERIOD_CHOICE"
prompt "The periods(ms) of updating peak meter value"
default PEAK_METER_UPDATE_10MS
depends on COMP_PEAK_VOL

config PEAK_METER_UPDATE_1MS
bool "1ms"
help
Update the peak meter value every 1ms

config PEAK_METER_UPDATE_10MS
bool "10ms"
help
Update the peak meter value every 10ms

config PEAK_METER_UPDATE_100MS
bool "100ms"
help
Update the peak meter value every 100ms

config PEAK_METER_UPDATE_1000MS
bool "1000ms"
help
Update the peak meter value every 1000ms
endchoice

config PEAK_METER_UPDATE_PERIOD
int
depends on COMP_PEAK_VOL
default 1 if PEAK_METER_UPDATE_1MS
default 10 if PEAK_METER_UPDATE_10MS
default 100 if PEAK_METER_UPDATE_100MS
default 1000 if PEAK_METER_UPDATE_1000MS
help
Decide which period of update the peak volume meter value

config COMP_GAIN
bool "GAIN component"
default y
depends on IPC_MAJOR_4
help
This option enables gain to change volume. It works
as peak volume without updating peak vol to host

endif # volume

0 comments on commit d24abbc

Please sign in to comment.