blob: 01f84abb0ca8b5bdf49defe0c184b09f2eaf3261 [file] [log] [blame]
toyoshim@chromium.orga97eebf2014-01-03 07:52:39 +00001// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
dnicoara@chromium.org9f2a6f02014-01-03 21:25:00 +00005#ifndef MEDIA_MIDI_MIDI_MANAGER_ALSA_H_
6#define MEDIA_MIDI_MIDI_MANAGER_ALSA_H_
toyoshim@chromium.orga97eebf2014-01-03 07:52:39 +00007
agoode@chromium.org25227512014-06-08 05:12:05 +00008#include <alsa/asoundlib.h>
avi793390d2015-12-22 22:22:36 -08009#include <stdint.h>
limasdfe59d0392015-11-19 20:28:57 -080010#include <map>
dchengc2aeece2015-12-27 00:54:00 -080011#include <utility>
toyoshim@chromium.orga97eebf2014-01-03 07:52:39 +000012#include <vector>
13
bnc628660d2016-02-05 19:58:14 -080014#include "base/containers/hash_tables.h"
agoode55a8b522015-03-08 12:40:17 -070015#include "base/gtest_prod_util.h"
avieea95e82015-12-18 20:27:08 -080016#include "base/macros.h"
toyoshim@chromium.orga97eebf2014-01-03 07:52:39 +000017#include "base/memory/scoped_ptr.h"
agoode@chromium.org25227512014-06-08 05:12:05 +000018#include "base/synchronization/lock.h"
toyoshim@chromium.orga97eebf2014-01-03 07:52:39 +000019#include "base/threading/thread.h"
agoodef212b2a2015-03-19 12:53:23 -070020#include "base/values.h"
agoode7de413f2015-04-24 00:13:39 -070021#include "device/udev_linux/scoped_udev.h"
brettw49ff0172015-05-05 12:43:04 -070022#include "media/midi/midi_export.h"
toyoshim@chromium.orga97eebf2014-01-03 07:52:39 +000023#include "media/midi/midi_manager.h"
24
agoodeb2ead822016-03-11 12:14:35 -080025namespace base {
26class ThreadChecker;
27}
28
toyoshim@chromium.orga97eebf2014-01-03 07:52:39 +000029namespace media {
toyoshime147c5e2015-05-07 21:58:31 -070030namespace midi {
toyoshim@chromium.orga97eebf2014-01-03 07:52:39 +000031
brettw49ff0172015-05-05 12:43:04 -070032class MIDI_EXPORT MidiManagerAlsa final : public MidiManager {
toyoshim@chromium.orga97eebf2014-01-03 07:52:39 +000033 public:
toyoshim@chromium.orgc82e66e2014-02-04 07:05:47 +000034 MidiManagerAlsa();
dcheng9e8524d2014-10-27 15:18:50 -070035 ~MidiManagerAlsa() override;
toyoshim@chromium.orga97eebf2014-01-03 07:52:39 +000036
toyoshim@chromium.orgc82e66e2014-02-04 07:05:47 +000037 // MidiManager implementation.
dcheng9e8524d2014-10-27 15:18:50 -070038 void StartInitialization() override;
toyoshim8e7d6e02015-10-06 08:47:17 -070039 void Finalize() override;
dcheng9e8524d2014-10-27 15:18:50 -070040 void DispatchSendMidiData(MidiManagerClient* client,
Avi Drissman3528fd02015-12-18 20:11:31 -050041 uint32_t port_index,
42 const std::vector<uint8_t>& data,
dcheng9e8524d2014-10-27 15:18:50 -070043 double timestamp) override;
toyoshim@chromium.orga97eebf2014-01-03 07:52:39 +000044
45 private:
agoode99d63292015-04-13 08:39:25 -070046 friend class MidiManagerAlsaTest;
agoode55a8b522015-03-08 12:40:17 -070047 FRIEND_TEST_ALL_PREFIXES(MidiManagerAlsaTest, ExtractManufacturer);
agoode99d63292015-04-13 08:39:25 -070048 FRIEND_TEST_ALL_PREFIXES(MidiManagerAlsaTest, ToMidiPortState);
agoode55a8b522015-03-08 12:40:17 -070049
agoodeb09423b2015-05-11 11:39:57 -070050 class AlsaCard;
limasdfe59d0392015-11-19 20:28:57 -080051 using AlsaCardMap = std::map<int, scoped_ptr<AlsaCard>>;
agoodeb09423b2015-05-11 11:39:57 -070052
agoode99d63292015-04-13 08:39:25 -070053 class MidiPort {
agoodef212b2a2015-03-19 12:53:23 -070054 public:
55 enum class Type { kInput, kOutput };
56
agooded87fc0f2015-05-21 08:29:31 -070057 // The Id class is used to keep the multiple strings separate
58 // but compare them all together for equality purposes.
59 // The individual strings that make up the Id can theoretically contain
60 // arbitrary characters, so unfortunately there is no simple way to
61 // concatenate them into a single string.
62 class Id final {
63 public:
64 Id();
65 Id(const std::string& bus,
66 const std::string& vendor_id,
67 const std::string& model_id,
68 const std::string& usb_interface_num,
69 const std::string& serial);
70 Id(const Id&);
71 ~Id();
72 bool operator==(const Id&) const;
73 bool empty() const;
74
75 std::string bus() const { return bus_; }
76 std::string vendor_id() const { return vendor_id_; }
77 std::string model_id() const { return model_id_; }
78 std::string usb_interface_num() const { return usb_interface_num_; }
79 std::string serial() const { return serial_; }
80
81 private:
82 std::string bus_;
83 std::string vendor_id_;
84 std::string model_id_;
85 std::string usb_interface_num_;
86 std::string serial_;
87 };
88
agoode99d63292015-04-13 08:39:25 -070089 MidiPort(const std::string& path,
agooded87fc0f2015-05-21 08:29:31 -070090 const Id& id,
agoode99d63292015-04-13 08:39:25 -070091 int client_id,
92 int port_id,
93 int midi_device,
94 const std::string& client_name,
95 const std::string& port_name,
96 const std::string& manufacturer,
97 const std::string& version,
98 Type type);
99 ~MidiPort();
agoodef212b2a2015-03-19 12:53:23 -0700100
101 // Gets a Value representation of this object, suitable for serialization.
102 scoped_ptr<base::Value> Value() const;
103
104 // Gets a string version of Value in JSON format.
105 std::string JSONValue() const;
106
107 // Gets an opaque identifier for this object, suitable for using as the id
108 // field in MidiPort.id on the web. Note that this string does not store
109 // the full state.
110 std::string OpaqueKey() const;
111
agoode99d63292015-04-13 08:39:25 -0700112 // Checks for equality for connected ports.
113 bool MatchConnected(const MidiPort& query) const;
114 // Checks for equality for kernel cards with id, pass 1.
115 bool MatchCardPass1(const MidiPort& query) const;
116 // Checks for equality for kernel cards with id, pass 2.
117 bool MatchCardPass2(const MidiPort& query) const;
118 // Checks for equality for non-card clients, pass 1.
119 bool MatchNoCardPass1(const MidiPort& query) const;
120 // Checks for equality for non-card clients, pass 2.
121 bool MatchNoCardPass2(const MidiPort& query) const;
agoodef212b2a2015-03-19 12:53:23 -0700122
agoode99d63292015-04-13 08:39:25 -0700123 // accessors
124 std::string path() const { return path_; }
agooded87fc0f2015-05-21 08:29:31 -0700125 Id id() const { return id_; }
agoode99d63292015-04-13 08:39:25 -0700126 std::string client_name() const { return client_name_; }
127 std::string port_name() const { return port_name_; }
128 std::string manufacturer() const { return manufacturer_; }
129 std::string version() const { return version_; }
130 int client_id() const { return client_id_; }
131 int port_id() const { return port_id_; }
132 int midi_device() const { return midi_device_; }
133 Type type() const { return type_; }
Avi Drissman3528fd02015-12-18 20:11:31 -0500134 uint32_t web_port_index() const { return web_port_index_; }
agoode99d63292015-04-13 08:39:25 -0700135 bool connected() const { return connected_; }
136
137 // mutators
Avi Drissman3528fd02015-12-18 20:11:31 -0500138 void set_web_port_index(uint32_t web_port_index) {
agoode99d63292015-04-13 08:39:25 -0700139 web_port_index_ = web_port_index;
140 }
141 void set_connected(bool connected) { connected_ = connected; }
142 void Update(const std::string& path,
143 int client_id,
144 int port_id,
145 const std::string& client_name,
146 const std::string& port_name,
147 const std::string& manufacturer,
148 const std::string& version) {
149 path_ = path;
150 client_id_ = client_id;
151 port_id_ = port_id;
152 client_name_ = client_name;
153 port_name_ = port_name;
154 manufacturer_ = manufacturer;
155 version_ = version;
156 }
157
158 private:
159 // Immutable properties.
agooded87fc0f2015-05-21 08:29:31 -0700160 const Id id_;
agoode99d63292015-04-13 08:39:25 -0700161 const int midi_device_;
162
agoodef212b2a2015-03-19 12:53:23 -0700163 const Type type_;
164
agoode99d63292015-04-13 08:39:25 -0700165 // Mutable properties. These will get updated as ports move around or
166 // drivers change.
167 std::string path_;
168 int client_id_;
169 int port_id_;
170 std::string client_name_;
171 std::string port_name_;
172 std::string manufacturer_;
173 std::string version_;
174
175 // Index for MidiManager.
Avi Drissman3528fd02015-12-18 20:11:31 -0500176 uint32_t web_port_index_ = 0;
agoode99d63292015-04-13 08:39:25 -0700177
178 // Port is present in the ALSA system.
agoode5a1aa112015-06-21 20:51:00 -0700179 bool connected_ = true;
agoode99d63292015-04-13 08:39:25 -0700180
181 DISALLOW_COPY_AND_ASSIGN(MidiPort);
agoode55a8b522015-03-08 12:40:17 -0700182 };
183
agoode99d63292015-04-13 08:39:25 -0700184 class MidiPortStateBase {
185 public:
agoode5ebc4932015-12-01 08:25:12 -0800186 typedef std::vector<scoped_ptr<MidiPort>>::iterator iterator;
agoodebd4be9b2015-03-16 19:17:25 -0700187
agoode99d63292015-04-13 08:39:25 -0700188 virtual ~MidiPortStateBase();
189
190 // Given a port, finds a port in the internal store.
191 iterator Find(const MidiPort& port);
192
193 // Given a port, finds a connected port, using exact matching.
194 iterator FindConnected(const MidiPort& port);
195
196 // Given a port, finds a disconnected port, using heuristic matching.
197 iterator FindDisconnected(const MidiPort& port);
198
199 iterator begin() { return ports_.begin(); }
200 iterator end() { return ports_.end(); }
201
202 protected:
203 MidiPortStateBase();
agoode5ebc4932015-12-01 08:25:12 -0800204 iterator erase(iterator position) { return ports_.erase(position); }
dchengc2aeece2015-12-27 00:54:00 -0800205 void push_back(scoped_ptr<MidiPort> port) {
206 ports_.push_back(std::move(port));
207 }
agoode99d63292015-04-13 08:39:25 -0700208
209 private:
agoode5ebc4932015-12-01 08:25:12 -0800210 std::vector<scoped_ptr<MidiPort>> ports_;
agoode99d63292015-04-13 08:39:25 -0700211
212 DISALLOW_COPY_AND_ASSIGN(MidiPortStateBase);
213 };
214
215 class TemporaryMidiPortState final : public MidiPortStateBase {
216 public:
agoode5ebc4932015-12-01 08:25:12 -0800217 iterator erase(iterator position) {
218 return MidiPortStateBase::erase(position);
219 };
220 void push_back(scoped_ptr<MidiPort> port) {
dchengc2aeece2015-12-27 00:54:00 -0800221 MidiPortStateBase::push_back(std::move(port));
agoode5ebc4932015-12-01 08:25:12 -0800222 }
agoode99d63292015-04-13 08:39:25 -0700223 };
224
225 class MidiPortState final : public MidiPortStateBase {
226 public:
227 MidiPortState();
228
agoode5ebc4932015-12-01 08:25:12 -0800229 // Inserts a port at the end. Returns web_port_index.
Avi Drissman3528fd02015-12-18 20:11:31 -0500230 uint32_t push_back(scoped_ptr<MidiPort> port);
agoode99d63292015-04-13 08:39:25 -0700231
232 private:
Avi Drissman3528fd02015-12-18 20:11:31 -0500233 uint32_t num_input_ports_ = 0;
234 uint32_t num_output_ports_ = 0;
agoode99d63292015-04-13 08:39:25 -0700235 };
236
237 class AlsaSeqState {
238 public:
239 enum class PortDirection { kInput, kOutput, kDuplex };
240
241 AlsaSeqState();
242 ~AlsaSeqState();
243
244 void ClientStart(int client_id,
245 const std::string& client_name,
246 snd_seq_client_type_t type);
247 bool ClientStarted(int client_id);
248 void ClientExit(int client_id);
249 void PortStart(int client_id,
250 int port_id,
251 const std::string& port_name,
252 PortDirection direction,
253 bool midi);
254 void PortExit(int client_id, int port_id);
255 snd_seq_client_type_t ClientType(int client_id) const;
agoodeb09423b2015-05-11 11:39:57 -0700256 scoped_ptr<TemporaryMidiPortState> ToMidiPortState(
257 const AlsaCardMap& alsa_cards);
258
259 int card_client_count() { return card_client_count_; }
agoode99d63292015-04-13 08:39:25 -0700260
261 private:
262 class Port {
263 public:
264 Port(const std::string& name, PortDirection direction, bool midi);
265 ~Port();
266
agoodeb0582872015-05-20 05:22:24 -0700267 std::string name() const { return name_; }
268 PortDirection direction() const { return direction_; }
agoode99d63292015-04-13 08:39:25 -0700269 // True if this port is a MIDI port, instead of another kind of ALSA port.
agoodeb0582872015-05-20 05:22:24 -0700270 bool midi() const { return midi_; }
agoode99d63292015-04-13 08:39:25 -0700271
272 private:
273 const std::string name_;
274 const PortDirection direction_;
275 const bool midi_;
276
277 DISALLOW_COPY_AND_ASSIGN(Port);
278 };
279
280 class Client {
281 public:
limasdfe59d0392015-11-19 20:28:57 -0800282 using PortMap = std::map<int, scoped_ptr<Port>>;
agoode99d63292015-04-13 08:39:25 -0700283
284 Client(const std::string& name, snd_seq_client_type_t type);
285 ~Client();
286
agoodeb0582872015-05-20 05:22:24 -0700287 std::string name() const { return name_; }
288 snd_seq_client_type_t type() const { return type_; }
agoode99d63292015-04-13 08:39:25 -0700289 void AddPort(int addr, scoped_ptr<Port> port);
290 void RemovePort(int addr);
291 PortMap::const_iterator begin() const;
292 PortMap::const_iterator end() const;
293
294 private:
295 const std::string name_;
296 const snd_seq_client_type_t type_;
297 PortMap ports_;
agoode99d63292015-04-13 08:39:25 -0700298
299 DISALLOW_COPY_AND_ASSIGN(Client);
300 };
301
limasdfe59d0392015-11-19 20:28:57 -0800302 std::map<int, scoped_ptr<Client>> clients_;
agoode99d63292015-04-13 08:39:25 -0700303
agoodeb09423b2015-05-11 11:39:57 -0700304 // This is the current number of clients we know about that have
305 // cards. When this number matches alsa_card_midi_count_, we know
306 // we are in sync between ALSA and udev. Until then, we cannot generate
307 // MIDIConnectionEvents to web clients.
agoodedf1b9ff2015-06-25 18:14:50 -0700308 int card_client_count_ = 0;
agoodeb09423b2015-05-11 11:39:57 -0700309
agoode99d63292015-04-13 08:39:25 -0700310 DISALLOW_COPY_AND_ASSIGN(AlsaSeqState);
311 };
312
agoodeb09423b2015-05-11 11:39:57 -0700313 class AlsaCard {
314 public:
315 AlsaCard(udev_device* dev,
agooded87fc0f2015-05-21 08:29:31 -0700316 const std::string& name,
317 const std::string& longname,
318 const std::string& driver,
agoodeb09423b2015-05-11 11:39:57 -0700319 int midi_device_count);
320 ~AlsaCard();
agooded87fc0f2015-05-21 08:29:31 -0700321 std::string name() const { return name_; }
322 std::string longname() const { return longname_; }
323 std::string driver() const { return driver_; }
324 std::string path() const { return path_; }
325 std::string bus() const { return bus_; }
326 std::string vendor_id() const { return vendor_id_; }
327 std::string model_id() const { return model_id_; }
328 std::string usb_interface_num() const { return usb_interface_num_; }
329 std::string serial() const { return serial_; }
agoodeb09423b2015-05-11 11:39:57 -0700330 int midi_device_count() const { return midi_device_count_; }
agooded87fc0f2015-05-21 08:29:31 -0700331 std::string manufacturer() const { return manufacturer_; }
agoodeb09423b2015-05-11 11:39:57 -0700332
333 private:
334 FRIEND_TEST_ALL_PREFIXES(MidiManagerAlsaTest, ExtractManufacturer);
335
336 // Extracts the manufacturer using heuristics and a variety of sources.
337 static std::string ExtractManufacturerString(
338 const std::string& udev_id_vendor,
339 const std::string& udev_id_vendor_id,
340 const std::string& udev_id_vendor_from_database,
agooded87fc0f2015-05-21 08:29:31 -0700341 const std::string& name,
342 const std::string& longname);
agoodeb09423b2015-05-11 11:39:57 -0700343
agooded87fc0f2015-05-21 08:29:31 -0700344 const std::string name_;
345 const std::string longname_;
346 const std::string driver_;
347 const std::string path_;
348 const std::string bus_;
349 const std::string vendor_id_;
350 const std::string model_id_;
351 const std::string usb_interface_num_;
352 const std::string serial_;
353 const int midi_device_count_;
354 const std::string manufacturer_;
agoodeb09423b2015-05-11 11:39:57 -0700355
356 DISALLOW_COPY_AND_ASSIGN(AlsaCard);
357 };
358
agoode5a1aa112015-06-21 20:51:00 -0700359 struct SndSeqDeleter {
360 void operator()(snd_seq_t* seq) const { snd_seq_close(seq); }
361 };
362
363 struct SndMidiEventDeleter {
364 void operator()(snd_midi_event_t* coder) const {
365 snd_midi_event_free(coder);
366 };
367 };
368
agoodeb2ead822016-03-11 12:14:35 -0800369 using SourceMap = base::hash_map<int, uint32_t>;
370 using OutPortMap = base::hash_map<uint32_t, int>;
371 using ScopedSndSeqPtr = scoped_ptr<snd_seq_t, SndSeqDeleter>;
372 using ScopedSndMidiEventPtr =
373 scoped_ptr<snd_midi_event_t, SndMidiEventDeleter>;
agoode99d63292015-04-13 08:39:25 -0700374
agoode@chromium.org25227512014-06-08 05:12:05 +0000375 // An internal callback that runs on MidiSendThread.
Avi Drissman3528fd02015-12-18 20:11:31 -0500376 void SendMidiData(uint32_t port_index, const std::vector<uint8_t>& data);
agoode@chromium.org25227512014-06-08 05:12:05 +0000377
agoodebd4be9b2015-03-16 19:17:25 -0700378 void ScheduleEventLoop();
toyoshim@chromium.org4a8657c2014-02-06 11:23:09 +0000379 void EventLoop();
agoodebd4be9b2015-03-16 19:17:25 -0700380 void ProcessSingleEvent(snd_seq_event_t* event, double timestamp);
agoode99d63292015-04-13 08:39:25 -0700381 void ProcessClientStartEvent(int client_id);
382 void ProcessPortStartEvent(const snd_seq_addr_t& addr);
383 void ProcessClientExitEvent(const snd_seq_addr_t& addr);
384 void ProcessPortExitEvent(const snd_seq_addr_t& addr);
agoode975043d2015-05-11 00:46:17 -0700385 void ProcessUdevEvent(udev_device* dev);
agoodeb09423b2015-05-11 11:39:57 -0700386 void AddCard(udev_device* dev);
387 void RemoveCard(int number);
agoode99d63292015-04-13 08:39:25 -0700388
389 // Updates port_state_ and Web MIDI state from alsa_seq_state_.
390 void UpdatePortStateAndGenerateEvents();
391
392 // Enumerates ports. Call once after subscribing to the announce port.
393 void EnumerateAlsaPorts();
agoode975043d2015-05-11 00:46:17 -0700394 // Enumerates udev cards. Call once after initializing the udev monitor.
395 bool EnumerateUdevCards();
agoode99d63292015-04-13 08:39:25 -0700396 // Returns true if successful.
Avi Drissman3528fd02015-12-18 20:11:31 -0500397 bool CreateAlsaOutputPort(uint32_t port_index, int client_id, int port_id);
398 void DeleteAlsaOutputPort(uint32_t port_index);
agoode99d63292015-04-13 08:39:25 -0700399 // Returns true if successful.
Avi Drissman3528fd02015-12-18 20:11:31 -0500400 bool Subscribe(uint32_t port_index, int client_id, int port_id);
agoode99d63292015-04-13 08:39:25 -0700401
agoodeb2ead822016-03-11 12:14:35 -0800402 // Members initialized in the constructor are below.
403 // Our copies of the internal state of the ports of seq and udev.
agoode99d63292015-04-13 08:39:25 -0700404 AlsaSeqState alsa_seq_state_;
405 MidiPortState port_state_;
toyoshim@chromium.org4a8657c2014-02-06 11:23:09 +0000406
agoode@chromium.org25227512014-06-08 05:12:05 +0000407 // One input port, many output ports.
agoode99d63292015-04-13 08:39:25 -0700408 base::Lock out_ports_lock_; // guards out_ports_
agoodeb2ead822016-03-11 12:14:35 -0800409 OutPortMap out_ports_; // guarded by out_ports_lock_
agoode@chromium.org25227512014-06-08 05:12:05 +0000410
agoodebd4be9b2015-03-16 19:17:25 -0700411 // Mapping from ALSA client:port to our index.
agoode@chromium.org25227512014-06-08 05:12:05 +0000412 SourceMap source_map_;
413
agoodeb09423b2015-05-11 11:39:57 -0700414 // Mapping from card to devices.
415 AlsaCardMap alsa_cards_;
agoodeb09423b2015-05-11 11:39:57 -0700416
417 // This is the current count of midi devices across all cards we know
418 // about. When this number matches card_client_count_ in AlsaSeqState,
419 // we are safe to generate MIDIConnectionEvents. Otherwise we need to
420 // wait for our information from ALSA and udev to get back in sync.
agoode5a1aa112015-06-21 20:51:00 -0700421 int alsa_card_midi_count_ = 0;
agoodeb09423b2015-05-11 11:39:57 -0700422
agoodeb2ead822016-03-11 12:14:35 -0800423 base::Lock shutdown_lock_; // guards event_thread_shutdown_
424 bool event_thread_shutdown_ = false; // guarded by shutdown_lock_
425
426 // This lock is needed to ensure that members destroyed in Finalize
427 // will be visibly destroyed before the destructor is run in the
428 // other thread. Otherwise, the same objects may have their destructors
429 // run multiple times in different threads.
430 base::Lock lazy_init_member_lock_; // guards members below
431
432 // Members initialized in StartInitialization() are below.
433 // Make sure to destroy these in Finalize()!
434 scoped_ptr<base::ThreadChecker> initialization_thread_checker_;
435
436 // ALSA seq handles and ids.
437 ScopedSndSeqPtr in_client_;
438 int in_client_id_;
439 ScopedSndSeqPtr out_client_;
440 int out_client_id_;
441 int in_port_id_;
442
agoode99d63292015-04-13 08:39:25 -0700443 // ALSA event -> MIDI coder.
agoodeb2ead822016-03-11 12:14:35 -0800444 ScopedSndMidiEventPtr decoder_;
agoode@chromium.org25227512014-06-08 05:12:05 +0000445
agoode7de413f2015-04-24 00:13:39 -0700446 // udev, for querying hardware devices.
447 device::ScopedUdevPtr udev_;
agoode975043d2015-05-11 00:46:17 -0700448 device::ScopedUdevMonitorPtr udev_monitor_;
agoode7de413f2015-04-24 00:13:39 -0700449
agoodeb2ead822016-03-11 12:14:35 -0800450 // Threads for sending and receiving. These are initialized in the
451 // constructor, but are started at the end of StartInitialization.
toyoshim@chromium.org4a8657c2014-02-06 11:23:09 +0000452 base::Thread event_thread_;
agoodeb2ead822016-03-11 12:14:35 -0800453 base::Thread send_thread_;
toyoshim@chromium.org4a8657c2014-02-06 11:23:09 +0000454
toyoshim@chromium.orgc82e66e2014-02-04 07:05:47 +0000455 DISALLOW_COPY_AND_ASSIGN(MidiManagerAlsa);
toyoshim@chromium.orga97eebf2014-01-03 07:52:39 +0000456};
457
toyoshime147c5e2015-05-07 21:58:31 -0700458} // namespace midi
toyoshim@chromium.orga97eebf2014-01-03 07:52:39 +0000459} // namespace media
460
dnicoara@chromium.org9f2a6f02014-01-03 21:25:00 +0000461#endif // MEDIA_MIDI_MIDI_MANAGER_ALSA_H_