1 /* Copyright (c) 2012 The Chromium OS 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  */
5 
6 #ifndef CRAS_EMPTY_IO_H_
7 #define CRAS_EMPTY_IO_H_
8 
9 #include "cras_types.h"
10 
11 struct cras_iodev;
12 
13 /* Initializes an empty iodev.  Empty iodevs are used when there are no other
14  * iodevs available.  They give the attached streams a temporary place to live
15  * until a new iodev becomes available.
16  * Args:
17  *    direciton - input or output.
18  *    node_type - the default node type.
19  * Returns:
20  *    A pointer to the newly created iodev if successful, NULL otherwise.
21  */
22 struct cras_iodev *empty_iodev_create(enum CRAS_STREAM_DIRECTION direction,
23 				      enum CRAS_NODE_TYPE node_type);
24 
25 /* Destroys an empty_iodev created with empty_iodev_create. */
26 void empty_iodev_destroy(struct cras_iodev *iodev);
27 
28 #endif /* CRAS_EMPTY_IO_H_ */
29