template audio driver

Hi,

I’ve an AC97 Codec directly connected to the processor via an internal
AC97 Controller.
Can anyone provide me with a template driver which includes the init
procedure towards io-audio and dummy behaviour (so no actions on audio
hardware) towards io-audio and applications from which I can start
developing an audio driver?

I wrote already one which can be started and AC97 configurations works
very well and it establishes the dev-nodes. But when I want to use it
via applications I run in trouble.

Tiemo

I am confused. There is an example driver included in the Audio DDK
which does exactly what you are asking for. If you already wrote
a driver which partially works, then you must have the Audio DDK and you
must have the example.

Could you be more specific about exactly what “trouble” you have had?

Tiemo Krueger - mycable GmbH <tk@mycable.de> wrote:

Hi,

I’ve an AC97 Codec directly connected to the processor via an internal
AC97 Controller.
Can anyone provide me with a template driver which includes the init
procedure towards io-audio and dummy behaviour (so no actions on audio
hardware) towards io-audio and applications from which I can start
developing an audio driver?

I wrote already one which can be started and AC97 configurations works
very well and it establishes the dev-nodes. But when I want to use it
via applications I run in trouble.

Tiemo


James MacMillan, QNX Software Systems, Ltd. http://www.qnx.com
Semper Vigilans

The opinions expressed are my own and do not represent those of QSSL.

Hi James,

thank you for your reply. Yes, I started with the template driver, but
it is for PCI-AC97. So I had to remove all that PCI things. I have the
mycable XXS1500 Board (As far as I know you have 2 of them inside some
AMD AMM systems you got from AMD).

I use 6.2.1.

Using io-audio -dxxsac97 results in:

ls /dev/snd

controlC0 pcmC0D0p pcmC0D1p pcmPreferredp
mixerC0D0 pcmC0D1c pcmPreferredc

When I then start a player I see this:

plaympegaudio_noph /proc/boot/alert.mp3

Process 32775 (plaympegaudio_noph) terminated SIGILL code=5 fltno=2
ip=7825134c
mapaddr=0000734c. ref=00000000
Illegal instruction

I expected to see, that some of the functions inside my driver will be
accessed (I’ve a functionname printout in each function), but this
doesn’t happen.
But as I’ve learned, it may be possible that there is something wrong
with some applications. For example the mipsle ping in 6.2.1 doesn’t
work at all. So it may be possible that there is even something wrong in
the player, but I’m not sure about this.

I’ve included the following things additionally:

libasound.so.2
libmedia.so.2
deva-mixer-ac97.so
mpegaudio_noph.so
soundfile_noph.so

Tiemo

jamesm@qnx.com wrote:

I am confused. There is an example driver included in the Audio DDK
which does exactly what you are asking for. If you already wrote
a driver which partially works, then you must have the Audio DDK and you
must have the example.

Could you be more specific about exactly what “trouble” you have had?

Tiemo Krueger - mycable GmbH <> tk@mycable.de> > wrote:

Hi,


I’ve an AC97 Codec directly connected to the processor via an internal
AC97 Controller.
Can anyone provide me with a template driver which includes the init
procedure towards io-audio and dummy behaviour (so no actions on audio
hardware) towards io-audio and applications from which I can start
developing an audio driver?


I wrote already one which can be started and AC97 configurations works
very well and it establishes the dev-nodes. But when I want to use it
via applications I run in trouble.


Tiemo

Tiemo Krueger - mycable GmbH <tk@mycable.de> wrote:

Using io-audio -dxxsac97 results in:

ls /dev/snd

controlC0 pcmC0D0p pcmC0D1p pcmPreferredp
mixerC0D0 pcmC0D1c pcmPreferredc

Looks reasonable.

When I then start a player I see this:

plaympegaudio_noph /proc/boot/alert.mp3

Process 32775 (plaympegaudio_noph) terminated SIGILL code=5 fltno=2
ip=7825134c
mapaddr=0000734c. ref=00000000
Illegal instruction

I expected to see, that some of the functions inside my driver will be
accessed (I’ve a functionname printout in each function), but this
doesn’t happen.
But as I’ve learned, it may be possible that there is something wrong
with some applications. For example the mipsle ping in 6.2.1 doesn’t
work at all. So it may be possible that there is even something wrong in
the player, but I’m not sure about this.

Have you tried using the wave.c source which is included in the Audio
DDK to play a wave file?
Since then you will have full source access to both sides of the system,
it should be easier to determine where exactly is failing. Or, it may
just work.


James MacMillan, QNX Software Systems, Ltd. http://www.qnx.com
Semper Vigilans

The opinions expressed are my own and do not represent those of QSSL.

Tiemo Krueger - mycable GmbH <tk@mycable.de> wrote:

Illegal instruction

I expected to see, that some of the functions inside my driver will be
accessed (I’ve a functionname printout in each function), but this
doesn’t happen.
But as I’ve learned, it may be possible that there is something wrong
with some applications. For example the mipsle ping in 6.2.1 doesn’t
work at all. So it may be possible that there is even something wrong in
the player, but I’m not sure about this.

The mipsle 6.2.1 ping works fine (another developer working on a MIPS
platform confirmed this). Can you please expand on this statement?

Thanks


John

John Wall wrote:

Tiemo Krueger - mycable GmbH <> tk@mycable.de> > wrote:

The mipsle 6.2.1 ping works fine (another developer working on a MIPS
platform confirmed this). Can you please expand on this statement?

After update to 6.2.1 ping didn’t worked anymore (processor Au1500), it

dies with illegal instruction. I checked the previous backup and there
it still worked. Then I copied the 6.2.0 ping inside 6.2.1 and it works.
The 6.2.1 ping has more than the double size of the 6.2.0 ping.

Tiemo

Tiemo Krueger - mycable GmbH <tk@mycable.de> wrote:

John Wall wrote:
Tiemo Krueger - mycable GmbH <> tk@mycable.de> > wrote:

The mipsle 6.2.1 ping works fine (another developer working on a MIPS
platform confirmed this). Can you please expand on this statement?

After update to 6.2.1 ping didn’t worked anymore (processor Au1500), it
dies with illegal instruction. I checked the previous backup and there
it still worked. Then I copied the 6.2.0 ping inside 6.2.1 and it works.
The 6.2.1 ping has more than the double size of the 6.2.0 ping.

Tiemo

Does the AU1500 have an FPU (I believe not). Try adding the following
to your build file (under libc.so)

fpemu.so.2
libm.so.2

My guess is that ping under 6.2.1 requires the fpu (or emulation).


John

John Wall wrote:

fpemu.so.2
libm.so.2

During I wrote the last posting I thought already that it could be
something like that and in the minute of your reply I even found out by
myself. Thank you for your help! But I really don’t know why ping needs
fpu especially in an embedded environment. Even if the fpemu just
requires some 50k…
But this solved even my debugging problem with my audio device and I can
go on there…

Tiemo

Hello, Tiemo!

TKm> But I really don’t know why ping
TKm> needs fpu especially in an embedded environment. Even if the fpemu
TKm> just requires some 50k…

It is offtopic, but :slight_smile: ping requires fpu to calculate network latency in
"ms"s :slight_smile: I agree, very “useful” feature, especial for ping in embedded
systems :slight_smile: I think it can be also calculated with fixed point operations so
easily as with FPU, i.e. long long type big enough for that :slight_smile:

With best regards, Mike Gorchak. E-mail: mike@malva.ua

I use the 6.2.0 ping it is less then the half in size and needs no fpu.
More than enough for me.

Tiemo

Mike Gorchak wrote:

Hello, Tiemo!

TKm> But I really don’t know why ping
TKm> needs fpu especially in an embedded environment. Even if the fpemu
TKm> just requires some 50k…

It is offtopic, but > :slight_smile: > ping requires fpu to calculate network latency in
"ms"s > :slight_smile: > I agree, very “useful” feature, especial for ping in embedded
systems > :slight_smile: > I think it can be also calculated with fixed point operations so
easily as with FPU, i.e. long long type big enough for that > :slight_smile:

With best regards, Mike Gorchak. E-mail: > mike@malva.ua