| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * oxfw.h - a part of driver for OXFW970/971 based devices |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) Clemens Ladisch <clemens@ladisch.de> |
|---|
| 5 | | - * Licensed under the terms of the GNU General Public License, version 2. |
|---|
| 6 | 6 | */ |
|---|
| 7 | 7 | |
|---|
| 8 | 8 | #include <linux/device.h> |
|---|
| .. | .. |
|---|
| 45 | 45 | |
|---|
| 46 | 46 | bool wrong_dbs; |
|---|
| 47 | 47 | bool has_output; |
|---|
| 48 | + bool has_input; |
|---|
| 48 | 49 | u8 *tx_stream_formats[SND_OXFW_STREAM_FORMAT_ENTRIES]; |
|---|
| 49 | 50 | u8 *rx_stream_formats[SND_OXFW_STREAM_FORMAT_ENTRIES]; |
|---|
| 50 | 51 | bool assumed; |
|---|
| .. | .. |
|---|
| 52 | 53 | struct cmp_connection in_conn; |
|---|
| 53 | 54 | struct amdtp_stream tx_stream; |
|---|
| 54 | 55 | struct amdtp_stream rx_stream; |
|---|
| 55 | | - unsigned int capture_substreams; |
|---|
| 56 | | - unsigned int playback_substreams; |
|---|
| 56 | + unsigned int substreams_count; |
|---|
| 57 | 57 | |
|---|
| 58 | 58 | unsigned int midi_input_ports; |
|---|
| 59 | 59 | unsigned int midi_output_ports; |
|---|
| .. | .. |
|---|
| 64 | 64 | |
|---|
| 65 | 65 | const struct ieee1394_device_id *entry; |
|---|
| 66 | 66 | void *spec; |
|---|
| 67 | + |
|---|
| 68 | + struct amdtp_domain domain; |
|---|
| 67 | 69 | }; |
|---|
| 68 | 70 | |
|---|
| 69 | 71 | /* |
|---|
| .. | .. |
|---|
| 99 | 101 | enum avc_general_plug_dir dir, |
|---|
| 100 | 102 | unsigned short pid); |
|---|
| 101 | 103 | |
|---|
| 102 | | -int snd_oxfw_stream_init_simplex(struct snd_oxfw *oxfw, |
|---|
| 103 | | - struct amdtp_stream *stream); |
|---|
| 104 | | -int snd_oxfw_stream_start_simplex(struct snd_oxfw *oxfw, |
|---|
| 105 | | - struct amdtp_stream *stream, |
|---|
| 106 | | - unsigned int rate, unsigned int pcm_channels); |
|---|
| 107 | | -void snd_oxfw_stream_stop_simplex(struct snd_oxfw *oxfw, |
|---|
| 108 | | - struct amdtp_stream *stream); |
|---|
| 109 | | -void snd_oxfw_stream_destroy_simplex(struct snd_oxfw *oxfw, |
|---|
| 110 | | - struct amdtp_stream *stream); |
|---|
| 111 | | -void snd_oxfw_stream_update_simplex(struct snd_oxfw *oxfw, |
|---|
| 112 | | - struct amdtp_stream *stream); |
|---|
| 104 | +int snd_oxfw_stream_init_duplex(struct snd_oxfw *oxfw); |
|---|
| 105 | +int snd_oxfw_stream_reserve_duplex(struct snd_oxfw *oxfw, |
|---|
| 106 | + struct amdtp_stream *stream, |
|---|
| 107 | + unsigned int rate, unsigned int pcm_channels, |
|---|
| 108 | + unsigned int frames_per_period, |
|---|
| 109 | + unsigned int frames_per_buffer); |
|---|
| 110 | +int snd_oxfw_stream_start_duplex(struct snd_oxfw *oxfw); |
|---|
| 111 | +void snd_oxfw_stream_stop_duplex(struct snd_oxfw *oxfw); |
|---|
| 112 | +void snd_oxfw_stream_destroy_duplex(struct snd_oxfw *oxfw); |
|---|
| 113 | +void snd_oxfw_stream_update_duplex(struct snd_oxfw *oxfw); |
|---|
| 113 | 114 | |
|---|
| 114 | 115 | struct snd_oxfw_stream_formation { |
|---|
| 115 | 116 | unsigned int rate; |
|---|