Skip to content

Commit

Permalink
feat: add aic_btusb module
Browse files Browse the repository at this point in the history
Signed-off-by: ZHANG Yuntian <[email protected]>
  • Loading branch information
RadxaYuntian committed Apr 3, 2024
1 parent 45f66f3 commit d2f9ce5
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
8 changes: 7 additions & 1 deletion debian/aic8800-usb-dkms.dkms
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ PACKAGE_VARIANT="usb"
PACKAGE_NAME="aic8800-usb"
PACKAGE_VERSION="#MODULE_VERSION#"
CLEAN="make clean"
MAKE[0]="make -C $kernel_source_dir M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build/USB/driver_fw/drivers/aic8800"
MAKE[0]="make -C $kernel_source_dir M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build/USB/driver_fw/drivers/aic8800 &&
make -C $kernel_source_dir M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build/USB/driver_fw/drivers/aic_btusb"

BUILT_MODULE_NAME[0]="aic_load_fw"
DEST_MODULE_NAME[0]="${BUILT_MODULE_NAME[0]}_$PACKAGE_VARIANT"
Expand All @@ -14,4 +15,9 @@ DEST_MODULE_NAME[1]="${BUILT_MODULE_NAME[1]}_$PACKAGE_VARIANT"
BUILT_MODULE_LOCATION[1]="USB/driver_fw/drivers/aic8800/aic8800_fdrv"
DEST_MODULE_LOCATION[1]="/updates/dkms"

BUILT_MODULE_NAME[2]="aic_btusb"
DEST_MODULE_NAME[2]="${BUILT_MODULE_NAME[2]}_$PACKAGE_VARIANT"
BUILT_MODULE_LOCATION[2]="USB/driver_fw/drivers/aic_btusb"
DEST_MODULE_LOCATION[2]="/updates/dkms"

AUTOINSTALL=yes
35 changes: 35 additions & 0 deletions debian/patches/fix-aic_btusb.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
diff --git a/src/USB/driver_fw/drivers/aic_btusb/aic_btusb.c b/src/USB/driver_fw/drivers/aic_btusb/aic_btusb.c
index 1fad30f..a69ed8a 100644
--- a/src/USB/driver_fw/drivers/aic_btusb/aic_btusb.c
+++ b/src/USB/driver_fw/drivers/aic_btusb/aic_btusb.c
@@ -1409,6 +1409,7 @@ static long btchr_ioctl(struct file *file_p,unsigned int cmd, unsigned long arg)
return 1;
case DWFW_CMPLT:
AICBT_INFO(" btchr_ioctl DWFW_CMPLT");
+ __attribute__((__fallthrough__));
#if 1
case SET_ISO_CFG:
AICBT_INFO("btchr_ioctl SET_ISO_CFG");
@@ -1418,6 +1419,7 @@ static long btchr_ioctl(struct file *file_p,unsigned int cmd, unsigned long arg)
//hdev->voice_setting = *(uint16_t*)arg;
AICBT_INFO(" voice settings = %d", hdev->voice_setting);
//return 1;
+ __attribute__((__fallthrough__));
#endif
case GET_USB_INFO:
//ret = download_patch(fw_info,1);
@@ -1446,14 +1448,6 @@ static long btchr_ioctl(struct file *file_p,unsigned int cmd, unsigned long arg)

}

-#ifdef CONFIG_PLATFORM_UBUNTU//AIDEN
-typedef u32 compat_uptr_t;
-static inline void __user *compat_ptr(compat_uptr_t uptr)
-{
- return (void __user *)(unsigned long)uptr;
-}
-#endif
-
#ifdef CONFIG_COMPAT
static long compat_btchr_ioctl (struct file *filp, unsigned int cmd, unsigned long arg)
{
1 change: 1 addition & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ fix-pcie-build.patch
fix-pcie-firmware-path.patch
fix-usb-firmware-path.patch
fix-linux-6.1-build.patch
fix-aic_btusb.patch

0 comments on commit d2f9ce5

Please sign in to comment.