All of lore.kernel.org
 help / color / mirror / Atom feed
* .dimen ?
@ 2003-05-18 17:05 Giuliano Pochini
  2003-05-20  8:51 ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: Giuliano Pochini @ 2003-05-18 17:05 UTC (permalink / raw)
  To: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 268 bytes --]



In struct sndrv_ctl_elem_info what is the union .dimen for ?  A grep(1)
in all sources show that it's referenced only in
snd_ctl_elem_info_get_dimension() and
snd_ctl_elem_info_get_dimensions(). The latter seems quite buggy (patch
against 0.9.3 is attached).

Bye.


[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 570 bytes --]

--- ./src/control/control.c.old	Sun May 18 16:53:36 2003
+++ ./src/control/control.c	Sun May 18 16:55:59 2003
@@ -1699,10 +1699,10 @@
 	assert(obj);
 	if (obj->access & SNDRV_CTL_ELEM_ACCESS_DINDIRECT)
 		return 0;			/* FIXME: implement indirect access as well */
-	for (i = 3; i >= 0; i++)
-		if (obj->dimen.d[0])
-			break;
-	return i >= 0 ? i + 1 : 0;
+	for (i = 3; i >= 0; i--)
+		if (obj->dimen.d[i])
+			return(i+1);
+	return 0;
 }
 use_default_symbol_version(__snd_ctl_elem_info_get_dimensions, snd_ctl_elem_info_get_dimensions, ALSA_0.9.3);
 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-05-20  9:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-18 17:05 .dimen ? Giuliano Pochini
2003-05-20  8:51 ` Takashi Iwai
2003-05-20  9:58   ` Giuliano Pochini

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.