sound/usb: call usb_autopm_get_interface() for devices that should not
authorJonathan Bell <jonathan@raspberrypi.com>
Fri, 16 Apr 2021 10:40:23 +0000 (11:40 +0100)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Fri, 16 Apr 2021 14:08:38 +0000 (15:08 +0100)
commit69742473e63108cd606210f57603ac35708950d4
tree7e4154b877e3f2b89a9827a6622b8771a99e45cd
parentf8e746de0a35ac19b9e4684cda4f3c244bc86694
sound/usb: call usb_autopm_get_interface() for devices that should not
be suspended

Webcams with microphones are composite devices, and autosuspend is set
at the device level. If uvcvideo is probed after snd-usb-audio, the effect
of the quirk applied by snd-usb-audio is undone by uvcvideo's global
application of autosuspend.

Incrementing the interface's PM refcount in such cases prevents runtime PM
from happening, thus the device is left active.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
sound/usb/quirks.c