diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2009-06-10 13:50:33 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-06-10 13:50:33 -0400 |
commit | 1f3fff7bda95b75a6be5a02c2a6902573d8c18e6 (patch) | |
tree | a70fe5dbd623d57e3144a1e7cc7d69c618fcaf5d /sound | |
parent | ad0b0822f98ef547e2461ce463e4233bad7848a8 (diff) |
ALSA: use card device as parent for jack input-devices
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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/jack.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/jack.c b/sound/core/jack.c index d54d1a05fe65..f705eec7372a 100644 --- a/sound/core/jack.c +++ b/sound/core/jack.c | |||
@@ -63,7 +63,7 @@ static int snd_jack_dev_register(struct snd_device *device) | |||
63 | 63 | ||
64 | /* Default to the sound card device. */ | 64 | /* Default to the sound card device. */ |
65 | if (!jack->input_dev->dev.parent) | 65 | if (!jack->input_dev->dev.parent) |
66 | jack->input_dev->dev.parent = card->dev; | 66 | jack->input_dev->dev.parent = snd_card_get_device_link(card); |
67 | 67 | ||
68 | err = input_register_device(jack->input_dev); | 68 | err = input_register_device(jack->input_dev); |
69 | if (err == 0) | 69 | if (err == 0) |