lkml.org 
[lkml]   [1998]   [Jan]   [21]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateWed, 21 Jan 1998 09:32:40 +0200 (SAT)
FromCraig Schlenter <>
SubjectRe: Sound ioctl mmap/trigger broken in 2.1.80?
> Here is the relevant snippets of code from amp:> [snip]>         if (ioctl(audio_fd, SNDCTL_DSP_GETCAPS, &apar) == -1) {
>                 perror("ioctl: SNDCTL_DSP_GETCAPS");
>                 return -1;
>         }
>         if (!(apar & DSP_CAP_TRIGGER) || !(apar & DSP_CAP_MMAP)) {
>                 fprintf(stderr, "Sound driver does not support mmap and/or
> trigger\n");
>                 return -1;
>         }
> [snip]
I figured it out ... the code in drivers/sound/audio.c does this:
case SNDCTL_DSP_GETCAPS:
                                info = 1 | DSP_CAP_MMAP;
[snip, couple more tweaks to info variable]
                                break;
[and then] 
	return put_user(val, (int *)arg);
I think a quick s/info/val should do the trick ....
Cheers,

--Craig


\
 
 \ /
  Last update: 2005-03-22 12:41    [from the cache]
©2003-2008