[systemd-devel] [PATCH 2/2] Add more firewire properties for sound, to be closer to USB and PCI

Adam Goode agoode at google.com
Mon Apr 20 12:18:58 PDT 2015


On Mon, Apr 20, 2015 at 2:04 PM, Lennart Poettering <lennart at poettering.net>
wrote:

> On Fri, 10.04.15 22:27, Adam Goode (agoode at google.com) wrote:
>
> > USB and PCI soundcards have a nice set of ID_* properties. It would
> > be handy for firewire soundcards to have the same.
> > ---
> >  rules/78-sound-card.rules | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/rules/78-sound-card.rules b/rules/78-sound-card.rules
> > index bd7a994..e529f70 100644
> > --- a/rules/78-sound-card.rules
> > +++ b/rules/78-sound-card.rules
> > @@ -41,9 +41,10 @@ IMPORT{builtin}="hwdb"
> >  SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id"
> >  SUBSYSTEMS=="usb", GOTO="skip_pci"
> >
> > -SUBSYSTEMS=="firewire", ATTRS{vendor_name}=="?*",
> ATTRS{model_name}=="?*", \
> > -  ENV{ID_BUS}="firewire", ENV{ID_VENDOR}="$attr{vendor_name}",
> ENV{ID_MODEL}="$attr{model_name}"
> > -SUBSYSTEMS=="firewire", ATTRS{guid}=="?*",
> ENV{ID_ID}="firewire-$attr{guid}"
> > +SUBSYSTEMS=="firewire", ATTRS{guid}=="?*", \
> > +  ENV{ID_BUS}="firewire", ENV{ID_SERIAL}="$attr{guid}",
> ENV{ID_SERIAL_SHORT}="$attr{guid}", \
> > +  ENV{ID_VENDOR_ID}="$attr{vendor}", ENV{ID_MODEL_ID}="$attr{model}", \
> > +  ENV{ID_VENDOR}="$attr{vendor_name}", ENV{ID_MODEL}="$attr{model_name}"
>
> You appear to be removing setting of ID_ID here. Is that intended?
>
>
> I can document with a comment, but by defining ID_SERIAL we get the
fallthrough to this line below which does what we want (once patch #1 is
submitted removing $attr{id}):

ENV{ID_SERIAL}=="?*", ENV{ID_USB_INTERFACE_NUM}=="",
ENV{ID_ID}="$env{ID_BUS}-$env{ID_SERIAL}"



Thanks,

Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150420/63218459/attachment.html>


More information about the systemd-devel mailing list