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 * Returns: 19 * A pointer to the newly created iodev if successful, NULL otherwise. 20 */ 21 struct cras_iodev *empty_iodev_create(enum CRAS_STREAM_DIRECTION direction); 22 23 /* Destroys an empty_iodev created with empty_iodev_create. */ 24 void empty_iodev_destroy(struct cras_iodev *iodev); 25 26 #endif /* CRAS_EMPTY_IO_H_ */ 27