[pulseaudio-discuss] M-Audio FastTrack Pro

David Kågedal davidk at lysator.liu.se
Fri Jan 15 01:41:25 PST 2010


Lennart Poettering <lennart at poettering.net> writes:

> On Fri, 08.01.10 09:15, David Kågedal (davidk at lysator.liu.se) wrote:
>
>> >> > These two ultimately come from UDEV:
>> >> >
>> >> > udev_device_get_property_value(card, "ID_MODEL_FROM_DATABASE")
>> >> >  and
>> >> > udev_device_get_property_value(card, "ID_SERIAL")
>> >> >
>> >> > So I guess udev puts the underscores in.
>> >> 
>> >> Thank you. Finally a pointing finger.
>> >> 
>> >> So why is udev giving us a mangled name? And why is PA using that,
>> >> rather than using the information it obviously can get from the device?
>> >
>> > Because we trust udev. And we want to keep the bus-specific code in PA
>> > at a minimum.
>> 
>> That sounds sensible. And "udevadm info --path=/sys/bus/usb/devices/2-4.4
>> --query=property | grep ID_MODEL" does show the broken name (and there
>> is no ID_MODEL_FROM_DATABASE).
>> 
>> I guess I'll move my complaints to the udev people (or possibly the
>> Ubuntu people) and see what emerges.
>
> udev actually sets two props: ID_MODEL and ID_MODEL_ENC. The former
> has all special chars (including spaces) replaced by underscore. The
> latter has them escape in a \x20 like notation.
>
> I have now modified PA to use ID_MODEL_ENC and undo the encoding. You
> should now get the USB supplied names without underscores.

Wonderful! I didn't get any response to my question on linux-hotplug.

Have you seen any kind of documentation about these properties anywhere,
by the way?

-- 
David Kågedal




More information about the pulseaudio-discuss mailing list