Bug 115561 - Scarlett 2i4 not detected as an audio input/output device
Summary: Scarlett 2i4 not detected as an audio input/output device
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-30 23:35 UTC by Juston Li
Modified: 2016-04-02 18:49 UTC (History)
1 user (show)

See Also:
Kernel Version: 4.6-rc1
Subsystem:
Regression: No
Bisected commit-id:


Attachments
alsa-info 4.6-rc1 (58.00 KB, text/plain)
2016-03-30 23:35 UTC, Juston Li
Details
lsusb 4.6-rc1 (70.16 KB, text/plain)
2016-03-30 23:35 UTC, Juston Li
Details
dmesg 4.6-rc1 (57.99 KB, text/plain)
2016-03-30 23:35 UTC, Juston Li
Details
config 4.6-rc1 (170.35 KB, text/plain)
2016-03-30 23:37 UTC, Juston Li
Details
alsa-info SND_USB_AUDIO_USE_MEDIA_CONTROLLER not set (58.10 KB, text/plain)
2016-03-31 08:15 UTC, Juston Li
Details
Fix patch #1 (1.32 KB, patch)
2016-03-31 10:25 UTC, Takashi Iwai
Details | Diff
Fix patch #2 (1.57 KB, patch)
2016-03-31 10:25 UTC, Takashi Iwai
Details | Diff
Fix patch #3 (828 bytes, patch)
2016-03-31 10:25 UTC, Takashi Iwai
Details | Diff

Description Juston Li 2016-03-30 23:35:01 UTC
Created attachment 211151 [details]
alsa-info 4.6-rc1

With 4.6-rc1 I can no longer use my Scarlett 2i4, it is not listed as an input or output device on pavucontrol and on alsamixer it says "This sound device does not have any controls."
It is working on mainline 4.5 kernel.

I had the same BUG described here: https://lkml.org/lkml/2016/3/15/238
I applied the attached patch and gets rid of the BUG but I still cannot use my 2i4

My 2i4 recieves power, leds turn on and lsusb detects it.
Comment 1 Juston Li 2016-03-30 23:35:29 UTC
Created attachment 211161 [details]
lsusb 4.6-rc1
Comment 2 Juston Li 2016-03-30 23:35:44 UTC
Created attachment 211171 [details]
dmesg 4.6-rc1
Comment 3 Juston Li 2016-03-30 23:37:00 UTC
Created attachment 211191 [details]
config 4.6-rc1
Comment 4 Takashi Iwai 2016-03-31 07:19:01 UTC
There aren't so many commits in usb-audio driver, so could you try to revert the commit one by one?

Start with c0fd9cdf940b5a2b5ffd118831bddf88afe922e4
On the git tree, run "git revert c0fd9cdf940b5a2b5ffd118831bddf88afe922e4"
This alone won't change anything, so revert
e2703363316278cd4a8880671d38f783f7de18ba
together.  These will revert the addition of media controller in 4.6-rc1.

If these reverts don't help, try to revert
e2703363316278cd4a8880671d38f783f7de18ba

If this doesn't, try
79289e24194a9d099bf18f200894832c5760cd83

If this still doesn't help, it might be something else.
You can copy the whole sound/usb/* files from 4.5, and see whether it works.
Comment 5 Juston Li 2016-03-31 08:14:23 UTC
Hi Takashi, thanks for the quick reply.

I actually had a similar thought that it was related to media controller. Instead of reverting the commits I unset SND_USB_AUDIO_USE_MEDIA_CONTROLLER
My 2i4 is now properly detected and audio works fine now.

Attached alsa-info. I'll try to further isolate the issue tomorrow.
Comment 6 Juston Li 2016-03-31 08:15:30 UTC
Created attachment 211211 [details]
alsa-info SND_USB_AUDIO_USE_MEDIA_CONTROLLER not set
Comment 7 Takashi Iwai 2016-03-31 08:38:39 UTC
Thanks, that's already helpful.  I found one problem at least.
Could you check the patch below?

--- a/sound/usb/media.c
+++ b/sound/usb/media.c
@@ -57,7 +57,7 @@ int media_snd_stream_init(struct snd_usb_substream *subs, struct snd_pcm *pcm,
 
        mdev = subs->stream->chip->media_dev;
        if (!mdev)
-               return -ENODEV;
+               return 0;
 
        if (subs->media_ctl)
                return 0;
Comment 8 Takashi Iwai 2016-03-31 10:24:53 UTC
There are other issues in the recent MC code.  Below are the three fix patches (including the previous one).  Let me know if these work for you.
Comment 9 Takashi Iwai 2016-03-31 10:25:13 UTC
Created attachment 211221 [details]
Fix patch #1
Comment 10 Takashi Iwai 2016-03-31 10:25:28 UTC
Created attachment 211231 [details]
Fix patch #2
Comment 11 Takashi Iwai 2016-03-31 10:25:43 UTC
Created attachment 211241 [details]
Fix patch #3
Comment 12 Juston Li 2016-03-31 15:49:26 UTC
Patch #1 by itself fixes the issue, thanks!

Patch #2 and #3 apply fine too.

Note You need to log in before you can comment on or make changes to this bug.