I have a bare piCore installation with USB and sound drivers copied from the rpi kernel. My end goal is a stereo that plays back audio passed to it through the USB interface out of a HiFiBerry amplifier. I've gotten to the point of having the 'UAC2Gadget' playback and capture devices visible via aplay and arecord, but neither my MacBook nor iPhone recognizes it as a device, let alone a UAC2 device.
This is the script I use to start the device:
This is the script I use to start the device:
Code:
#!/bin/shGADGET_NAME='audio'UAC2_FUNCTION_NAME='usb0'LANGUAGE_ID=0x409 # English, United StatesVENDOR_ID=0x0101 # Linux Foundation PRODUCT_ID=0x1d6b # Audio GadgetSERIAL_STRING='00001'MANUFACTURER_STRING='etzabo'PRODUCT_STRING='Tacobox'mount -t configfs none /sys/kernel/configmodprobe libcomposite# Create gadget:cd /sys/kernel/config/usb_gadget/mkdir -p $GADGET_NAMEcd $GADGET_NAMEecho $VENDOR_ID > idVendorecho $PRODUCT_ID > idProductecho 0x03066 > bcdDeviceecho 0x0200 > bcdUSB # USB 2.0echo 0x02 > bDeviceClassecho 0x00 > bDeviceSubClassmkdir -p strings/$LANGUAGE_IDecho $SERIAL_STRING > strings/$LANGUAGE_ID/serialnumberecho $MANUFACTURER_STRING > strings/$LANGUAGE_ID/manufacturerecho $PRODUCT_STRING > strings/$LANGUAGE_ID/productmkdir -p configs/c.1/strings/$LANGUAGE_IDecho 'Audio Player' > configs/c.1/strings/$LANGUAGE_ID/configurationecho 250 > configs/c.1/MaxPower# UAC2 Gadgetmkdir -p functions/uac2.$UAC2_FUNCTION_NAMEln -s functions/uac2.$UAC2_FUNCTION_NAME configs/c.1ls /sys/class/udc > UDC
Statistics: Posted by etzabo — Tue Feb 25, 2025 5:14 am — Replies 0 — Views 43