summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/firewire/amdtp.c4
-rw-r--r--sound/firewire/amdtp.h7
-rw-r--r--sound/firewire/dice.c2
-rw-r--r--sound/firewire/speakers.c3
4 files changed, 13 insertions, 3 deletions
diff --git a/sound/firewire/amdtp.c b/sound/firewire/amdtp.c
index 38013f918869..95c5a1515dad 100644
--- a/sound/firewire/amdtp.c
+++ b/sound/firewire/amdtp.c
@@ -53,12 +53,14 @@ static void pcm_period_tasklet(unsigned long data);
* amdtp_stream_init - initialize an AMDTP stream structure
* @s: the AMDTP stream to initialize
* @unit: the target of the stream
+ * @dir: the direction of stream
* @flags: the packet transmission method to use
*/
int amdtp_stream_init(struct amdtp_stream *s, struct fw_unit *unit,
- enum cip_flags flags)
+ enum amdtp_stream_direction dir, enum cip_flags flags)
{
s->unit = fw_unit_get(unit);
+ s->direction = dir;
s->flags = flags;
s->context = ERR_PTR(-1);
mutex_init(&s->mutex);
diff --git a/sound/firewire/amdtp.h b/sound/firewire/amdtp.h
index 60028c7fc144..019134edb9f7 100644
--- a/sound/firewire/amdtp.h
+++ b/sound/firewire/amdtp.h
@@ -48,9 +48,15 @@ struct fw_unit;
struct fw_iso_context;
struct snd_pcm_substream;
+enum amdtp_stream_direction {
+ AMDTP_OUT_STREAM = 0,
+ AMDTP_IN_STREAM
+};
+
struct amdtp_stream {
struct fw_unit *unit;
enum cip_flags flags;
+ enum amdtp_stream_direction direction;
struct fw_iso_context *context;
struct mutex mutex;
@@ -85,6 +91,7 @@ struct amdtp_stream {
};
int amdtp_stream_init(struct amdtp_stream *s, struct fw_unit *unit,
+ enum amdtp_stream_direction dir,
enum cip_flags flags);
void amdtp_stream_destroy(struct amdtp_stream *s);
diff --git a/sound/firewire/dice.c b/sound/firewire/dice.c
index ca12fcbc65ec..26b2158f87d1 100644
--- a/sound/firewire/dice.c
+++ b/sound/firewire/dice.c
@@ -1360,7 +1360,7 @@ static int dice_probe(struct fw_unit *unit, const struct ieee1394_device_id *id)
goto err_owner;
dice->resources.channels_mask = 0x00000000ffffffffuLL;
- err = amdtp_stream_init(&dice->stream, unit,
+ err = amdtp_stream_init(&dice->stream, unit, AMDTP_OUT_STREAM,
CIP_BLOCKING | CIP_HI_DUALWIRE);
if (err < 0)
goto err_resources;
diff --git a/sound/firewire/speakers.c b/sound/firewire/speakers.c
index 2096ad7fd469..c07e7cd154f2 100644
--- a/sound/firewire/speakers.c
+++ b/sound/firewire/speakers.c
@@ -683,7 +683,8 @@ static int fwspk_probe(struct fw_unit *unit,
if (err < 0)
goto err_unit;
- err = amdtp_stream_init(&fwspk->stream, unit, CIP_NONBLOCKING);
+ err = amdtp_stream_init(&fwspk->stream, unit, AMDTP_OUT_STREAM,
+ CIP_NONBLOCKING);
if (err < 0)
goto err_connection;