User Tools

Site Tools


persistent_sound_interface

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
persistent_sound_interface [2023/06/10 21:51] – created 2e0sippersistent_sound_interface [2023/07/05 17:47] (current) – Added transceiver static device name text mi7emg
Line 45: Line 45:
 SUBSYSTEM!="sound", GOTO="alsa_naming_end" SUBSYSTEM!="sound", GOTO="alsa_naming_end"
 ACTION!="add", GOTO="alsa_naming_end" ACTION!="add", GOTO="alsa_naming_end"
-DEVPATH=="/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/sound/card?", ATTR{id}="MyCard1"+DEVPATH=="/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/sound/card?", ATTR{id}="USBSND1"
 LABEL="alsa_naming_end" LABEL="alsa_naming_end"
 </code> </code>
  
  
-The next time you plug it in, ALSA will refer to it as ''%%CARD=MyCard1,DEV=0%%''+Your Sound Interface should now be available as ''%%CARD=USBSND1,DEV=0%%'' next time its plugged in or the system is restarted. 
 + 
 +Note you can repeat the process for additional sound interfaces, just add the additional lines above the alsa_naming_end label. 
  
 ===== HID Device Names ===== ===== HID Device Names =====
Line 71: Line 74:
 </code> </code>
  
-Edit ''%%/etc/udev/rules.d/94-static-hid-name.rules%%'' +For the example above the bit we're interested in is: 
 + 
 +  /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.3/ 
 + 
 +Edit ''%%/etc/udev/rules.d/94-static-hid-name.rules%%'' and add rules to create symlinks for the HID device. Update the DEVPATH to match your own system. Note the * is used as a wildcard: 
 + 
 +  SUBSYSTEM=="hidraw", DEVPATH=="/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.3/*", SYMLINK+="USBPTT1" 
 + 
 +Your HID device should now be available as ''%%/dev/USBPTT1%%'' next time its plugged in or the system is restarted. 
 + 
 +Note you can repeat the process for additional HID Devices, just add them to the existing rules file. 
 + 
 +===== Transceiver Device Names ===== 
 + 
 +If your radio can be controlled and provide audio through a USB <-> USB connection, you may find that turning the radio off and on results in the Linux device names changing from ''ttyUSB0 & ttyUSB1'' to ''ttyUSB1 & ttyUSB2'', which means either restarting the PC, or changing the software to use the new device names. 
 + 
 +First, check for the Vendor and Product id's by running ''lsusb'' In the screenshot below, the Icom IC-7100 shows as "Silicon Labs CP210x UART Bridge" for two different devices.  They both show the same Vendor (10c4) and Product (ea60) id's, so that can't be used to separate them. 
 + 
 +{{:udev-persistent-devices:lsusb-check-ids.png?direct|}} 
 + 
 + 
 +Next, check the device serial numbers, changing ttyUSB1 and ttyUSB2 in the example below to match your current device names. 
 +{{:udev-persistent-devices:udev-check-serial.png?direct|}} 
 + 
 +In the example, both the USB devices that are provided by the radio have different Serial Numbers, making it easy to separate them and assign individual, static names.
  
 +Edit /etc/udev/rules.d/99-static-radio-name.rules and add rules to create symlinks for the devices:
 +<code>KERNEL=="ttyUSB*", ATTRS{serial}=="IC-7100 03008872 A", SYMLINK+="icom7100-a" 
 +KERNEL=="ttyUSB*", ATTRS{serial}=="IC-7100 03008872 B", SYMLINK+="icom7100-b"</code>
  
 +You can then use ''/dev/icom7100-a'' instead of /dev/ttyUSB0 when configuring programs.
  
persistent_sound_interface.1686433917.txt.gz · Last modified: 2023/06/10 21:51 by 2e0sip