jithurbide Posted August 15, 2015 Report Share Posted August 15, 2015 Hello,I try to run a simple mp3 player. To do it, I first try to run the play-vs1053 demo with success. Secondly, I try to run my own soft (without the demo part) with success. Now I try to run the wav file from an SD card.We I use romfs, I can play the wav but when I try to read the file from the Sd I have no sound. I know that the SD card is reading because the file size is correct but there is no sound. I can't find why. I attached my code then you can see exactly what I do. I don't know why is not working. Coud you help me ?JulienMikroMedia-Basis.zip Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted August 15, 2015 Report Share Posted August 15, 2015 Hello jithurbide,I am sorry but I am currently very busy so I can't have an in-depth look at your application right now.Are you able to play the MP3 from the SD-Card as well or does the MP3 code just work with the ROMFS as well?If you cannot play the MP3 from the SD-Card either I would recommend you verifying that you can access your SD-Card through GFILE without any issues. For this, try to read from and write to a file on the SD-Card.~ Tectu Link to comment Share on other sites More sharing options...
jithurbide Posted August 16, 2015 Author Report Share Posted August 16, 2015 Hello Tectu,Here are all the tests I have do now to be sure ...A)I create a file toto.txt on my computer and save it on the SD.I do a simple soft that read the file and display it on the screen. -> working correctly.B)I create a basis soft reading the allwrong.wav from ROMFS. -> working also like a charmC)Change the basis soft. Now I'm reading the SD card. I see that my soft read the file correctly (do some chprintf for debug). But it's seems that the audio part is not init correctly. I don't know how the audio driver is coding. But, I know the mikromedia card share the spi3 for audio and sd card. May the problem come from here. But, I can't find any solution. I try to do a spiStart() all time I change from accessing vs1053 codec and file without success.Have you any idea ?Julien Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted August 17, 2015 Report Share Posted August 17, 2015 Can you try accessing the file on the SD card while modifying some registers in the audio codec chip?When I remember correctly you have to call spiStop() before calling spiStart() with the other configuration struct when using the ChibiOS/HAL.~ Tectu Link to comment Share on other sites More sharing options...
jithurbide Posted August 29, 2015 Author Report Share Posted August 29, 2015 When I remember correctly you have to call spiStop() before calling spiStart() with the other configuration struct when using the ChibiOS/HAL.~ TectuYou are right ! I tested with just a spiStop() before all my spiStart() and now it's working. Thank's a lot.Julien Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted August 29, 2015 Report Share Posted August 29, 2015 Glad to hear that you got it working! Happy hacking ~ Tectu Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now