1
- From 80093f92d42d77f27de6b204550baf4622070732 Mon Sep 17 00:00:00 2001
1
+ From fb72b7575a091284a3e2bd0a955aa2c61a6f5bc4 Mon Sep 17 00:00:00 2001
2
2
From: Aditya Garg <
[email protected] >
3
- Date: Tue, 12 Sep 2023 12:26:12 +0530
3
+ Date: Thu, 14 Mar 2024 06:51:34 +0000
4
4
Subject: [PATCH] Add apple-bce driver
5
5
6
6
---
7
7
drivers/staging/apple-bce/Makefile | 28 +
8
8
drivers/staging/apple-bce/apple_bce.c | 443 ++++++++++
9
9
drivers/staging/apple-bce/apple_bce.h | 38 +
10
10
drivers/staging/apple-bce/audio/audio.c | 711 ++++++++++++++++
11
- drivers/staging/apple-bce/audio/audio.h | 123 +++
11
+ drivers/staging/apple-bce/audio/audio.h | 125 +++
12
12
drivers/staging/apple-bce/audio/description.h | 42 +
13
13
drivers/staging/apple-bce/audio/pcm.c | 308 +++++++
14
14
drivers/staging/apple-bce/audio/pcm.h | 16 +
@@ -26,10 +26,10 @@ Subject: [PATCH] Add apple-bce driver
26
26
drivers/staging/apple-bce/vhci/queue.c | 268 +++++++
27
27
drivers/staging/apple-bce/vhci/queue.h | 76 ++
28
28
drivers/staging/apple-bce/vhci/transfer.c | 661 +++++++++++++++
29
- drivers/staging/apple-bce/vhci/transfer.h | 71 ++
29
+ drivers/staging/apple-bce/vhci/transfer.h | 73 ++
30
30
drivers/staging/apple-bce/vhci/vhci.c | 759 ++++++++++++++++++
31
- drivers/staging/apple-bce/vhci/vhci.h | 48 ++
32
- 25 files changed, 5629 insertions(+)
31
+ drivers/staging/apple-bce/vhci/vhci.h | 52 ++
32
+ 25 files changed, 5637 insertions(+)
33
33
create mode 100644 drivers/staging/apple-bce/Makefile
34
34
create mode 100644 drivers/staging/apple-bce/apple_bce.c
35
35
create mode 100644 drivers/staging/apple-bce/apple_bce.h
@@ -1303,10 +1303,10 @@ index 000000000..bd16ddd16
1303
1303
+ MODULE_PARM_DESC(id, "ID string for Apple Internal Audio soundcard.");
1304
1304
diff --git a/drivers/staging/apple-bce/audio/audio.h b/drivers/staging/apple-bce/audio/audio.h
1305
1305
new file mode 100644
1306
- index 000000000..693006e93
1306
+ index 000000000..004bc1e22
1307
1307
--- /dev/null
1308
1308
+++ b/drivers/staging/apple-bce/audio/audio.h
1309
- @@ -0,0 +1,123 @@
1309
+ @@ -0,0 +1,125 @@
1310
1310
+ #ifndef AAUDIO_H
1311
1311
+ #define AAUDIO_H
1312
1312
+
@@ -1422,6 +1422,8 @@ index 000000000..693006e93
1422
1422
+ };
1423
1423
+
1424
1424
+ void aaudio_handle_notification(struct aaudio_device *a, struct aaudio_msg *msg);
1425
+ + void aaudio_handle_prop_change_work(struct work_struct *ws);
1426
+ + void aaudio_handle_cmd_timestamp(struct aaudio_device *a, struct aaudio_msg *msg);
1425
1427
+ void aaudio_handle_command(struct aaudio_device *a, struct aaudio_msg *msg);
1426
1428
+
1427
1429
+ int aaudio_module_init(void);
@@ -4946,10 +4948,10 @@ index 000000000..8226363d6
4946
4948
+ }
4947
4949
diff --git a/drivers/staging/apple-bce/vhci/transfer.h b/drivers/staging/apple-bce/vhci/transfer.h
4948
4950
new file mode 100644
4949
- index 000000000..6a62a00b2
4951
+ index 000000000..89ecad6bc
4950
4952
--- /dev/null
4951
4953
+++ b/drivers/staging/apple-bce/vhci/transfer.h
4952
- @@ -0,0 +1,71 @@
4954
+ @@ -0,0 +1,73 @@
4953
4955
+ #ifndef BCEDRIVER_TRANSFER_H
4954
4956
+ #define BCEDRIVER_TRANSFER_H
4955
4957
+
@@ -5013,6 +5015,8 @@ index 000000000..6a62a00b2
5013
5015
+ struct usb_host_endpoint *endp, bce_vhci_device_t dev_addr, enum dma_data_direction dir);
5014
5016
+ void bce_vhci_destroy_transfer_queue(struct bce_vhci *vhci, struct bce_vhci_transfer_queue *q);
5015
5017
+ void bce_vhci_transfer_queue_event(struct bce_vhci_transfer_queue *q, struct bce_vhci_message *msg);
5018
+ + int bce_vhci_transfer_queue_do_pause(struct bce_vhci_transfer_queue *q);
5019
+ + int bce_vhci_transfer_queue_do_resume(struct bce_vhci_transfer_queue *q);
5016
5020
+ int bce_vhci_transfer_queue_pause(struct bce_vhci_transfer_queue *q, enum bce_vhci_pause_source src);
5017
5021
+ int bce_vhci_transfer_queue_resume(struct bce_vhci_transfer_queue *q, enum bce_vhci_pause_source src);
5018
5022
+ void bce_vhci_transfer_queue_request_reset(struct bce_vhci_transfer_queue *q);
@@ -5023,7 +5027,7 @@ index 000000000..6a62a00b2
5023
5027
+ #endif //BCEDRIVER_TRANSFER_H
5024
5028
diff --git a/drivers/staging/apple-bce/vhci/vhci.c b/drivers/staging/apple-bce/vhci/vhci.c
5025
5029
new file mode 100644
5026
- index 000000000..053a9f39e
5030
+ index 000000000..eb26f5500
5027
5031
--- /dev/null
5028
5032
+++ b/drivers/staging/apple-bce/vhci/vhci.c
5029
5033
@@ -0,0 +1,759 @@
@@ -5269,7 +5273,7 @@ index 000000000..053a9f39e
5269
5273
+ return 0;
5270
5274
+ }
5271
5275
+
5272
- + static int bce_vhci_address_device(struct usb_hcd *hcd, struct usb_device *udev)
5276
+ + static int bce_vhci_address_device(struct usb_hcd *hcd, struct usb_device *udev, unsigned int timeout_ms) //TODO: follow timeout
5273
5277
+ {
5274
5278
+ /* This is the same as enable_device, but instead in the old scheme */
5275
5279
+ return bce_vhci_enable_device(hcd, udev);
@@ -5788,10 +5792,10 @@ index 000000000..053a9f39e
5788
5792
+ MODULE_PARM_DESC(vhci_port_mask, "Specifies which VHCI ports are enabled");
5789
5793
diff --git a/drivers/staging/apple-bce/vhci/vhci.h b/drivers/staging/apple-bce/vhci/vhci.h
5790
5794
new file mode 100644
5791
- index 000000000..90641d1ba
5795
+ index 000000000..6c2e22622
5792
5796
--- /dev/null
5793
5797
+++ b/drivers/staging/apple-bce/vhci/vhci.h
5794
- @@ -0,0 +1,48 @@
5798
+ @@ -0,0 +1,52 @@
5795
5799
+ #ifndef BCE_VHCI_H
5796
5800
+ #define BCE_VHCI_H
5797
5801
+
@@ -5838,8 +5842,12 @@ index 000000000..90641d1ba
5838
5842
+
5839
5843
+ int bce_vhci_create(struct apple_bce_device *dev, struct bce_vhci *vhci);
5840
5844
+ void bce_vhci_destroy(struct bce_vhci *vhci);
5845
+ + int bce_vhci_start(struct usb_hcd *hcd);
5846
+ + void bce_vhci_stop(struct usb_hcd *hcd);
5847
+ +
5848
+ + struct bce_vhci *bce_vhci_from_hcd(struct usb_hcd *hcd);
5841
5849
+
5842
5850
+ #endif //BCE_VHCI_H
5843
5851
- -
5844
- 2.39 .2
5852
+ 2.43 .2
5845
5853
0 commit comments