From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: testers for SB Extigy wanted Date: Fri, 11 Oct 2002 20:12:54 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <20021011141312.GA31835@undertone.org> <20021011143659.GA31907@undertone.org> <20021011153411.GA32132@undertone.org> <20021011180023.GA32632@undertone.org> Mime-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: multipart/mixed; boundary="Multipart_Fri_Oct_11_20:12:54_2002-1" Return-path: In-Reply-To: <20021011180023.GA32632@undertone.org> Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: mark@undertone.org Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org --Multipart_Fri_Oct_11_20:12:54_2002-1 Content-Type: text/plain; charset=US-ASCII At Fri, 11 Oct 2002 13:00:23 -0500, mark@undertone.org wrote: > > On Fri, Oct 11, 2002 at 06:27:17PM +0200, Takashi Iwai wrote: > > At Fri, 11 Oct 2002 18:02:09 +0200, > > I wrote: > > > > > > hmm, could you run "alsactl store" and show the generated > > > /etc/asound.state (only for the second card is enough)? > > > at least we can see whether the controls are parsed properly. > > > > also, please check the kernel message after running the commands > > above. do any messages like "cannot get min/max..." appear? > > > > please update the cvs tree before trying again. > > i changed the code so that more PCM formats become available. > > Updated the tree, recompiled, same message: > > atrophy:/usr/local/src/alsa# alsactl store > alsactl: get_control:194: Cannot read control '2,0,0,Digital In Playback Source,0': Invalid argument please rebuild the alsa drivers with configure option "--with-debug=detect" ? this will add more verbose debug outputs (ususally annoying). the attached patch will ignore the errors from the usb controller after a mixer control is inquired. the error above shall be avoided by this patch. please check the kernel messages. so we can know which control is wrong, either wrongly inquired or due to a bug of usb controller module. also, please check /proc/asound/card0/stream* files again. now there should be more entries in them (is it only one?). Takashi --Multipart_Fri_Oct_11_20:12:54_2002-1 Content-Type: application/octet-stream Content-Disposition: attachment; filename="usb-ignore-ctl.dif" Content-Transfer-Encoding: 7bit Index: alsa-kernel/usb/usbmixer.c =================================================================== RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/usb/usbmixer.c,v retrieving revision 1.8 diff -u -r1.8 usbmixer.c --- alsa-kernel/usb/usbmixer.c 11 Oct 2002 16:18:07 -0000 1.8 +++ alsa-kernel/usb/usbmixer.c 11 Oct 2002 18:06:11 -0000 @@ -42,6 +42,9 @@ /* */ +/* ignore error from controls - for debugging */ +#define IGNORE_CTL_ERROR + typedef struct usb_mixer_build mixer_build_t; typedef struct usb_audio_term usb_audio_term_t; typedef struct usb_mixer_elem_info usb_mixer_elem_info_t; @@ -279,8 +282,10 @@ request, USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN, validx, cval->ctrlif | (cval->id << 8), - buf, val_len, HZ) < 0) + buf, val_len, HZ) < 0) { + snd_printdd(KERN_ERR "cannot get ctl value: req = 0x%x, idx = 0x%x, val = 0x%x, type = %d\n", request, validx, cval->ctrlif | (cval->id << 8), cval-.val_type); return -EINVAL; + } *value_ret = convert_signed_value(cval, snd_usb_combine_bytes(buf, val_len)); return 0; } @@ -599,6 +604,10 @@ for (c = 0; c < MAX_CHANNELS; c++) { if (cval->cmask & (1 << c)) { err = get_cur_mix_value(cval, c + 1, &val); +#ifdef IGNORE_CTL_ERROR + if (err < 0) + return 0; +#endif if (err < 0) { snd_printd(KERN_ERR "cannot get current value for control %d ch %d: err = %d\n", cval->control, c + 1, err); return err; @@ -611,6 +620,10 @@ } else { /* master channel */ err = get_cur_mix_value(cval, 0, &val); +#ifdef IGNORE_CTL_ERROR + if (err < 0) + return 0; +#endif if (err < 0) { snd_printd(KERN_ERR "cannot get current value for control %d master ch: err = %d\n", cval->control, err); return err; @@ -633,6 +646,10 @@ for (c = 0; c < MAX_CHANNELS; c++) { if (cval->cmask & (1 << c)) { err = get_cur_mix_value(cval, c + 1, &oval); +#ifdef IGNORE_CTL_ERROR + if (err < 0) + return 0; +#endif if (err < 0) return err; val = ucontrol->value.integer.value[cnt]; @@ -647,6 +664,10 @@ } else { /* master channel */ err = get_cur_mix_value(cval, 0, &oval); +#ifdef IGNORE_CTL_ERROR + if (err < 0) + return 0; +#endif if (err < 0) return err; val = ucontrol->value.integer.value[0]; @@ -944,6 +965,10 @@ int err, val; err = get_cur_ctl_value(cval, cval->control, &val); +#ifdef IGNORE_CTL_ERROR + if (err < 0) + return 0; +#endif if (err < 0) return err; val = get_relative_value(cval, val); @@ -958,6 +983,10 @@ int val, oval, err; err = get_cur_ctl_value(cval, cval->control, &oval); +#ifdef IGNORE_CTL_ERROR + if (err < 0) + return 0; +#endif if (err < 0) return err; val = ucontrol->value.integer.value[0]; @@ -1183,6 +1212,10 @@ int val, err; err = get_cur_ctl_value(cval, 0, &val); +#ifdef IGNORE_CTL_ERROR + if (err < 0) + return 0; +#endif if (err < 0) return err; val = get_relative_value(cval, val); @@ -1197,6 +1230,10 @@ int val, oval, err; err = get_cur_ctl_value(cval, 0, &oval); +#ifdef IGNORE_CTL_ERROR + if (err < 0) + return 0; +#endif if (err < 0) return err; val = ucontrol->value.enumerated.item[0]; --Multipart_Fri_Oct_11_20:12:54_2002-1-- ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf