On 2005-03-10 18:22:56 +0000, Nikita Schmidt wrote:
> I'm pretty much convinced it's a kernel bug.  Firstly, to follow your
> logic:
> 
> > gnome-volume-control gives warnings:
> > 
> > ** (gnome-volume-control:5579): WARNING **: Error getting device (7) 
> > volume: Operation not permitted
> > 
> > ** (gnome-volume-control:5579): WARNING **: Error getting recording device 
> > (7) volume: Operation not permitted
> > 
> > but works without any problem. So, this is not a bug in the kernel.
> 
> tkmixer works on all kernels except some versions of powerpc, so this is
> not a bug in tkmixer, right?

No, this doesn't mean anything. I don't think that the PowerPC kernel
has done anything wrong.

> But the real reasons why I think it's a kernel bug are below.
> 
> 1. The ioctl which returns EPERM is a request to get the value of mixer
> control no. 7 (Microphone).  Previous three similar ioctls for controls 0
> (Master volume), 5 (Speaker) and 6 (Line) have all succeeded, as shown by
> strace.  I see no logic in that reading some mixer elements is permitted
> and reading others is not.

Because there's no microphone?

> 2. Permission checks are usually done at device openinig time, not at
> ioctl time.

One has more control on what can be read or not at ioctl time.
This is just like file vs file system permissions.

> 3. EPERM's code is 1, which means that the mixer ioctl handler in the
> kernel returns -1, which is then translated to an error condition with
> errno = -(-1) = 1 = EPERM.  I think that -1 is returned by mistake; if
> EPERM had a different error code, the code returned would still be 1, and
> not EPERM's.

Well, I don't know about the error codes (perhaps EPERM isn't the right
one). But I don't see why the kernel shouldn't return an error for
something that doesn't exist.

> Of course, I could equip tkxmier with a workaround similar to the one in
> gnome-volume-control, or forgo error checking altogether, like most other
> mixers that "work" on powerpc do, and let the real bug go unnoticed.
> But before that, I'd still like to bounce this off PowerPC kernel/sound
> driver developers, or even look into this myself if you give me precise
> details about the kernel and platform: driver type (OSS or ALSA), sound
> device (AWACS/Burgundy/etc.), kernel configuration, gcc version, and the
> kernel-image package used (I couldn't find kernel-image-2.6.9-powerpc in
> Debian archive).  It might even be a result of miscompilation by gcc.

I'm using the kernel-image-2.6.10-powerpc package. If you need more
information, could you tell me precisely where I should look?

In case this can be useful:

ay:~> lsmod|grep sound
dmasound_pmac          94820  1 
dmasound_core          22096  2 dmasound_pmac
soundcore              11780  3 snd,dmasound_core

-- 
Vincent Lefèvre <[EMAIL PROTECTED]> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to