All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Cavey <chris-alsa@rauros.net>
To: alsa-devel@alsa-project.org
Subject: Re: M-Audio FastTrack C400
Date: Fri, 20 Apr 2012 21:29:23 -0400	[thread overview]
Message-ID: <4F920D73.7070309@rauros.net> (raw)
In-Reply-To: <4F911629.5090704@gmail.com>

Having never done kernel module debugging I resorted to littering printk 
everywhere. Crude but effective. I'll really need to look into setting 
up kernel debug in VirtualBox...

The C400 appears to be UAC2 device.

The root cause of the failure occurs during snd_usb_mixer_controls()

Following down the rabbit hole,

parse_audio_unit() discovers a type, UAC_MIXER_UNIT and beings to parse 
pins in parse_audio_mixer_unit()

A pin is found of type "7" which since this is UAC2 device, could be 
UAC2_EFFECT_UNIT or UAC1_PROCESSING_UNIT

We arrive at the following case in check_input_term:

                 case UAC1_PROCESSING_UNIT:
                 case UAC1_EXTENSION_UNIT: {
                         struct uac_processing_unit_descriptor *d = p1;
                         if (d->bNrInPins) {
                                 id = d->baSourceID[0];
                                 break; /* continue to parse */
                         }

The break ultimately results (after find_audio_control_unit returns 
NULL) in ENODEV which bubbles all the way back out to 
snd_usb_audio_probe(), goto returns NULL, back out to usb_audio_probe() 
which finally returns -EIO.

Being a little daring I replaced the break with "return 0;" - now the 
card is detected but fails trying to probe sample rates.

I copied the FIXED_ENDPOINT quirk descriptor from the FTU and trying to 
slam in workable values(channels = 2, ifnum = 2).

Viola! The card now completes probing and shows up as a device in aplay 
-L/-l.

Except I can't get it to play anything (figure it would all be too good 
to be true)

$ speaker-test -Dfront:C400
speaker-test 1.0.25

Playback device is front:C400
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Sample format not available for playback: Invalid argument
Setting of hwparams failed: Invalid argument

$ amixer contents
numid=1,iface=MIXER,name='PCM Clock Source'
   ; type=ENUMERATED,access=rw------,values=1,items=2
   ; Item #0 'Unit 129'
   ; Item #1 'Unit 130'
   : values=0

On 04/20/2012 03:54 AM, Daniel Mack wrote:
> On 04/19/2012 10:53 AM, Clemens Ladisch wrote:
>> Chris Cavey wrote:
>>>   snd-usb-audio: probe of 1-1:1.1 failed with error -5
>>>   snd-usb-audio: probe of 1-1:1.2 failed with error -5
>>>   snd-usb-audio: probe of 1-1:1.3 failed with error -5
>> Are there no other messages immediately before this?
>>
>> Daniel, are there places where the code aborts without
>> print an error message?
> Yes, there are in fact some. -5 means -EIO, and the module probe will
> fail with this error code in case snd_usb_audio_probe() returns NULL.
> Chris, can you trace this functions in sound/usb/card.c and see where it
> bails?
>
>
>
> Daniel
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2012-04-21  1:30 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-17 12:37 M-Audio FastTrack C400 Chris Cavey
     [not found] ` <CACckToXF6yW+GzhzJ3zVBKi3e+thwrpDVnFmMCtjQOqePuixZg@mail.gmail.com>
     [not found]   ` <4F8DF29B.9090907@rauros.net>
2012-04-18  1:12     ` Grant Diffey
2012-04-18  7:26       ` Clemens Ladisch
2012-04-19  2:01         ` Chris Cavey
2012-04-19  7:58           ` Chris Cavey
2012-04-19  8:53           ` Clemens Ladisch
2012-04-19 10:26             ` Chris Cavey
2012-04-19 11:09               ` Grant Diffey
2012-04-19 11:19                 ` Chris Cavey
     [not found]                   ` <CACckToXHxm0y28ir+HGjE+Wug9PusHdrOeJpb3zQAFgQLjdP5w@mail.gmail.com>
2012-04-19 19:47                     ` Chris Cavey
2012-04-20  7:54             ` Daniel Mack
2012-04-21  1:29               ` Chris Cavey [this message]
2012-04-21  8:10                 ` Felix Homann
2012-04-21  8:48                   ` Felix Homann
2012-04-21  9:19                   ` Grant Diffey
2012-04-21 16:07                     ` Chris Cavey
2012-04-29  3:09                     ` Chris Cavey
2012-04-29  6:51                       ` Felix Homann
2012-04-29 13:30                         ` Chris Cavey
2012-05-02 10:05                           ` Felix Homann
2012-05-02 20:44                             ` Chris Cavey
2012-05-03 14:58                               ` Felix Homann
2012-05-04  4:54                                 ` Chris Cavey
2012-05-04  8:26                                   ` Felix Homann
2012-05-04 22:42                                     ` Chris Cavey
2012-05-05  7:05                                       ` Felix Homann
2012-05-09  1:11                                         ` Chris Cavey
2012-05-09  8:33                                           ` Felix Homann
2012-08-18 17:47       ` Mudwalker
  -- strict thread matches above, loose matches on Subject: below --
2012-11-02 16:11 Raphael Souza

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F920D73.7070309@rauros.net \
    --to=chris-alsa@rauros.net \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.