mixer.c (27988c96687667e74df1a9a3b8662519bc1c29c9) mixer.c (9e4d5c1be21f0c00e747e92186784f3298309b3e)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * (Tentative) USB Audio Driver for ALSA
4 *
5 * Mixer control part
6 *
7 * Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de>
8 *

--- 3495 unchanged lines hidden (view full) ---

3504void snd_usb_mixer_disconnect(struct usb_mixer_interface *mixer)
3505{
3506 if (mixer->disconnected)
3507 return;
3508 if (mixer->urb)
3509 usb_kill_urb(mixer->urb);
3510 if (mixer->rc_urb)
3511 usb_kill_urb(mixer->rc_urb);
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * (Tentative) USB Audio Driver for ALSA
4 *
5 * Mixer control part
6 *
7 * Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de>
8 *

--- 3495 unchanged lines hidden (view full) ---

3504void snd_usb_mixer_disconnect(struct usb_mixer_interface *mixer)
3505{
3506 if (mixer->disconnected)
3507 return;
3508 if (mixer->urb)
3509 usb_kill_urb(mixer->urb);
3510 if (mixer->rc_urb)
3511 usb_kill_urb(mixer->rc_urb);
3512 if (mixer->private_free)
3513 mixer->private_free(mixer);
3512 mixer->disconnected = true;
3513}
3514
3515#ifdef CONFIG_PM
3516/* stop any bus activity of a mixer */
3517static void snd_usb_mixer_inactivate(struct usb_mixer_interface *mixer)
3518{
3519 usb_kill_urb(mixer->urb);

--- 11 unchanged lines hidden (view full) ---

3531 }
3532
3533 return 0;
3534}
3535
3536int snd_usb_mixer_suspend(struct usb_mixer_interface *mixer)
3537{
3538 snd_usb_mixer_inactivate(mixer);
3514 mixer->disconnected = true;
3515}
3516
3517#ifdef CONFIG_PM
3518/* stop any bus activity of a mixer */
3519static void snd_usb_mixer_inactivate(struct usb_mixer_interface *mixer)
3520{
3521 usb_kill_urb(mixer->urb);

--- 11 unchanged lines hidden (view full) ---

3533 }
3534
3535 return 0;
3536}
3537
3538int snd_usb_mixer_suspend(struct usb_mixer_interface *mixer)
3539{
3540 snd_usb_mixer_inactivate(mixer);
3541 if (mixer->private_suspend)
3542 mixer->private_suspend(mixer);
3539 return 0;
3540}
3541
3542static int restore_mixer_value(struct usb_mixer_elem_list *list)
3543{
3544 struct usb_mixer_elem_info *cval = mixer_elem_list_to_info(list);
3545 int c, err, idx;
3546

--- 60 unchanged lines hidden ---
3543 return 0;
3544}
3545
3546static int restore_mixer_value(struct usb_mixer_elem_list *list)
3547{
3548 struct usb_mixer_elem_info *cval = mixer_elem_list_to_info(list);
3549 int c, err, idx;
3550

--- 60 unchanged lines hidden ---