From: Michael Forney <mforney@mforney.org>
To: 9front@9front.org
Subject: [9front] [PATCH 2/5] nusb/audio: remove code for bi-directional endpoint
Date: Fri, 18 Nov 2022 09:11:49 +0000 [thread overview]
Message-ID: <902cf116d7f64dc00d58b71f97a9beb1a1c8da41.1668828454.git.mforney@mforney.org> (raw)
In-Reply-To: <cover.1668828454.git.mforney@mforney.org>
Isochronous endpoints are never bi-directional.
---
sys/src/cmd/nusb/audio/audio.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/sys/src/cmd/nusb/audio/audio.c b/sys/src/cmd/nusb/audio/audio.c
index 4018352022..66e77da713 100644
--- a/sys/src/cmd/nusb/audio/audio.c
+++ b/sys/src/cmd/nusb/audio/audio.c
@@ -103,7 +103,7 @@ setupep(Dev *d, Ep *e, int speed)
Range *f;
for(;e != nil; e = e->next){
- if(e->dir!=dir && e->dir!=Eboth)
+ if(e->dir!=dir)
continue;
c = e->iface->aux;
if(c == nil)
@@ -177,7 +177,7 @@ Setup:
return;
}
closedev(d);
- if(audioepin != nil && audioepin != audioepout)
+ if(audioepin != nil)
if(d = setupep(audiodev, audioepin, speed))
closedev(d);
audiofreq = speed;
@@ -243,14 +243,6 @@ main(int argc, char *argv[])
continue;
audioepout = e;
break;
- case Eboth:
- if(audioepin != nil && audioepout != nil)
- continue;
- if(audioepin == nil)
- audioepin = e;
- if(audioepout == nil)
- audioepout = e;
- break;
}
if((ed = setupep(audiodev, e, audiofreq)) == nil){
fprint(2, "setupep: %r\n");
--
2.37.3
next prev parent reply other threads:[~2022-11-19 3:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-19 3:27 [9front] [PATCH 0/5] USB audio 2.0 Michael Forney
2022-11-18 9:11 ` [9front] [PATCH 1/5] nusb: move audio-specific requests to nusb/audio Michael Forney
2022-11-18 9:11 ` Michael Forney [this message]
2022-11-18 9:11 ` [9front] [PATCH 3/5] nusb/audio: only consider data endpoints when setting up stream Michael Forney
2022-11-18 9:21 ` [9front] [PATCH 4/5] nusb/audio: enumerate streams through control interface Michael Forney
2022-11-18 20:35 ` [9front] [PATCH 5/5] nusb/audio: add support for USB audio 2.0 Michael Forney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=902cf116d7f64dc00d58b71f97a9beb1a1c8da41.1668828454.git.mforney@mforney.org \
--to=mforney@mforney.org \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).