Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PCM 5820 AUDIO DRIVER

0 views
Skip to first unread message

Damon Barry [MS]

unread,
Aug 13, 2003, 11:17:02 PM8/13/03
to
You've concentrated on problems with the PDD driver since the UAM driver
caused problems on boot-up. But I would strongly suggest investigating the
UAM driver first, since it is second generation. I'm guessing the Geode
BSP/CSP changed between 4.0 and 4.2, and maybe that's why this problem
doesn't show up in the Advantech image??? If there are subtle differences
between your hardware and the hardware against which the BSP was developed,
that could affect the way interrupts are set up on your device (boot-time).
And the swmixer messages you're seeing are a clear indication that
something's wrong with interrupts.

--
dam...@online.microsoft.com (Remove the 'online.' from my address to
reach me.)
_____________________________________________________________
This posting is provided "AS IS" with no warranties, and confers no rights.
_____________________________________________________________
The Windows CE .NET documentation is online at:
http://msdn.microsoft.com/library/en-us/wcelib40/html/pb_start.asp?frame=tru
e


"Stefano Vaccari" <ste...@tin.it> wrote in message
news:817623ee.03080...@posting.google.com...
> Thanks for your suggestions.
> Points 1 and 5 are OK. I verified that audio works fine using an old
> WinCE 4.0 image given by Advantech(unfortunately that image doesn't
> contain the features I need, so I have to build one)
>
> I'm using the Waveform Audio Device driver wavedev_gx.dll.
> Checking the registry I saw the correct instance corresponding to
> template.
> The command 'gi mod' listed wavedev_gx.dll.
> Running a .wav file with Media Player everything seems ok, but no
> sound comes out from speakers.
> Running wavplay the system re-boot.
>
> I rebuilt my image in debug mode; running it the debug window scrolls
> continuously down writing the folowing message: "SwMixer:
> WaitForBuffer failed. Audio driver missed interrupt?"
>
> Thank for your help.
> Stefano
>
>
> dam...@online.microsoft.com (Damon Barry [MS]) wrote in message
news:<b3hgckKT...@cpmsftngxa06.phx.gbl>...
> > OK, so a few more things to try:
> >
> > 1. Is on-board audio enabled in the BIOS on the Geode box?
> > I once had a Geode box with a dead CMOS battery (or some such problem),
and
> > the BIOS reset everytime I rebooted the device--very annoying!
> >
> > 2. Are the Geode audio settings making it into the registry?
> > There are several ways to check this. For starters, look at reginit.ini
in
> > your build release directory: are the audio entries there?
Specifically,
> > look for gxuamaud and wavedev keys under
> > [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\PCI\Template]. Next, look at the
> > registry after boot-up: are there actual instances under
[...\PCI\Instance]
> > that correspond to the templates? You can examine the registry via the
> > remote registry editor in PB, or through other tools that exist out
there
> > in the world.
> >
> > 3. Is the PCI bus finding the audio hardware and loading the driver?
> > After device boot-up, from the target control window in PB issue the
> > command 'gi mod' to list all loaded DLLs on the target device. Is
> > wavedev.dll loaded? Is gxuamaud.dll loaded?
> >
> > 4. If you step through a sample app that plays a wave file (try
> > public\common\sdk\samples\audio\wavplay), does anything look fishy
(return
> > codes, etc)?
> >
> > 5. Are your speakers connected to the right plug on the back of the box
> > (sorry, I have to ask...)?
> >
> > dam...@online.microsoft.com (Remove the 'online.' from my address to
> > reach me.)
> > _____________________________________________________________
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> > _____________________________________________________________
> > The Windows CE .NET documentation is online at:
> >
http://msdn.microsoft.com/library/en-us/wcelib40/html/pb_start.asp?frame=tru
> > e
> >
> >
> > >From: "Stefano Vaccari" <ste...@tin.it>
> > >Subject: Re: PCM 5820 AUDIO DRIVER
> > >Date: Tue, 17 Jun 2003 14:31:44 -0700
> > >Newsgroups: microsoft.public.windowsce.platbuilder
> > >
> > >Thank you. I checked that but it wasn't set.
> > >Stefano
> > >


Stefano Vaccari

unread,
Aug 26, 2003, 8:36:38 AM8/26/03
to
Hi,
I tried the UAM driver in debug mode and it works fine!!!!
The problem remains on the release mode. The system hangs.
What (and how) shoul I investigate?
Thaks in advace
Stefano


"Damon Barry [MS]" <dam...@online.microsoft.com> wrote in message news:<u$7DKKhYD...@TK2MSFTNGP10.phx.gbl>...

Damon Barry [MS]

unread,
Aug 26, 2003, 5:01:56 PM8/26/03
to
This sounds just like another converstaion I had about Geode audio recently
on this newsgroup. Here's the link to the thread:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=d5124f84.0308010125.
1f93645e%40posting.google.com

--
dam...@online.microsoft.com (Remove the 'online.' from my address to
reach me.)
_____________________________________________________________
This posting is provided "AS IS" with no warranties, and confers no rights.
_____________________________________________________________
The Windows CE .NET documentation is online at:
http://msdn.microsoft.com/library/en-us/wcelib40/html/pb_start.asp?frame=tru
e


"Stefano Vaccari" <ste...@tin.it> wrote in message

news:817623ee.03082...@posting.google.com...

Stefano Vaccari

unread,
Aug 27, 2003, 2:36:08 AM8/27/03
to
Now it works!!! Thank you. Many thanks to Gábor Varga too(he gave me
his duraudio.c)
The main problem was codec initialization.
I noticed in debug window the following:
GXAUDIO Codec Vendor ID : 00000000
GXAUDIO Codec Revision: 00
What I made was to comment out a few lines in duraudio.c
forcing the choice of the "else" in the following test:
//if (DURAUDIO_CodecRead(pGeode, AD1819A_VENDORID1) == 0x4144 &&
// DURAUDIO_CodecRead(pGeode, AD1819A_VENDORID2) == 0x5303)
//{
// pGeode->fAD1819A = TRUE;
// Enable non-48kHz sample rates.
// DURAUDIO_CodecWrite (pGeode, AD1819A_SER_CONF,
// (unsigned short) (DURAUDIO_CodecRead(pGeode
// , AD1819A_SER_CONF>>8)//|AD1819A_SER_CONF_DRQEN));
//}
//else
//{
pGeode->fAD1819A = FALSE;
DURAUDIO_CodecWrite (pGeode, EXT_AUDIO_CTRL_STAT,
(unsigned short) (DURAUDIO_CodecRead(pGeode
,EXT_AUDIO_CTRL_STAT) | 0x0001));
//}

This modification lets the driver work in debug mode, but in release
mode the system hangs anyway. I then modified the "DURAUDIO_CodecRead"
function
as done by Gábor Varga:

volatile unsigned long Count;
volatile int i;
volatile unsigned long CodecRegister_data = 0;
volatile unsigned long val;
unsigned short DURAUDIO_CodecRead ( PDURAUDIO pGeode, unsigned char
CodecRegister )
{

CodecRegister_data = ((unsigned long)CodecRegister)<<24;
CodecRegister_data |= 0x80000000; // High-bit set (p.106) is a
CODEC reg READ.

Count = 0;

do
{
if (Count < 0x00FFFFFF)
++Count;

DURAUDIO_WaitFrameAndWrite (pGeode, CodecRegister_data);

//
// Wait for Status Tag and Status Valid bits in the CODEC Status
Register
//
for( i=0; i<=30000; i++)
{
val = *((unsigned long *)( pGeode->F3BAR0 + CODEC_STATUS_REG ));

if( ( val & CODEC_STATUS_VALID ) || ( val & CODEC_STATUS_NEW ))
break;
}
} while ( ((unsigned long) (0xFF & CodecRegister)) != ((0xFF000000 &
val)>>24) ); // Check if the register read is the one we want

return( (unsigned short)val );
}

Now it works fine.
Unfortunately in my final image I must disable KITL and this
compromise audio working... I will investigate.
Ciao

"Damon Barry [MS]" <dam...@online.microsoft.com> wrote in message news:<e59ZLVBb...@tk2msftngp13.phx.gbl>...

Stefano Vaccari

unread,
Aug 27, 2003, 11:44:53 AM8/27/03
to
In the previous message I forgot to say that also the
"DURAUDIO_WaitFrameAndWrite" function has been modified:

volatile unsigned long cmd_val, timeout;
void DURAUDIO_WaitFrameAndWrite (PDURAUDIO pGeode, unsigned long val)
{

timeout = 30000;

while ((*((unsigned long *)( pGeode->F3BAR0 + CODEC_CMD_REG )) &
CODEC_CMD_VALID) && (--timeout));

cmd_val = val & CODEC_COMMAND_MASK;

*((unsigned long *)( pGeode->F3BAR0 + CODEC_CMD_REG )) = cmd_val;
}

that's all.


0 new messages