VS1000 Audio Module Step-by-Step

Writing software that controls the system and peripherals such as displays, SD cards, Buttons, LEDs, Serial Ports etc.
User avatar
pasi
VLSI Staff
Posts: 1467
Joined: Thu 2010-07-15 16:04

Re: VS1000 Audio Module Step-by-Step

Post by pasi » Mon 2013-03-11 15:56

1. To change the default startup volume, see the start of main() in usbmass.c and change the value assigned to player.volume .

2. For random play, look at the code after the playloop: label in spiplayer.c and sdplayer.c, and where player.currentFile is assigned. sdplayer.c has random play code, enable it to support random play. Use if (1) instead of if(player.randomOn to have random play always. See Shuffle() documentation from dev1000.h for a shuffle play.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

jcristiano
User
Posts: 2
Joined: Wed 2013-03-06 19:50

Re: VS1000 Audio Module Step-by-Step

Post by jcristiano » Tue 2013-03-12 0:34

Pasi,

Thanks for your reply. I've set the default volume to -24 and it works great. I think
the volume range is -24 0 +24 ?

Changing the default setting to random or shuffle seems a little more complex. I need
to read through the code that you've indicated and see if I can understand your
instructions regarding changing it. From what I understand there are two types of
randomization. "Random" and "shuffle". I'm reading the code to see how each works.

I'm an EE not a software guy so I'm just trying to hack it. I'll get back tomorrow.

Thanks again,

Jim

joymonkey
User
Posts: 3
Joined: Wed 2013-04-10 16:20

Re: VS1000 Audio Module Step-by-Step

Post by joymonkey » Sat 2013-04-13 0:25

I'd like to edit the default firmware so when the module powers up with an SD card is present, it plays the first OGG file it finds on the SD, then stops and waits for UART commands.
It seems like this should be simple to do; I assume I'll need to edit the playloop at the end of sdplayer.c, but I'm not a seasoned programmer so not sure exactly what to do.
Can you offer any advise?

sunchangping
User
Posts: 1
Joined: Sat 2013-09-14 9:38
Contact:

Re: VS1000 Audio Module Step-by-Step

Post by sunchangping » Sat 2013-09-14 9:41

It would be very nice if you could give us a further hint. Many friens of me awaiting for confirmation of WAV player functionality working. We need it for our model tracks ...!
I have been a FunForFreedom survivor since 7/2/12!Runescape Gold
RS Gold WOW Gold
Supporting Leon X Zara! <3
I have a blog!

User avatar
pasi
VLSI Staff
Posts: 1467
Joined: Thu 2010-07-15 16:04

Re: VS1000 Audio Module Step-by-Step

Post by pasi » Mon 2013-09-16 14:01

The latest version (0.60) includes the WAV decoder. See http://www.vlsi.fi/en/support/software/ ... tions.html .
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

User avatar
pasi
VLSI Staff
Posts: 1467
Joined: Thu 2010-07-15 16:04

Re: VS1000 Audio Module Step-by-Step

Post by pasi » Mon 2013-09-16 14:04

joymonkey wrote:I'd like to edit the default firmware so when the module powers up with an SD card is present, it plays the first OGG file it finds on the SD, then stops and waits for UART commands.
If you don't need to return to continuous play mode ever, then add an assignment into playerMode after PlayWavOrOggFile() / PatchPlayCurrentFile() (in sdplayer.c and/or spiplayer.c):

Code: Select all

#ifdef USE_WAV
                    PlayWavOrOggFile();
#else
                    PatchPlayCurrentFile();
#endif
                    playerMode = PLAYER_WAIT_FOR_COMMAND; // <--- added, switch to file mode
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

shayanjameel08
User
Posts: 5
Joined: Sat 2013-10-12 10:20

Re: VS1000 Audio Module Step-by-Step

Post by shayanjameel08 » Mon 2013-10-14 14:15

I have already commented out the USE_USB but still memory is insufficient

Wielomat
User
Posts: 2
Joined: Mon 2013-10-21 15:21

Re: VS1000 Audio Module Step-by-Step

Post by Wielomat » Mon 2013-10-21 15:42

I have problems generating an image that already includes some ogg files.
So far I'm using the default VS1000 Audiomodule firmware V0.6.

To generate an image with ogg files I used imggen from http://www.vlsi.fi/en/support/software/vs1000tools.html with following settings:
- custom or self-compiled boot code from file
- SPI Flash/Eeprom
- Nominal size: 2M
- Erasable Block Size: 512 Bytes
- Bus Access Time: 70
- Force FAT partition to start at sector: 64

This should give me an image file where the FAT part starts at address 0x8000
As it did not work I inspected the file with an editor and the FAT content started at 0x8000 but the SDPlayer that should have been placed at 0x4000 was gone.

So I have 2 problems now:
1) imggen seems to be buggy as it also deletes/ignore stuff BEFORE forced FAT partition start (default FAT start is at sector 32, which calculates to address 0x4000)
2) SPIPlayer can't find the FAT partition at address 0x8000

I presumed the value for FAT start is equal to the define RESERVED_BLOCKS in system.h, as 64 * 512 Bytes would mean adress 0x8000 and the image generated by VSIDE ends before address 0x6000.

User avatar
pasi
VLSI Staff
Posts: 1467
Joined: Thu 2010-07-15 16:04

Re: VS1000 Audio Module Step-by-Step

Post by pasi » Tue 2013-10-22 16:22

Are you sure you are giving the right name for the custom boot image?

The 'normal' content programming method is copying the image from the uSD card (SDUPDATE.PRG and CONTENT.RAW, optionally FIRMWARE.RAW).

But I think what your problem is. If you are going to program both the boot image and the content together using the imggen, then you should comment out the USE_INVERTED_DISK_DATA from system.h and recompile.

system.h:
//#define USE_INVERTED_DISK_DATA 1
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

Wielomat
User
Posts: 2
Joined: Mon 2013-10-21 15:21

Re: VS1000 Audio Module Step-by-Step

Post by Wielomat » Tue 2013-10-22 16:45

Thanks, I found out the USE_INVERTED_DISK_DATA already by scanning multiple times through different examples and now it works.
However, why does the imggen tool fill the area starting at 0x4000 with 0xFF although the compiled image contains code there AND that I told the tool to start with FAT at 0x8000 instead of 0x4000?

Post Reply