From: Takashi Iwai <tiwai@suse.de>
To: mark@undertone.org
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: testers for SB Extigy wanted
Date: Fri, 11 Oct 2002 20:12:54 +0200 [thread overview]
Message-ID: <s5hy994c09l.wl@alsa2.suse.de> (raw)
In-Reply-To: <20021011180023.GA32632@undertone.org>
[-- Attachment #1: Type: text/plain, Size: 1409 bytes --]
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
[-- Attachment #2: usb-ignore-ctl.dif --]
[-- Type: application/octet-stream, Size: 3180 bytes --]
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];
next prev parent reply other threads:[~2002-10-11 18:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-11 11:41 testers for SB Extigy wanted Takashi Iwai
2002-10-11 14:13 ` mark
2002-10-11 14:21 ` Takashi Iwai
[not found] ` <20021011143659.GA31907@undertone.org>
2002-10-11 15:07 ` Takashi Iwai
2002-10-11 15:35 ` mark
[not found] ` <20021011153411.GA32132@undertone.org>
2002-10-11 16:02 ` Takashi Iwai
2002-10-11 16:27 ` Takashi Iwai
2002-10-11 18:00 ` mark
2002-10-11 18:12 ` Takashi Iwai [this message]
2002-10-11 18:39 ` mark
2002-10-14 12:20 ` Takashi Iwai
2002-10-14 19:11 ` mark
2002-10-11 17:55 ` mark
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=s5hy994c09l.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@lists.sourceforge.net \
--cc=mark@undertone.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.