Re: Setting flags on /dev/audio

2016-10-06 Thread Tobias Brodel

On 10/06/16 22:44, ludovic coues wrote:
misc strip attachment. Please send your diff inline or start a new 
thread on dev

Thanks forthe pointer Ludovic,

sys/dev/audio.c:

@@ -1537,6 +1537,11 @@
 case FIONBIO:
 /* All handled in the upper FS layer. */
 break;
+case FIOASYNC:
+/* No async mode, so set is an error, unset is a noop. */
+if (*(int *)addr)
+error = EINVAL;
+break;
 case AUDIO_GETPOS:
 mtx_enter(&audio_lock);
 ap = (struct audio_pos *)addr;


test program:

#include 
#include 

int
main(void)
{
int fd, flags;
if ((fd = open("/dev/audio", O_RDWR | O_NDELAY, 0)) < 0) {
perror("can't open file");
return fd;
}

if ((flags = fcntl(fd, F_GETFL)) < 0)
perror("can't get flags!\n");
else if (fcntl(fd, F_SETFL, flags & ~(O_NDELAY)) < 0)
perror("can't set flags");
else
printf("good!\n");

close(fd);
return 0;
}


2016-10-06 2:15 GMT+02:00 Tobias Brodel :
Somehow sent the inverse of the intended diff, all apologies. Please 
find the proper diff attached. toby/ On 10/06/16 11:07, Tobias Brodel 
wrote:
Hi, I've been working on porting an audio application which uses the 
OSS compatibility layer. It was throwing warnings at runtime about 
not being able to set flags on /dev/audio. After searching around I 
found a diff written by Steven McDonald in the misc@ archives: 
http://openbsd-archive.7691.n7.nabble.com/perl-fctnl-woes-td276032.html 
Apparently the issue lies with the removal of the FIOASYNC ioctl(2). 
I've applied the diff on -CURRENT and it has solved my issues - 
please find the diff and a test program attached. toby/ 
[demime 1.01d removed an attachment of type text/x-patch which had a 
name of sys_dev_audio_c.diff] 




Re: Setting flags on /dev/audio

2016-10-05 Thread Tobias Brodel
Somehow sent the inverse of the intended diff, all apologies.

Please find the proper diff attached.

toby/

On 10/06/16 11:07, Tobias Brodel wrote:
> Hi,
>
> I've been working on porting an audio application which uses the OSS
> compatibility layer. It was throwing warnings at runtime about not
> being able to set flags on /dev/audio.
>
> After searching around I found a diff written by Steven McDonald in
> the misc@ archives:
>
> http://openbsd-archive.7691.n7.nabble.com/perl-fctnl-woes-td276032.html
>
> Apparently the issue lies with the removal of the FIOASYNC ioctl(2).
>
> I've applied the diff on -CURRENT and it has solved my issues - please
> find the diff and a test program attached.
>
> toby/

[demime 1.01d removed an attachment of type text/x-patch which had a name of 
sys_dev_audio_c.diff]



Setting flags on /dev/audio

2016-10-05 Thread Tobias Brodel
Hi,

I've been working on porting an audio application which uses the OSS
compatibility layer. It was throwing warnings at runtime about not
being able to set flags on /dev/audio.

After searching around I found a diff written by Steven McDonald in
the misc@ archives:

http://openbsd-archive.7691.n7.nabble.com/perl-fctnl-woes-td276032.html

Apparently the issue lies with the removal of the FIOASYNC ioctl(2).

I've applied the diff on -CURRENT and it has solved my issues - please
find the diff and a test program attached.

toby/

[demime 1.01d removed an attachment of type text/x-patch which had a name of 
sys_dev_audio_c.diff]

[demime 1.01d removed an attachment of type text/x-csrc which had a name of 
audio-test.c]



Re: Black screen after 5.5/macppc install

2014-06-03 Thread Tobias Brodel

Tried the diff, no joy..

Here's the output of eeprom -p: http://pastebin.com/bWSsXxHs

Toby

On 03/06/14 22:28, Mark Kettenis wrote:

Index: radeon_combios.c
===
RCS file: /cvs/src/sys/dev/pci/drm/radeon/radeon_combios.c,v
retrieving revision 1.5
diff -u -p -r1.5 radeon_combios.c
--- radeon_combios.c7 Apr 2014 06:43:11 -   1.5
+++ radeon_combios.c3 Jun 2014 12:24:24 -
@@ -1500,7 +1500,8 @@ bool radeon_get_legacy_connector_info_fr
} else if (of_machine_is_compatible("PowerMac3,5")) {
/* PowerMac G4 Silver radeon 7500 */
rdev->mode_info.connector_table = CT_MAC_G4_SILVER;
-   } else if (of_machine_is_compatible("PowerMac4,4")) {
+   } else if (of_machine_is_compatible("PowerMac4,4") ||
+  of_machine_is_compatible("PowerMac6,4")) {
/* emac */
rdev->mode_info.connector_table = CT_EMAC;
} else if (of_machine_is_compatible("PowerMac10,1")) {




Black screen after 5.5/macppc install

2014-06-02 Thread Tobias Brodel

Hi, after installing OpenBSD 5.5/macppc on my emac I am unable to get a
console to display on my monitor.

The installer completes succesfully, I can reboot to the new system but
the display conks out after the radeon-related kernel messages.

I can log in via ssh and my previous install of 5.4 worked fine
(although I never did get X11 working...).

I this a known issue? I noticed lots of radeon/macppc items in the 5.5
changelog.

My dmesg - http://pastie.org/9252296
/var/log/messages - http://pastie.org/9252299

Cheers,
Toby