Wave Shield: daphc claiming WAVs are invalid

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
yksyks
 
Posts: 9
Joined: Tue May 28, 2013 6:43 pm

Wave Shield: daphc claiming WAVs are invalid

Post by yksyks »

I have a bizarre problem using daphc to test playing WAV files. There are two WAV files on my SD card and they are definitely 16 bit 22.05kHz. Below is what I am seeing when I try to play them using daphc. Note the long list of failures ("not a valid WAV") which ends in successful playback of one of the files.

Is there a list of SD card I/O errors anywhere by the way? I have searched high and low...

thanks for any suggestions!
----------------------------------------------------

Free RAM: 655
Using partition 1, type is FAT16
Files found (* = fragmented):
PART0001.WAV
PART0002.WAV

Playing PART0001.WAV

Playing PART0002.WAV Not a valid WAV
Playing PART0001.WAV Not a valid WAV
Playing PART0002.WAV Not a valid WAV
Playing PART0001.WAV Not a valid WAV
Playing PART0002.WAV Not a valid WAV
Playing PART0001.WAV Not a valid WAV
Playing PART0002.WAV Not a valid WAV
Playing PART0001.WAV Not a valid WAV
Playing PART0002.WAV Not a valid WAV
Playing PART0001.WAV Not a valid WAV
Playing PART0002.WAV Not a valid WAV
Playing PART0001.WAV Not a valid WAV
Playing PART0002.WAV Not a valid WAV
Playing PART0001.WAV Not a valid WAV
Playing PART0002.WAV Not a valid WAV
Playing PART0001.WAV Not a valid WAV
Playing PART0002.WAV Not a valid WAV
Playing PART0001.WAV Not a valid WAV
Playing PART0002.WAV Not a valid WAV
Playing PART0001.WAV Not a valid WAV
Playing PART0002.WAV Not a valid WAV
Playing PART0001.WAV Not a valid WAV
Playing PART0002.WAV Not a valid WAV
Playing PART0001.WAV Not a valid WAV
Playing PART0002.WAV Not a valid WAV
Playing PART0001.WAV Not a valid WAV
Playing PART0002.WAV Not a valid WAV
Playing PART0001.WAV Not a valid WAV
Playing PART0002.WAV

SD I/O error: 10, 2

User avatar
yksyks
 
Posts: 9
Joined: Tue May 28, 2013 6:43 pm

Re: Wave Shield: daphc claiming WAVs are invalid

Post by yksyks »

I just ran it again and it gives me different bad results...!


Free RAM: 655
Using partition 1, type is FAT16
Files found (* = fragmented):
PART0001.WAV
PART0002.WAV

Playing PART0001.WAV

Playing PART0002.WAV Not a valid WAV
Playing PART0001.WAV

SD I/O error: 3, 0

User avatar
Franklin97355
 
Posts: 23910
Joined: Mon Apr 21, 2008 2:33 pm

Re: Wave Shield: daphc claiming WAVs are invalid

Post by Franklin97355 »

Have you tried a different SD card? Or added another file? Did you format the SD card using the recommended SD card formatter?

User avatar
yksyks
 
Posts: 9
Joined: Tue May 28, 2013 6:43 pm

Re: Wave Shield: daphc claiming WAVs are invalid

Post by yksyks »

Yes I have used the 'official' SD card formatter as well as tried formatting with Mac OSX DiskUtility. I have tried multiple WAVs of different durations, exported from several different audio editing apps. I also noted that OSX was creating a bunch of hidden files on the SD card so I have been removing those using the command line Terminal app.

Here is the latest error report, with yet again a different error code (are these codes described anywhere?!). Note that in this case the SD card has only one WAV file. After seven "not valid" reports, the file plays! But it does not repeat play, as it's supposed to in the daphc demo.

thanks for any more suggestions...

Free RAM: 669
Using partition 1, type is FAT16
Files found (* = fragmented):
MOTV-001.WAV

Playing MOTV-001.WAV

Playing MOTV-001.WAV Not a valid WAV
Playing MOTV-001.WAV Not a valid WAV
Playing MOTV-001.WAV Not a valid WAV
Playing MOTV-001.WAV Not a valid WAV
Playing MOTV-001.WAV Not a valid WAV
Playing MOTV-001.WAV Not a valid WAV
Playing MOTV-001.WAV Not a valid WAV
Playing MOTV-001.WAV

SD I/O error: 10, 0

User avatar
yksyks
 
Posts: 9
Joined: Tue May 28, 2013 6:43 pm

Re: Wave Shield: daphc claiming WAVs are invalid

Post by yksyks »

I just tried a different SD card, and...

Free RAM: 669
Using partition 1, type is FAT16
Files found (* = fragmented):
MOTV-001.WAV

Playing MOTV-001.WAV

Playing MOTV-001.WAV Not a valid WAV
Playing MOTV-001.WAV

SD I/O error: 3, 0

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Wave Shield: daphc claiming WAVs are invalid

Post by adafruit_support_rick »

Please post clear, detailed pictures of both sides of the wave shield, showing your soldering.

User avatar
yksyks
 
Posts: 9
Joined: Tue May 28, 2013 6:43 pm

Re: Wave Shield: daphc claiming WAVs are invalid

Post by yksyks »

adafruit_support_rick wrote:Please post clear, detailed pictures of both sides of the wave shield, showing your soldering.
I abandoned the daphc example which was giving me all those odd errors, and instead based my project on a much simpler WaveHC demo which I found on someone else's site. Their more stripped-down simple file player works just fine with my setup -- no errors whatsoever. I didn't have time to debug what the problem was with daphc, and the other example was sufficient to enable me to do what I need to in the short term.

I don't think those errors were anything to do with my soldering. I would post photos but the Arduino+Wave Shield are now back inside a piece which I am returning to an exhibition today... hopefully to continue running 24/7! See YouTube link.
https://www.youtube.com/watch?v=X_Blgw4bACg

Also, I'll ask again: can anyone point me to a description of the SD card error codes?

Thanks!

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Wave Shield: daphc claiming WAVs are invalid

Post by adafruit_support_rick »

I don't know of any description of the SD error codes. You'll probably have to read the WaveHC code for that.

User avatar
yksyks
 
Posts: 9
Joined: Tue May 28, 2013 6:43 pm

Re: Wave Shield: daphc claiming WAVs are invalid

Post by yksyks »

adafruit_support_rick wrote:I don't know of any description of the SD error codes. You'll probably have to read the WaveHC code for that.
Ah yes... in SdReader.h there is a commented list which helps somewhat, though it's still a bit opaque to me.

Thanks!
// SD card errors
/** timeout error for command CMD0 */
#define SD_CARD_ERROR_CMD0 0X1
/** CMD8 was not accepted - not a valid SD card*/
#define SD_CARD_ERROR_CMD8 0X2
/** card returned an error response for CMD17 (read block) */
#define SD_CARD_ERROR_CMD17 0X3
/** card returned an error response for CMD24 (write block) */
#define SD_CARD_ERROR_CMD24 0X4
/** card returned an error response for CMD58 (read OCR) */
#define SD_CARD_ERROR_CMD58 0X5
/** card's ACMD41 initialization process timeout */
#define SD_CARD_ERROR_ACMD41 0X6
/** card returned a bad CSR version field */
#define SD_CARD_ERROR_BAD_CSD 0X7
/** read CID or CSD failed */
#define SD_CARD_ERROR_READ_REG 0X8
/** bad response echo from CMD8 */
#define SD_CARD_ERROR_CMD8_ECHO 0X09
/** timeout while waiting for start of read data */
#define SD_CARD_ERROR_READ_TIMEOUT 0XD
/** card returned an error token instead of read data */
#define SD_CARD_ERROR_READ 0X10

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”