blob: fe6d2ae54d0808487ac9aa0658a3b33eaf93520e [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.settings;
/// Settings related to audio.
/// Supported SettingsEpitaph enums:
protocol Audio {
/// Gets the current [AudioSettings]. Returns immediately on first call;
/// subsequent calls return when the value changes.
/// If this call fails, it is considered a fatal error and the channel
/// will be closed.
Watch() -> (AudioSettings settings);
/// Sets audio settings. Any field not explicitly set in the table performs a
/// no-op, and will not make any changes.
Set(AudioSettings settings) -> () error Error;
/// The source of the volume settings. The volume is set according to the source.
enum AudioStreamSettingSource {
/// The volume is set by the user. When the `source` in AudioStreamSettings is
/// set to this, the audio volume is set to `user_volume`.
USER = 0;
/// The system takes control of the volume. This is used when the system constantly
/// calculates and changes the volume. The volume is not stored for this source.
table Volume {
/// The volume level ranged [0.0, 1.0]. The level maps to a dbfs value from a volume
/// curve in the setting service.
1: float32 level;
/// True if the volume should be muted. If this is true, then the volume is silent,
/// regardless of `level`.
2: bool muted;
table AudioStreamSettings {
/// The audio stream which the settings are applying to.
1: stream;
/// The volume of `stream` is set according to the volume settings from `source`.
2: AudioStreamSettingSource source;
/// User level volume setting. If the `source` is USER, then the volume is set to
/// `user_volume`.
3: Volume user_volume;
table AudioSettings {
/// Contains the volume setting for all audio stream settings. There should only be
/// one AudioStreamSettings for each
1: vector<AudioStreamSettings>:5 streams;
/// To be deprecated in favor of fuchsia.settings.InputDeviceSettings.
2: AudioInput input;
table AudioInput {
/// Whether the audio input is muted. Takes into consideration the hardware state.
1: bool muted;