[SOLVED] Pi Zero, PWM (analogue) output - Printable Version
+- Forum (http://forum.xbian.org)
+-- Forum: Hardware (/forum-7.html)
+--- Forum: Video and Audio (/forum-28.html)
+--- Thread: [SOLVED] Pi Zero, PWM (analogue) output (/thread-3895.html)
Pi Zero, PWM (analogue) output - TheDutypaid - 10th Apr, 2017 06:38 AM
Hello, I have just joined this forum, sorry for posting in here first but I can not start a new topic?
I have a question about using PWN audio with a Pi Zero.
Hoping I will be able to put this in the right part of the forum soon.
RE: I am a noob, please help me! - Nachteule - 10th Apr, 2017 07:03 AM
(10th Apr, 2017 06:38 AM)TheDutypaid Wrote: Hello, I have just joined this forum, sorry for posting in here first but I can not start a new topic?
What is PWN audio ???
And what is your question ???
RE: I am a noob, please help me! - TheDutypaid - 10th Apr, 2017 09:16 AM
I am making a project where I am putting a Pi Zero into an old portable TV. Using XBian as I have found getting a composite signal from the other KODI's was tricky and this on has a nice big interface. the screen is very small.
The big problem I am having is the audio, I made the RC filter for the Zero and added "dtoverlay=pwm,pin=18,func=2" to the config file. But still no audio.
I have tested the sound is working on the TV, which is fine. Not sure if I screwed up the filter or it is a software problem.
I noted in the read me file,
Info: Configures the audioinjector.net audio add on soundcard
Info: Switches PWM sound output to pins 12 (Right) & 13 (Left)"
I think I understand you need to put some text into the config file, but I'm unsure what?
RE: I am a noob, please help me! - Nachteule - 10th Apr, 2017 11:09 PM
I do not have Pi Zero, so I do not have any practical experience with such device
(10th Apr, 2017 09:16 AM)TheDutypaid Wrote: Sorry 'PWM'
I'm sure you know this article
But you forgot to assign second channel. However, I don't believe that this is the problem
Quote:I have tested the sound is working on the TV, which is fine. Not sure if I screwed up the filter or it is a software problem.
Test without filter
Quote:I noted in the read me file,
I suppose audremap overlay did not exist when above linked article was written.
So, did you already added
to config.txt without adding dtoverlay=pwm,pin=18,func=2 to that file and use pin 12 and 13 for audio output?
Btw, which sound device are you using in Kodi? You have to use Analogue output
RE: Pi Zero, PWM (analogue) output - TheDutypaid - 11th Apr, 2017 02:22 AM
Thank you so much for the help so far it it most kind.
Nachteule Wrote:I'm sure you know this article
Yes I have read through that and this guide builds upon it and is a lot simpler.
Quote:Test without filter
yes, first port of call. I don't even get static so this leads me to believe, there is no output of any kind.
Quote:I suppose audremap overlay did not exist when above linked article was written.
I have it set to both analogue and HDMI which I changed in the main settings.
Tried quite a few variants of code, including what you have said.
This is my current text I added to the config file.
I need to try building a new filter, I am only testing with a mono quick board that was made up out of salvaged components that I desoldered from old PCB's all parts was tested before making the board up
Finding reference to Kodi, Pi Zero and audio is hard. HDMI and job is done. Not many people want to watch TV on a 2.3" LCD
The model of portable I am using is a small handheld one 'Casio TV-880' It has AV input which is lucky as the old analogue TV signal was switched off in the UK a good few years ago now.
I'll be away next week for Easter but hope to test the new filter before then.
Will report back when I have new findings. Will still check on here if there is anymore ideas.
RE: Pi Zero, PWM (analogue) output - Nachteule - 11th Apr, 2017 04:22 AM
Hmmm, the Raspberry Pi Zero Audio Circuit howto you're using sounds quite simple
Why are you adding
to your config.txt? IMO audioinjector-wm8731-audio overlay is needed for different audio sound card, so you should not add it.
I think adding
is quite enough for audio part (and oc dtparam=audio=on, but this is enabled per default)
RE: Pi Zero, PWM (analogue) output - TheDutypaid - 13th Apr, 2017 03:24 AM
Got all my new components today and breadboarded it all up for testing. Only running the one line of audio code
Turned it all on and... nothing.
Even tested bare output from the Zero.
I feel the problem is a programming one,
Looking back through the README.overlays file I found this, which I have not tested as running out of time, do you think this is what is needed?
So do I need to add this below to the config file?
I'm unsure about the val.
RE: Pi Zero, PWM (analogue) output - Nachteule - 13th Apr, 2017 03:31 AM
You could try it, but don't put both dtoverlay= lines to config.txt. Only one of them
IMO audremap does not need any parameters, bc you do not need to swap l<->r channel and you do not have audio jack output on Pi Zero
RE: Pi Zero, PWM (analogue) output - TheDutypaid - 13th Apr, 2017 06:35 AM
I have been a bit silly, been following this 'pin out' for the Pi
There is a big difference between 'pin' 13 and GPIO 13
The simple code, works fine.
Thank you again for your help you have given and setting up my question in the right place.
It was with your support, I keep trying new things and double checking my work. Funny when your mind thinks you have something right, that is completely wrong.
RE: Pi Zero, PWM (analogue) output - Nachteule - 13th Apr, 2017 07:15 AM
Indeed, it is
I was thinking about that, but was sure you were usiing right pins
Quote:The simple code, works fine.
You're welcome. Good, you got it now
Enjoy your new project, so this thread can be set to solved