linux:linux
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| linux:linux [2017/06/07 13:54] – created cipibad | linux:linux [2017/06/07 14:22] (current) – cipibad | ||
|---|---|---|---|
| Line 16: | Line 16: | ||
| </ | </ | ||
| - | ====== usb headphone ====== | + | ====== usb headphone |
| - find device | - find device | ||
| - | '' | + | < |
| + | $ find /dev | grep -i jabra | grep snd / | ||
| + | |||
| + | </ | ||
| - find attributes | - find attributes | ||
| + | < | ||
| + | $ udevadm info -a -n / | ||
| + | Udevadm info starts with the device specified by the devpath and then | ||
| + | walks up the chain of parent devices. It prints for every device | ||
| + | found, all possible attributes in the udev rules key format. | ||
| + | A rule to match, can be composed by the attributes of the device | ||
| + | and the attributes from one single parent device. | ||
| + | |||
| + | looking at device '/ | ||
| + | : | ||
| + | KERNEL==" | ||
| + | SUBSYSTEM==" | ||
| + | DRIVER=="" | ||
| + | |||
| + | looking at parent device '/ | ||
| + | |||
| + | KERNELS==" | ||
| + | SUBSYSTEMS==" | ||
| + | DRIVERS=="" | ||
| + | ATTRS{id}==" | ||
| + | ATTRS{number}==" | ||
| + | |||
| + | looking at parent device '/ | ||
| + | KERNELS==" | ||
| + | SUBSYSTEMS==" | ||
| + | DRIVERS==" | ||
| + | ATTRS{authorized}==" | ||
| + | ATTRS{bAlternateSetting}==" | ||
| + | ATTRS{bInterfaceClass}==" | ||
| + | ATTRS{bInterfaceNumber}==" | ||
| + | ATTRS{bInterfaceProtocol}==" | ||
| + | ATTRS{bInterfaceSubClass}==" | ||
| + | ATTRS{bNumEndpoints}==" | ||
| + | ATTRS{supports_autosuspend}==" | ||
| + | |||
| + | looking at parent device '/ | ||
| + | KERNELS==" | ||
| + | SUBSYSTEMS==" | ||
| + | DRIVERS==" | ||
| + | ATTRS{authorized}==" | ||
| + | ATTRS{avoid_reset_quirk}==" | ||
| + | ATTRS{bConfigurationValue}==" | ||
| + | ATTRS{bDeviceClass}==" | ||
| + | ATTRS{bDeviceProtocol}==" | ||
| + | ATTRS{bDeviceSubClass}==" | ||
| + | ATTRS{bMaxPacketSize0}==" | ||
| + | ATTRS{bMaxPower}==" | ||
| + | ATTRS{bNumConfigurations}==" | ||
| + | ATTRS{bNumInterfaces}==" | ||
| + | ATTRS{bcdDevice}==" | ||
| + | ATTRS{bmAttributes}==" | ||
| + | ATTRS{busnum}==" | ||
| + | ATTRS{configuration}=="" | ||
| + | ATTRS{devnum}==" | ||
| + | ATTRS{devpath}==" | ||
| + | ATTRS{idProduct}==" | ||
| + | ATTRS{idVendor}==" | ||
| + | ATTRS{ltm_capable}==" | ||
| + | ATTRS{manufacturer}==" | ||
| + | ATTRS{maxchild}==" | ||
| + | ATTRS{product}==" | ||
| + | ATTRS{quirks}==" | ||
| + | ATTRS{removable}==" | ||
| + | ATTRS{serial}==" | ||
| + | ATTRS{speed}==" | ||
| + | ATTRS{urbnum}==" | ||
| + | ATTRS{version}==" | ||
| + | |||
| + | ..... | ||
| + | </ | ||
| + | - create udev rules file (''/ | ||
| + | **ionescu** with your username) | ||
| + | < | ||
| + | KERNEL==" | ||
| + | / | ||
| + | </ | ||
| + | - create / | ||
| + | < | ||
| + | #!/bin/sh | ||
| + | |||
| + | / | ||
| + | </ | ||
| + | - create / | ||
| + | < | ||
| + | #!/bin/sh | ||
| + | |||
| + | PULSE_SERVER=" | ||
| + | |||
| + | SINK_NAME=" | ||
| + | |||
| + | SINK_LIST_CMD=" | ||
| + | |||
| + | nSinks=`$SINK_LIST_CMD | grep "Name: $SINK_NAME" | ||
| + | tries=0 | ||
| + | MAX_TRIES=10 | ||
| + | |||
| + | while [ $nSinks -ne 1 -a $tries -lt $MAX_TRIES ]; do | ||
| + | nSinks=`$SINK_LIST_CMD | grep "Name: $SINK_NAME" | ||
| + | tries=$((tries+1)) | ||
| + | sleep 1 | ||
| + | done | ||
| + | |||
| + | pactl --server " | ||
| + | .analog-stereo | ||
| + | </ | ||
| + | - make the two new files executable | ||
| + | < | ||
| + | $ chmod +x / | ||
| + | </ | ||
| + | - double check and adapt to your environment (username/ | ||
linux/linux.1496843652.txt.gz · Last modified: by cipibad
