All of lore.kernel.org
 help / color / mirror / Atom feed
* env LD_PRELOAD=/usr/lib/libaoss.so ....
@ 2003-10-16 12:13 Günther Montag
  2003-10-16 13:10 ` Takashi Iwai
  0 siblings, 1 reply; 5+ messages in thread
From: Günther Montag @ 2003-10-16 12:13 UTC (permalink / raw)
  To: alsa-devel, hfterm-hackers

hello friends
when I start my ham program with this preload
it says
***
hfkernel_user will be started by /usr/local/bin/hfkernel start
hfkernel[235]: hfkernel 0.4.1 starting...
ALSA lib pcm.c:1809:(snd_pcm_open_noupdate) Unknown PCM dsp0
hfkernel[235]: error: open: No such file or directory
***
although I called the soundcard right with /dev/dsp0,
the device is there (cat file > /dev/dsp0 gives a sound),
the same with /dev/adsp
somewhere (where?) on the way it seems to eat the /dev!

Another question:
I looked into the file alsa-lib-0.9.7/src/pcm/pcm.c, where this#
function snd_pcm_open_noupdate is,
thanjs Jaroslav for the very interesting documentation,
You made my day,
but if You have time tell me: it looks like html,
how  can I read it as html?

tnaks a lot
Günther
Safari.Doktor@addcom.de


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php

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

* Re: env LD_PRELOAD=/usr/lib/libaoss.so ....
  2003-10-16 12:13 env LD_PRELOAD=/usr/lib/libaoss.so Günther Montag
@ 2003-10-16 13:10 ` Takashi Iwai
  2003-10-16 15:56   ` Dr. med. Günther Montag
  0 siblings, 1 reply; 5+ messages in thread
From: Takashi Iwai @ 2003-10-16 13:10 UTC (permalink / raw)
  To: Günther Montag; +Cc: alsa-devel, hfterm-hackers

At Thu, 16 Oct 2003 14:13:28 +0200,
G╴nther Montag wrote:
> 
> hello friends
> when I start my ham program with this preload
> it says
> ***
> hfkernel_user will be started by /usr/local/bin/hfkernel start
> hfkernel[235]: hfkernel 0.4.1 starting...
> ALSA lib pcm.c:1809:(snd_pcm_open_noupdate) Unknown PCM dsp0
> hfkernel[235]: error: open: No such file or directory
> ***
> although I called the soundcard right with /dev/dsp0,
> the device is there (cat file > /dev/dsp0 gives a sound),
> the same with /dev/adsp
> somewhere (where?) on the way it seems to eat the /dev!

when you use OSS-wrapper library, the access to /dev/dsp* or
/dev/adsp* will be coverted to the ALSA API.  that is, these files are
never accessed in practice.

the message above shows that you don't have the definition of dsp0 in
~/.asoundrc.  simply add

	pcm.dsp0 pcm.default

to ~/.asoundrc.

btw, it won't be a problem on cvs version, i fixed yesterday use the
default pcm as fallback.

> 
> Another question:
> I looked into the file alsa-lib-0.9.7/src/pcm/pcm.c, where this#
> function snd_pcm_open_noupdate is,
> thanjs Jaroslav for the very interesting documentation,
> You made my day,
> but if You have time tell me: it looks like html,
> how  can I read it as html?

you can generate the document via doxygen.
the already formatted html is found at
	http://www.alsa-project.org/alsa-doc/alsa-lib


Takashi


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php

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

* Re: env LD_PRELOAD=/usr/lib/libaoss.so ....
  2003-10-16 13:10 ` Takashi Iwai
@ 2003-10-16 15:56   ` Dr. med. Günther Montag
  2003-10-16 16:51     ` Takashi Iwai
  0 siblings, 1 reply; 5+ messages in thread
From: Dr. med. Günther Montag @ 2003-10-16 15:56 UTC (permalink / raw)
  To: alsa-devel, hfterm-hackers

Hallo Takashi!
> ~/.asoundrc.  simply add
>
> 	pcm.dsp0 pcm.default
>
Thanks! It helped one step more!
Now:
***
hfkernel[1488]: hfkernel 0.4.2 starting...
hfkernel[1488]: Your soundcard is full duplex capable.
Good; the reference time will be
derived from the sample clock, which should be accurate within +-20ppm.
So I hope your soundcard uses 'real' crystals instead of cheap ceramic
resonators. Adjust the clock with the soundcard correction factor.
ALSA lib pcm_plug.c:727:(snd_pcm_plug_hw_refine_schange) Unable to find an 
usable access for 'dsp0'
hfkernel[1488]: error: probe_oss: mmap: ibuf: PROT_READ: Invalid argument

***
without success I  tried the things in the oss-emulatiuon.txt with echoing 
direct or block or non-block into /proc/asound/card0/pcm0c/oss etc.
in all variations.
Any more ideas?

> you can generate the document via doxygen.
> the already formatted html is found at
> 	http://www.alsa-project.org/alsa-doc/alsa-lib
>
Thanks, I found it, the doc is great, i must & will dig into it...
Günther

Safari.Doktor@addcom.de


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php

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

* Re: env LD_PRELOAD=/usr/lib/libaoss.so ....
  2003-10-16 15:56   ` Dr. med. Günther Montag
@ 2003-10-16 16:51     ` Takashi Iwai
  2003-10-21 11:56       ` [Hfterm-hackers] " Günther Montag
  0 siblings, 1 reply; 5+ messages in thread
From: Takashi Iwai @ 2003-10-16 16:51 UTC (permalink / raw)
  To: Dr. med. Günther Montag; +Cc: alsa-devel, hfterm-hackers

At Thu, 16 Oct 2003 17:56:10 +0200,
Dr. med. G╴nther Montag wrote:
> 
> Hallo Takashi!
> > ~/.asoundrc.  simply add
> >
> > 	pcm.dsp0 pcm.default
> >
> Thanks! It helped one step more!
> Now:
> ***
> hfkernel[1488]: hfkernel 0.4.2 starting...
> hfkernel[1488]: Your soundcard is full duplex capable.
> Good; the reference time will be
> derived from the sample clock, which should be accurate within +-20ppm.
> So I hope your soundcard uses 'real' crystals instead of cheap ceramic
> resonators. Adjust the clock with the soundcard correction factor.
> ALSA lib pcm_plug.c:727:(snd_pcm_plug_hw_refine_schange) Unable to find an 
> usable access for 'dsp0'
> hfkernel[1488]: error: probe_oss: mmap: ibuf: PROT_READ: Invalid argument

hmm, how about the following?

	pcm.dsp0 {
		type hw
		card 0
	}


> ***
> without success I  tried the things in the oss-emulatiuon.txt with echoing 
> direct or block or non-block into /proc/asound/card0/pcm0c/oss etc.
> in all variations.

this proc file is for kernel OSS-emulation.
you were doing the user-space OSS-emulation via alsa-oss library.
they are different mechanisms.

if you start the oss application without libaoss wrapper, the kernel
OSS-emulation is used.  in this case, you need to set up the correct
modules and device permissions, etc.


Takashi


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php

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

* Re: [Hfterm-hackers] Re: env LD_PRELOAD=/usr/lib/libaoss.so ....
  2003-10-16 16:51     ` Takashi Iwai
@ 2003-10-21 11:56       ` Günther Montag
  0 siblings, 0 replies; 5+ messages in thread
From: Günther Montag @ 2003-10-21 11:56 UTC (permalink / raw)
  To: alsa-devel, hfterm-hackers

Hallo Takashi!
> >
> > > ~/.asoundrc.  simply add
> > >
> > > 	pcm.dsp0 pcm.default
> >
> > Thanks! It helped one step more!
> > Now:
> > ***
> > hfkernel[1488]: hfkernel 0.4.2 starting...
> > hfkernel[1488]: Your soundcard is full duplex capable.
> > Good; the reference time will be
> > derived from the sample clock, which should be accurate within +-20ppm.
> > So I hope your soundcard uses 'real' crystals instead of cheap ceramic
> > resonators. Adjust the clock with the soundcard correction factor.
> > ALSA lib pcm_plug.c:727:(snd_pcm_plug_hw_refine_schange) Unable to find
> > an usable access for 'dsp0'
> > hfkernel[1488]: error: probe_oss: mmap: ibuf: PROT_READ: Invalid argument
>
> hmm, how about the following?
>
> 	pcm.dsp0 {
> 		type hw
> 		card 0
> 	}
>
Oh, one step on! 
Now no error any more from the ALSA lib,
but still it says.
hfkernel[1488]: error: probe_oss: mmap: ibuf: PROT_READ: Invalid argument

this comes from last line of following snip:
***
 /*
         * set fragment sizes
         */
        apar = 0xffff0007U;
        if (ioctl(fd_audio, SNDCTL_DSP_SETFRAGMENT, &apar) == -1)
                errstr(SEV_FATAL, "ioctl: SNDCTL_DSP_SETFRAGMENT");
	if (ioctl(fd_audio, SNDCTL_DSP_GETOSPACE, &oinfo) == -1)
		errstr(SEV_FATAL, "ioctl: SNDCTL_DSP_GETOSPACE");
	osize = oinfo.fragstotal * oinfo.fragsize;
	if (ioctl(fd_audio, SNDCTL_DSP_GETISPACE, &iinfo) == -1)
		errstr(SEV_FATAL, "ioctl: SNDCTL_DSP_GETISPACE");
	isize = iinfo.fragstotal * iinfo.fragsize;
	if (EXCESS_FRAGS * iinfo.fragsize > pagesize)
		errprintf(SEV_FATAL, "OSS: input: fragment size %d times excess frags > page 
size %d\n",
			  iinfo.fragsize, pagesize);
	/*
         * mmap buffers
         *
	 * BSD people attention: you may need to uncomment the PROT_READ
	 * feedback welcome: sailer@ife.ee.ethz.ch
	 */
	if ((ibuf.v = mmap(NULL, isize, PROT_READ | PROT_WRITE, 
			   MAP_ANON | MAP_PRIVATE, -1, 0)) == MAP_FAILED)
		errstr(SEV_FATAL, "mmap: MAP_ANONYMOUS");
	ibuf_ext = ibuf.v + isize;
	if (munmap(ibuf.v, isize))
		errstr(SEV_FATAL, "munmap: MAP_ANONYMOUS");
	if ((ibuf.v = mmap(ibuf.v, isize, PROT_READ, MAP_FILE 
			  | MAP_SHARED | MAP_FIXED, 
			  fd_audio, 0)) == MAP_FAILED)

***
so i suppose something wrong with "isize"
only with ESS1938, it works with other cards.
Not-linear physical buffer in the card?
Do You know some hint, some trick out of ALSA API, how to "wrap" mmap? 
günther




-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations
Here's your chance to show off your extensive product knowledge
We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54

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

end of thread, other threads:[~2003-10-21 11:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-16 12:13 env LD_PRELOAD=/usr/lib/libaoss.so Günther Montag
2003-10-16 13:10 ` Takashi Iwai
2003-10-16 15:56   ` Dr. med. Günther Montag
2003-10-16 16:51     ` Takashi Iwai
2003-10-21 11:56       ` [Hfterm-hackers] " Günther Montag

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.