Skip to content

Commit 484eb9e

Browse files
committed
soundwire: allow BPT and audio stream run simultaneously
Now the SoundWire BPT stream and the audio stream can share the SoundWire bus bandwidth. However, it is still not allowed to have more than 1 BPT stream running simultaneously. Signed-off-by: Bard Liao <[email protected]>
1 parent 41cd6cf commit 484eb9e

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

drivers/soundwire/stream.c

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,18 +1237,10 @@ static struct sdw_master_runtime
12371237
struct sdw_master_runtime *m_rt, *walk_m_rt;
12381238
struct list_head *insert_after;
12391239

1240-
if (stream->type == SDW_STREAM_BPT) {
1241-
if (bus->stream_refcount > 0 || bus->bpt_stream_refcount > 0) {
1242-
dev_err(bus->dev, "%s: %d/%d audio/BPT stream already allocated\n",
1243-
__func__, bus->stream_refcount, bus->bpt_stream_refcount);
1244-
return ERR_PTR(-EBUSY);
1245-
}
1246-
} else {
1247-
if (bus->bpt_stream_refcount > 0) {
1248-
dev_err(bus->dev, "%s: BPT stream already allocated\n",
1249-
__func__);
1250-
return ERR_PTR(-EAGAIN);
1251-
}
1240+
if (stream->type == SDW_STREAM_BPT && bus->bpt_stream_refcount > 0) {
1241+
dev_err(bus->dev, "%s: BPT stream already allocated\n",
1242+
__func__);
1243+
return ERR_PTR(-EAGAIN);
12521244
}
12531245

12541246
m_rt = kzalloc(sizeof(*m_rt), GFP_KERNEL);

0 commit comments

Comments
 (0)