From 2850266965ade165f913a66f679a0449faf21180 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 16 Feb 2019 20:24:54 -0700 Subject: sound: Add uclass operations for beeping Some audio codecs such as Intel HDA do not need to use digital data to play sounds, but instead have a way to emit beeps. Add this interface as an option. If the beep interface is not supported, then the sound uclass falls back to the I2S interface. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- arch/sandbox/include/asm/test.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'arch/sandbox') diff --git a/arch/sandbox/include/asm/test.h b/arch/sandbox/include/asm/test.h index ce00ba5..fc52f47 100644 --- a/arch/sandbox/include/asm/test.h +++ b/arch/sandbox/include/asm/test.h @@ -162,6 +162,22 @@ int sandbox_get_setup_called(struct udevice *dev); int sandbox_get_sound_sum(struct udevice *dev); /** + * sandbox_set_allow_beep() - Set whether the 'beep' interface is supported + * + * @dev: Device to update + * @allow: true to allow the start_beep() method, false to disallow it + */ +void sandbox_set_allow_beep(struct udevice *dev, bool allow); + +/** + * sandbox_get_beep_frequency() - Get the frequency of the current beep + * + * @dev: Device to check + * @return frequency of beep, if there is an active beep, else 0 + */ +int sandbox_get_beep_frequency(struct udevice *dev); + +/** * sandbox_get_pch_spi_protect() - Get the PCI SPI protection status * * @dev: Device to check -- cgit v1.1