New Audio Driver Collection

Discussion about writing software for VS1005 and the VSOS Operating System. Also posts about VS1005-related hardware design and device drivers should be posted here.
liku
Senior User
Posts: 85
Joined: Thu 2014-12-11 8:49

Re: New Audio Driver Collection

Post by liku » Mon 2015-08-17 8:50

I want to load the AUIADC.dl3 through my FM application.
In Config file, if i will add this line it works perfectly.

Code: Select all

AUIADC s
I want to reflect the same through my application (means i don't want it to be loaded through the config file), but i am unable to do the same.
I have tried in this way.

Code: Select all

adcLib = LoadLibrary("AUIADC");
if (!adcLib) {
	printf("Cannot load " LIB_NAME ".DL3 library\n");
}
/* Open */
adcFP = (FILE *)RunLoadedFunction(adcLib, ENTRY_MAIN, (int)"s");
if (!adcFP) {
	printf("Cannot open " LIB_NAME ".DL3 audio file\n");
}
Which gives me this error
ZeroPtrCall from 17551(0x448f), i0=7503(0x1d4f).
E'LIBTRACE'
E'noLibF'
E'DevNullRd'
So could you please tell me how to load the AUIADC.dl3 in the FM application.

User avatar
Panu
VLSI Staff
Posts: 2423
Joined: Tue 2010-06-22 13:43

Re: New Audio Driver Collection

Post by Panu » Mon 2015-08-17 10:24

Hi!

We may have found one problem that might relate to this - it's an internal problem: for the audio drivers the parameter needs to be given to the init() function and not to the main() function - we must modify the kernel to allow parameters to be given in the LoadLibrary call. It'll probably take a few days to update the kernel.

-Panu

PS. Put LIBTRACE.DL3 and FIND_ERR.DL3 to SYS so that the kernel can run an error trace for the ZeroPtrCall and send the results to the UART! The results may help us with finding the error!
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

User avatar
Henrik
VLSI Staff
Posts: 1041
Joined: Tue 2010-06-22 14:10

Re: New Audio Driver Collection

Post by Henrik » Tue 2015-10-13 9:16

Quick note:
The new audio drivers are included in the VSOS 3.25 release, so there is no need to load them separately from here.

Kind regards,
- Henrik
Good signatures never die. They just fade away.

User avatar
Henrik
VLSI Staff
Posts: 1041
Joined: Tue 2010-06-22 14:10

Re: New Audio Driver Collection v1.01

Post by Henrik » Mon 2015-12-21 15:25

Hello all!

Here is a updated version of the New Audio Driver collection.

There are no huge differences, but now it is possible to set the sample rate and number of bits of the automatic I2S output driver at the command line, which was earlier a bit difficult.

As usual, read the README.TXT for the package, as well as the README.TXT files for the individual driver you want to use.

Kind regards,
- Henrik

[EDIT 2016-01-28: Audio driver collection superseded with v1.02]
Attachments
AudioNew101.zip
New Audio Driver Collection v1.01
(307.86 KiB) Downloaded 169 times
Good signatures never die. They just fade away.

User avatar
Henrik
VLSI Staff
Posts: 1041
Joined: Tue 2010-06-22 14:10

Re: New Audio Driver Collection

Post by Henrik » Wed 2015-12-23 15:40

Note:
I split the long discussion with Safeer to another thread to avoid this one from becoming too cluttered. The new thread is here:
viewtopic.php?f=13&t=1773

Kind regards,
- Henrik
Good signatures never die. They just fade away.

User avatar
Henrik
VLSI Staff
Posts: 1041
Joined: Tue 2010-06-22 14:10

Re: New Audio Driver Collection v1.02

Post by Henrik » Wed 2016-01-27 15:01

Hello!

Here is a new, updated version of the Audio Driver collection, plus some tools to manipulate audio handles from the VSOS Shell command line. There are three files attached to this message:

AudioNew102.zip
  • Updated versions of all current audio drivers, with source code.
  • Bug fixes to I2S drivers, as well as AUODAC and AUOSPDA.
  • Update to I2S drivers.
  • All-new driver AUXSYNCS which synchronizes the earphone/line out driver AUODAC to e.g. an I2S input slave driver. The Sync driver adjusts the sample rate of the AUODAC driver so that audio buffers won't underflow or overflow.
  • Added Identify() method to all audio drivers so that AUINPUT and AUOUTPUT can show which audio driver is being used.
  • For details on how to use each driver, read the README.TXT file for that driver under the solutions/DRIVERNAME/ directory.
AuControl102.zip
  • Contains two VSOS Shell programs, AUINPUT and AUOUTPUT, that let the user investigate and manipulate stdaudioin and stdaudioout.
VS1005AudioSubsystem_v102.pdf
  • Documents the VS1005 VSOS Audio Subsystem with examples on how to use it, as well as the programs of AuControl.
[EDIT 2016-02-15: Audio driver collection superseded with v1.03]
Attachments
AudioNew102.zip
Audio drivers package v1.02
(297.15 KiB) Downloaded 104 times
AuControl102.zip
Audio control programs AUINPUT and AUOUTPUT
(43.96 KiB) Downloaded 107 times
VS1005AudioSubsystem_v102.pdf
Documentation for the VS1005 VSOS audio subsystem
(343.26 KiB) Downloaded 342 times
Good signatures never die. They just fade away.

Fridolin
Senior User
Posts: 20
Joined: Mon 2015-11-30 12:54

Re: New Audio Driver Collection

Post by Fridolin » Wed 2016-02-03 13:05

Hallo,

I tried to load the AUOISMA Driver and get the Error AUOI2SMA... E'ParamSpl not found'

Do I have to load any other driver previously?

Thanks!
config.txt

Code: Select all

# New 2015 audio DAC out driver
AUODAC s
# I2S automatic out
AUOI2SMA -96000
Console Output

Code: Select all

Hello.
VSOS 3.25 build Jan 08 2016 12:35:36
VLSI Solution Oy 2012-2015 - www.vlsi.fi

Starting the kernel..
Starting Devices... 
Internal Flash

Installed system devices:
S: SPI Flash c213, handled by FAT.
Load drivers, config 0...
Driver: AUODAC... 
Driver: AUOI2SMA... E'ParamSpl not found'

User avatar
Panu
VLSI Staff
Posts: 2423
Joined: Tue 2010-06-22 13:43

Re: New Audio Driver Collection

Post by Panu » Wed 2016-02-03 14:26

Hi!

It seems that PARAMSPL.DL3 is missing from S:SYS/ in your board's flash. It's called by many drivers to parse command line options.

Basically, unless you're running out of flash space, it's a good idea to keep all the utilities and drivers (DL3 files in S:SYS/ folder) that we publish in the root package in your board's flash. The latest root package has another folder, "small_root" that holds a smaller subset of frequently required DL3 files for smaller flashes.

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

User avatar
Henrik
VLSI Staff
Posts: 1041
Joined: Tue 2010-06-22 14:10

Re: New Audio Driver Collection v1.03

Post by Henrik » Mon 2016-02-15 16:09

Hello!

A new version of the audio driver collection, v1.03, has been included as part of the VSOS 3.26 Root and Libraries Source Code package. Also the documentation has been updated. To use the newest audio drivers install VSOS 3.26 to your board, then use the files of the Root and Libraries package. Link:
viewtopic.php?f=13&t=680&p=8943#p8942

In addition to updates to all audio driver, an all-new driver AUXPLAY.DL3 has been included. This driver copies contents of stdaudioin to stdaudioout in the background, so you can e.g. listen to analog inputs while running VSOS Shell commands

Kind regards,
- Henrik
Good signatures never die. They just fade away.

jedm@vpitech.com
Senior User
Posts: 43
Joined: Wed 2016-11-02 22:50

Re: New Audio Driver Collection

Post by jedm@vpitech.com » Wed 2017-05-10 0:03

AUOOSET:
I'm dumping some voice data to the auxiliary channel using the AUOOSET code. The library loads and runs fine but if I stop too long I get heavy duty clicks in the earphones. There's a positive voltage click on start of a new segment and a negative voltage click on the exit. I can minimize the ending click by turning off the DAO channel after the last write but then I get a huge click on startup.
...

Code: Select all

{
    u_int32 sz;
    u_int32 i;
    u_int16 cnt;
    u_int16 j;
    u_int16 k;
    u_int16 *p;
    u_int16 last;
    s_int32 srate = -24000;

    PERIP(DAOSET_CF) |= DAOSET_CF_ENA;
    
    // An unknown word here so use eh.
    if (w >= LASTWORD) w = EH;

    // Get ready to read and make the voice.
    fseek(G.VFILE, G.VoiceWordLocations[w].foffset, SEEK_SET);
    sz = G.VoiceWordLocations[w].fsize / 4;
    // printf("Word = %d, offset = %ld, size=%ld\n", w, G.VoiceWordLocations[w].foffset, sz);

    for (i = 0; i < sz; i += VOICEBEEPBUFFER)
    {
        if (i + VOICEBEEPBUFFER >= sz)
        {
            k = (u_int16) (sz - i);
	    fread(G.CBUFFER, k, 2, G.VFILE);
	    for (p = G.CBUFFER, j = 0; j < k; ++j) last = *p++ /= AFLOOD.CoachVolume;
            fwrite(G.CBUFFER, k, 2, DACOffset);
	}
        else
        {
	  fread(G.CBUFFER, VOICEBEEPBUFFER, 2, G.VFILE);
	  for (p = G.CBUFFER, j = 0; j < VOICEBEEPBUFFER * 2; ++j) last = *p++ /= AFLOOD.CoachVolume;
	  fwrite(G.CBUFFER, VOICEBEEPBUFFER, 2, DACOffset);
        }
    }
    PERIP(DAOSET_CF) &= ~DAOSET_CF_ENA;
}
Any ideas?

Post Reply