Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jun 2007 22:37:46 +0800
From:      Ariff Abdullah <ariff@FreeBSD.org>
To:        jkim@FreeBSD.org
Cc:        freebsd-emulation@freebsd.org
Subject:   Re: snd_es137x & -CURRENT, /dev/dsp: Invalid argument -- Could not mmap  /dev/dsp - linux emulation problem?
Message-ID:  <20070612223746.25d44a5c.ariff@FreeBSD.org>
In-Reply-To: <466BE4FA.1020804@barafranca.com>
References:  <466AFD29.7040108@barafranca.com> <20070610100109.4ab5dc3f.ariff@FreeBSD.org> <466BE4FA.1020804@barafranca.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--Signature=_Tue__12_Jun_2007_22_37_46_+0800_q9wB2Ujqq6kFMjA0
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, 10 Jun 2007 12:48:10 +0100
Hugo Silva <hugo@barafranca.com> wrote:
> Ariff Abdullah wrote:
> > [CC: freebsd-emulation]
> >
> > On Sat, 09 Jun 2007 20:19:05 +0100
> > Hugo Silva <hugo@barafranca.com> wrote:
> >  =20
> >> Hi list,
> >>
> >> I am having some problems using my sound card while playing
> >OpenGL > games  on 7.0-CURRENT.
> >>
> >> The same game (wolfenstein enemy territory) worked on 6.1-STABLE
> >> with  the same sound cards, on a install I'm still keeping on
> >> another disk.
> >>
> >>
> >>
> >> p.s: sound works on everything else (amarok, cat /bin/ls >
> >/dev/dsp, >
> >> etc) that's not linux emulated.
> >>
> >>
> >>
> >>  From the game:
> >> ... snip ...
> >> ----- finished R_Init -----
> >>
> >> ------- sound initialization -------
> >> /dev/dsp: Invalid argument
> >> Could not mmap /dev/dsp
> >> ............
> >>
> >>    =20
> >
> > Please try this patch (not tested):
> >
> >    http://people.freebsd.org/~ariff/test/grrrrrrr.diff
> >
> >  =20
> >>
> >> truss output:
> >> ... snip ...
> >> linux_open("/dev/dsp",0x2,01)                    =3D 132 (0x84)
> >> linux_getuid(0x81586d0,0x2840cff4,0x1,0x2,0x81aad20) =3D 1001
> >(0x3e9) > setresuid(0xffffffff,0x3e9,0xffffffff,0x2,0x2840cff4) =3D 0
> >(0x0) > linux_ioctl(0x84,0x8004500f,0xbfbfe854,0x2,0x81aad20) =3D 0
> >(0x0) > linux_ioctl(0x84,0x8004500b,0xbfbfe85c,0x2,0x81aad20) =3D 0
> >(0x0) > linux_ioctl(0x84,0xc0045003,0xbfbfe858,0x2,0x81aad20) =3D 0
> >(0x0) > linux_ioctl(0x84,0xc0045002,0x926d3b4,0x2,0x81aad20) =3D 0
> >(0x0) > linux_ioctl(0x84,0xc0045005,0xbfbfe860,0x10,0x81aad20) =3D 0
> >(0x0) > linux_ioctl(0x84,0x8010500c,0xbfbfe844,0x10,0x81aad20) =3D 0
> >(0x0) > linux_mmap(0xbfbfe820,0x10000,0xbfbfe858,0x2,0x81aad20)
> >ERR#22 > 'Invalid  argument'
> >> write(2,"/dev/dsp: Invalid argument\n",27)       =3D 27 (0x1b)
> >> write(2,"Could not mmap /dev/dsp\n",24)          =3D 24 (0x18)
> >> .............
> >>
> >>
> >>
> >> $ uname -a:
> >> FreeBSD nexus.bsdlan.org 7.0-CURRENT FreeBSD 7.0-CURRENT #1: Sat
> >Jun >  9=20
> >> 15:26:23 WEST 2007   =20
> >> klr@nexus.bsdlan.org:/usr/obj/usr/src/sys/NEXUS  i386
> >>
> >>
> >> soundcards:
> >> pcm0: <Creative CT5880-C> port 0xb400-0xb43f irq 17 at device 9.0
> >on > pci1 pcm0: <SigmaTel STAC9708/11 AC97 Codec>
> >> pcm0: [ITHREAD]
> >> pcm0: <Playback: DAC1,DAC2 / Record: ADC>
> >> pcm1: <AudioPCI ES1373-B> port 0xb800-0xb83f irq 21 at device
> >10.0 > on pci1 pcm1: <TriTech TR28023 AC97 Codec>
> >> pcm1: [ITHREAD]
> >> pcm1: <Playback: DAC1,DAC2 / Record: ADC>
> >>
> >>
> >>
> >> $ sysctl -a | egrep '(snd|pcm|sound)':
> >>
> >> hw.snd.latency_profile: 1
> >> hw.snd.latency: 5
> >> hw.snd.report_soft_formats: 1
> >> hw.snd.feeder_buffersize: 16384
> >> hw.snd.feeder_rate_round: 25
> >> hw.snd.feeder_rate_max: 2016000
> >> hw.snd.feeder_rate_min: 1
> >> hw.snd.verbose: 1
> >> hw.snd.maxautovchans: 16
> >> hw.snd.default_unit: 0
> >> hw.snd.version: 2007060100/i386
> >> dev.pcm.0.%desc: Creative CT5880-C
> >> dev.pcm.0.%driver: pcm
> >> dev.pcm.0.%location: slot=3D9 function=3D0
> >> dev.pcm.0.%pnpinfo: vendor=3D0x1274 device=3D0x5880 subvendor=3D0x1274=
=20
> >> subdevice=3D0x8001 class=3D0x040100
> >> dev.pcm.0.%parent: pci1
> >> dev.pcm.0.eapd: 1
> >> dev.pcm.0.play.vchans: 4
> >> dev.pcm.0.play.vchanrate: 48000
> >> dev.pcm.0.play.vchanformat: s16le
> >> dev.pcm.0.rec.vchans: 1
> >> dev.pcm.0.rec.vchanrate: 48000
> >> dev.pcm.0.rec.vchanformat: s16le
> >> dev.pcm.0.buffersize: 4096
> >> dev.pcm.0.spdif_enabled: 0
> >> dev.pcm.0.latency_timer: 64
> >> dev.pcm.0.polling: 0
> >> dev.pcm.1.%desc: AudioPCI ES1373-B
> >> dev.pcm.1.%driver: pcm
> >> dev.pcm.1.%location: slot=3D10 function=3D0
> >> dev.pcm.1.%pnpinfo: vendor=3D0x1274 device=3D0x1371 subvendor=3D0x1274=
=20
> >> subdevice=3D0x1371 class=3D0x040100
> >> dev.pcm.1.%parent: pci1
> >> dev.pcm.1.play.vchans: 4
> >> dev.pcm.1.play.vchanrate: 48000
> >> dev.pcm.1.play.vchanformat: s16le
> >> dev.pcm.1.rec.vchans: 1
> >> dev.pcm.1.rec.vchanrate: 48000
> >> dev.pcm.1.rec.vchanformat: s16le
> >> dev.pcm.1.buffersize: 4096
> >> dev.pcm.1.latency_timer: 64
> >> dev.pcm.1.polling: 0
> >>
> >>
> >>
> >>
> >> Installed linux ports (relevant to the case):
> >>
> >> linux-xorg-libs-6.8.2_5 Xorg libraries, linux binaries
> >> linux_base-fc-4_9   Base set of packages needed in Linux mode
> >(for  > i386/amd64)
> >>
> >>
> >> Nvidia driver:
> >> nvidia-driver-1.0.9746_5 NVidia graphics card binary drivers for=20
> >> hardware OpenGL ren
> >>
> >>
> >> $ kldstat
> >> Id Refs Address    Size     Name
> >>  1    9 0xc0400000 45f324   kernel
> >>  2    1 0xc0860000 26318    linux.ko
> >>  3    1 0xc0887000 6d3a4c   nvidia.ko
> >>  4    1 0xc429c000 a1000    zfs.ko
> >>
> >> device sound and device es_137x compiled directly in the kernel.
> >>
> >>
> >> I'm out of ideas, what could be causing this problem ? It works=20
> >> flawlessly on 6.1-STABLE.
> >>
> >>
> >> If anyone needs more information to track this down, please let
> >me > know.
> >>
> >>
> >> Best regards,
> >>
> >> Hugo
> >> _______________________________________________
> >> freebsd-current@freebsd.org mailing list
> >> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> >> To unsubscribe, send any mail to
> >> "freebsd-current-unsubscribe@freebsd.org"
> >>
> >>
> >>    =20
> >
> >
> > --
> > Ariff Abdullah
> > FreeBSD
> >
> > ... Recording in stereo is obviously too advanced
> >     and confusing for us idiot ***** users :P ........
> >  =20
>=20
> (cc to -emulation)
>=20
> Thank you very much for your time and effort, that did the trick :-)
>=20
> Best regards,
>=20
> Hugo
>=20

(as per rdivacky suggestion..)

jkim, are there any reasons why linux_mmap PROT_EXECing everywhere?
(thus causing this breakage).

http://people.freebsd.org/~ariff/test/grrrrrrr.diff



--
Ariff Abdullah
FreeBSD

... Recording in stereo is obviously too advanced
    and confusing for us idiot ***** users :P ........

--Signature=_Tue__12_Jun_2007_22_37_46_+0800_q9wB2Ujqq6kFMjA0
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)

iD8DBQFGbq+6lr+deMUwTNoRAruuAKCJtNAFp9CR5WJn9E95AQEVgKMlpQCgyY3Y
37qAknqnFRsg8GfhjBYrUlE=
=CHpS
-----END PGP SIGNATURE-----

--Signature=_Tue__12_Jun_2007_22_37_46_+0800_q9wB2Ujqq6kFMjA0--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070612223746.25d44a5c.ariff>