blob: 39e02ec514a7a0ee12263a2127259bd479d6876d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Next MinVersion: 3
module arc.mojom;
// Use same switch values as kernel switch events.
[Extensible]
enum AudioSwitch {
SW_HEADPHONE_INSERT = 0x02,
SW_MICROPHONE_INSERT = 0x04
};
interface AudioHost {
// Tells the host to show the volume controls.
ShowVolumeControls@0();
};
// Next method ID: 3
interface AudioInstance {
// Establishes full-duplex communication with the host.
[MinVersion=1] Init@1(AudioHost host);
// Notify plug states of headphone, microphone, etc. Each switch state is
// represented by the corresponding bit, if the bit is set then the switch
// is plugged/inserted.
NotifySwitchState@0(uint32 state);
// Notify volume and mute state.
// volume ranges from 0 to 100.
// muted == true if audio is muted.
[MinVersion=2] NotifyVolumeState@2(uint32 volume, bool muted);
};
|