--- zzzz-none-000/linux-3.10.107/sound/usb/misc/ua101.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/sound/usb/misc/ua101.c 2021-02-04 17:41:59.000000000 +0000 @@ -613,24 +613,14 @@ static void abort_alsa_capture(struct ua101 *ua) { - unsigned long flags; - - if (test_bit(ALSA_CAPTURE_RUNNING, &ua->states)) { - snd_pcm_stream_lock_irqsave(ua->capture.substream, flags); - snd_pcm_stop(ua->capture.substream, SNDRV_PCM_STATE_XRUN); - snd_pcm_stream_unlock_irqrestore(ua->capture.substream, flags); - } + if (test_bit(ALSA_CAPTURE_RUNNING, &ua->states)) + snd_pcm_stop_xrun(ua->capture.substream); } static void abort_alsa_playback(struct ua101 *ua) { - unsigned long flags; - - if (test_bit(ALSA_PLAYBACK_RUNNING, &ua->states)) { - snd_pcm_stream_lock_irqsave(ua->playback.substream, flags); - snd_pcm_stop(ua->playback.substream, SNDRV_PCM_STATE_XRUN); - snd_pcm_stream_unlock_irqrestore(ua->playback.substream, flags); - } + if (test_bit(ALSA_PLAYBACK_RUNNING, &ua->states)) + snd_pcm_stop_xrun(ua->playback.substream); } static int set_stream_hw(struct ua101 *ua, struct snd_pcm_substream *substream, @@ -1243,8 +1233,9 @@ mutex_unlock(&devices_mutex); return -ENOENT; } - err = snd_card_create(index[card_index], id[card_index], THIS_MODULE, - sizeof(*ua), &card); + err = snd_card_new(&interface->dev, + index[card_index], id[card_index], THIS_MODULE, + sizeof(*ua), &card); if (err < 0) { mutex_unlock(&devices_mutex); return err; @@ -1283,8 +1274,6 @@ } } - snd_card_set_dev(card, &interface->dev); - err = detect_usb_format(ua); if (err < 0) goto probe_error; @@ -1359,7 +1348,7 @@ snd_card_disconnect(ua->card); /* make sure that there are no pending USB requests */ - __list_for_each(midi, &ua->midi_list) + list_for_each(midi, &ua->midi_list) snd_usbmidi_disconnect(midi); abort_alsa_playback(ua); abort_alsa_capture(ua);