summaryrefslogtreecommitdiff
path: root/arch/sandbox
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-02-16 20:24:54 -0700
committerBin Meng <bmeng.cn@gmail.com>2019-02-20 15:27:08 +0800
commit2850266965ade165f913a66f679a0449faf21180 (patch)
treef173b23f448ab8db19adaf8ee75228baf281a42b /arch/sandbox
parente65f9ef9f21058a7e4f54e11da1af49a8c1b0579 (diff)
downloadu-boot-2850266965ade165f913a66f679a0449faf21180.tar.gz
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 <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/sandbox')
-rw-r--r--arch/sandbox/include/asm/test.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/sandbox/include/asm/test.h b/arch/sandbox/include/asm/test.h
index ce00ba51e4..fc52f47f82 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