Skip to content

Commit

Permalink
ALSA: use card device as parent for jack input-devices
Browse files Browse the repository at this point in the history
This moves the jack devices from the PCI device into the ALSA card device, which
makes it easier for userspace to find all devices belonging to a specific card
while granting access to logged-in users.

Jack input devices from sound cards can now simply be matched with udev by doing:
  SUBSYSTEM="input", SUBSYSTEMS="sound", ...

 ls -l /sys/devices/pci0000:00/0000:00:1b.0/sound/card0
 controlC0
 device -> ../../../0000:00:1b.0
 id
 input10
 input11
 input8
 input9
 number
 pcmC0D0c
 pcmC0D0p
 pcmC0D1p
 power
 subsystem -> ../../../../../class/sound
 uevent

Cc: Lennart Poettering <lennart@0pointer.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Kay Sievers authored and Takashi Iwai committed Jun 10, 2009
1 parent ad0b082 commit 1f3fff7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/core/jack.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ static int snd_jack_dev_register(struct snd_device *device)

/* Default to the sound card device. */
if (!jack->input_dev->dev.parent)
jack->input_dev->dev.parent = card->dev;
jack->input_dev->dev.parent = snd_card_get_device_link(card);

err = input_register_device(jack->input_dev);
if (err == 0)
Expand Down

0 comments on commit 1f3fff7

Please sign in to comment.