shithub: riscv

Download patch

ref: d263e43424c90198f5ed8b84a381bf86f3dccbe5
parent: 6b5f6b9a739a8b7cf73c129f8723c66a0cda2837
author: Michael Forney <mforney@mforney.org>
date: Fri Nov 18 04:11:49 EST 2022

nusb/audio: remove code for bi-directional endpoint

Isochronous endpoints are never bi-directional.

--- a/sys/src/cmd/nusb/audio/audio.c
+++ b/sys/src/cmd/nusb/audio/audio.c
@@ -103,7 +103,7 @@
 	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 @@
 			return;
 		}
 		closedev(d);
-		if(audioepin != nil && audioepin != audioepout)
+		if(audioepin != nil)
 			if(d = setupep(audiodev, audioepin, speed))
 				closedev(d);
 		audiofreq = speed;
@@ -242,14 +242,6 @@
 				if(audioepout != nil)
 					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){