Go to advanced search

by karlkiste
Wed Feb 06, 2013 9:40 am
Forum: General programming discussion
Topic: Is "bash script" a relevant language?
Replies: 25
Views: 3363

Re: Is "bash script" a relevant language?

[...] I haven't outgrown Bash just yet. You won't :-D At first, and that was around ten years ago, coming from MS-DOS, I thought bash scripts were like batch files. Like slow and inflexible. I was going to start an IDE to write a compiled program many times, and then I found out that bash could do ...
by karlkiste
Wed Feb 06, 2013 9:29 am
Forum: General programming discussion
Topic: Is "bash script" a relevant language?
Replies: 25
Views: 3363

Re: Is "bash script" a relevant language?

On the Pi the uart is normally accessible at /dev/ttyAMA0. Err, yes, sorry, I should have explained a bit more. The CPU has at least two uarts. One of them is a quite simple one which needs relatively much CPU assistance to do transfers, and a more full-featured one which has larger buffers and the...
by karlkiste
Wed Feb 06, 2013 8:45 am
Forum: General programming discussion
Topic: Is "bash script" a relevant language?
Replies: 25
Views: 3363

Re: Is "bash script" a relevant language?

joan wrote:Try stty to configure the uarts.
Yes, thanks, this is as soon as there is a /dev/tty* for it, but when starting raspbian uart0 is activated. I presume I'd need a more specialized tool first to switch to uart1 which is better suited to do high speed transmissions at low CPU usage.
by karlkiste
Wed Feb 06, 2013 7:22 am
Forum: General programming discussion
Topic: Is "bash script" a relevant language?
Replies: 25
Views: 3363

Is "bash script" a relevant language?

Hi all! I'm a bit funny in my language preferences, I'm stuck to pascal a bit and can't warm up for C. So, for keeping things simple, I often fall back on bash scripts if execution speed permits it. Which is the right forum to ask questions on programming the pi hardware in bash scripts? My first qu...
by karlkiste
Thu Jan 31, 2013 3:05 pm
Forum: Graphics, sound and multimedia
Topic: Question about running multiple IO streams across GPIO
Replies: 6
Views: 1333

Re: Question about running multiple IO streams across GPIO

You're right, it is similar to a VGA connection, only a recent VGA output may not be able to produce a resolution as low as this. The pixel clock is around 13MHz. In theory, it could even be possible to output a picture through GPIO as slow as that, but it's not going to be easy. If black and white ...
by karlkiste
Thu Jan 31, 2013 1:29 pm
Forum: Graphics, sound and multimedia
Topic: Question about running multiple IO streams across GPIO
Replies: 6
Views: 1333

Re: Question about running multiple IO streams across GPIO

No, HDMI is digital only. (See http://www.raspberrypi.org/faqs ,scroll down to "Why is there no VGA support?") Analogue video can be set to ntsc cvbs, however. Is it this what you need? I hope I did not mislead you, audio can not be directly connected to the GPIO. You'll need additional hardware. It...
by karlkiste
Thu Jan 31, 2013 8:13 am
Forum: Graphics, sound and multimedia
Topic: Question about running multiple IO streams across GPIO
Replies: 6
Views: 1333

Re: Question about running multiple IO streams across GPIO

For the (analog) audio part, this is possible, it's quite easy in fact. The SPI interface present at the GPIO port can do it, connected to an industry-standard D/A-converter. See http://www.raspberrypi.org/phpBB3/viewtopic.php?f=38&t=30777 A driver still has to be written, of course. Definitely the ...
by karlkiste
Fri Jan 25, 2013 8:20 am
Forum: Graphics, sound and multimedia
Topic: Multiple audio streams on GPIO
Replies: 6
Views: 5451

Re: Multiple audio streams on GPIO

So, if my near-caveman understanding of electronics is correct, I'm going to need to hook up each DAC (of which I have 4) to 3 GPIO ports, using 12 ports in total? Not quite. The Rpi has a dedicated hardware SPI interface which can output serial data at 16MHz with little CPU load. These lines, call...
by karlkiste
Thu Jan 24, 2013 1:54 pm
Forum: Graphics, sound and multimedia
Topic: Multiple audio streams on GPIO
Replies: 6
Views: 5451

Re: Multiple audio streams on GPIO

What is "decent"? Enough to _really_ fill the room :D I'm thinking 50 watts per channel (about 20V, 8 ohm speakers. did i do that math correctly?). roughly, yes, but peak voltage is 1.41 times higher, so you'll need about 30V supply. Using bridge outputs you could go with 15V. You won't be able to ...
by karlkiste
Wed Jan 23, 2013 8:17 am
Forum: Graphics, sound and multimedia
Topic: Using the Raspberry Pi to transcode MPEG2 to h264?
Replies: 2
Views: 1943

Re: Using the Raspberry Pi to transcode MPEG2 to h264?

I have no idea ;) But I would like you to keep in mind that encoding to h264 is not all. Yes, it can perhaps be hardware-accelerated, but you also need to decode the MPEG2 first! You'd need to buy a codec ($3 or so) to do that in hardware. If you're decoding in software, it will slow down the hardwa...
by karlkiste
Wed Jan 23, 2013 7:49 am
Forum: Graphics, sound and multimedia
Topic: Multiple audio streams on GPIO
Replies: 6
Views: 5451

Re: Multiple audio streams on GPIO

What is "decent"? The volume of a single panpipe or more like a rock concert? For 1 Watt, L2722 is a cheap solution, for 30 Watt, look for the TDA2030 family. Direct drive will not be possible, except that you're really going to output rectangle wave beeps. If you want to try, better use protection ...
by karlkiste
Wed Jan 23, 2013 7:24 am
Forum: Graphics, sound and multimedia
Topic: Click noise when starting analog audio sound playback
Replies: 18
Views: 19547

Re: Click noise when starting analog audio sound playback

More curious findings:

aplay clicks on a file which usually doesn't click, if master volume is set low (<85%). Volume must be high for click to disappear.

omxplayer does not respect alsa volume settings.
by karlkiste
Tue Jan 22, 2013 12:57 pm
Forum: Graphics, sound and multimedia
Topic: Click noise when starting analog audio sound playback
Replies: 18
Views: 19547

Re: Click noise when starting analog audio sound playback

The smartass way: Plug in a USB sound device. Not my preferred way, as the general quality is OK for me, the sound device costs extra money, and does certainly consume more power than leaving the PWM on all the time. Power is minuscule and cost is minor for a USB sound card. The card I'm using was ...
by karlkiste
Tue Jan 22, 2013 9:43 am
Forum: Graphics, sound and multimedia
Topic: Click noise when starting analog audio sound playback
Replies: 18
Views: 19547

Click noise when starting analog audio sound playback

Hi all! Yes, this topic has been discussed before. I can, however, not find a satisfying solution or workaround. Let me first start by summing up what I have found out so far on this topic: The analog audio output is in fact digital PWM. The PWM frequency is around 40MHz, it is low-pass-filtered, DC...

Go to advanced search