drdevil44
Posts: 39
Joined: Sun Mar 04, 2012 8:56 pm

Re: ALSA drivers?

Fri Apr 20, 2012 12:05 pm

PS vcfiled seems to create some sort of filesystem for message parsing to the GPU and then enter an infinite loop.  It seems mandatory for GPU usage.

I"ve got the disassembly of vcfiled – although cant see a "filesystem" anywhere after execution.  It does appear to use /dev/vchiq

drdevil44
Posts: 39
Joined: Sun Mar 04, 2012 8:56 pm

Re: ALSA drivers?

Fri Apr 20, 2012 1:08 pm

In the irq callback, shouldn't these calculations be 'floor()ed' ?
if (alsa_stream->period_size) {
if ((alsa_stream->pos / alsa_stream->period_size) !=
((alsa_stream->pos + consumed) / alsa_stream->period_size))
new_period = 1;
}
Otherwise if consumed places the pointer half way through the period it'll be rounded up and presumably skip the rest? 
Disclaimer: I'm still getting up to scratch it all so my comment is probably invalid.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 17770
Joined: Sat Jul 30, 2011 7:41 pm

Re: ALSA drivers?

Fri Apr 20, 2012 1:13 pm

C division is floored as standard.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

drdevil44
Posts: 39
Joined: Sun Mar 04, 2012 8:56 pm

Re: ALSA drivers?

Fri Apr 20, 2012 1:21 pm

Bugger me I never knew that! In fact, I doubted your statement enough to try it out

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 17770
Joined: Sat Jul 30, 2011 7:41 pm

Re: ALSA drivers?

Fri Apr 20, 2012 1:32 pm

drdevil44 said:


Bugger me I never knew that! In fact, I doubted your statement enough to try it out


I hope I was right in your tests.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

drdevil44
Posts: 39
Joined: Sun Mar 04, 2012 8:56 pm

Re: ALSA drivers?

Fri Apr 20, 2012 1:34 pm

12/10 = 1root@gho-server:~# ./tst 0 10
0/10 = 0root@gho-server:~# ./tst 7 10
7/10 = 0root@gho-server:~# ./tst 9 10
9/10 = 0root@gho-server:~# ./tst 11 10
11/10 = 1 

Tavalin
Posts: 59
Joined: Mon Apr 16, 2012 9:53 pm

Re: ALSA drivers?

Fri Apr 20, 2012 8:57 pm

drdevil44 said:


Use modprobe rather than insmod – I think it takes care of dependancies.

I too have output from mplayer but it stalls.

The demos in /opt/vc/src work but you first have to run

/opt/vc/sbin/vcfiled

Just trying to get OMX player to compile but its an arse!

This one seems targetted at rasp-pi – should allow high def vid playing – first to get it to compile please upload binaries

https://github.com/huceke/omxplayer



I've managed to get a bit further, the players are starting to play the files (and then stalls after 5-10seconds) but I'm not hearing any sound via the HDMI nor the headphone jack.  Is there a way to find out where the sound is being output or force it to output from a particular one?

Thanks again

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5097
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: ALSA drivers?

Fri Apr 20, 2012 10:27 pm

sudo amixer cset numid=3 x
x=0 automatic
x=1 headphones
x=2 hdmi

auotomatic will be hdmi if the EDID from HMDI says it supports audio, otherwise headphones.

cperrin88
Posts: 5
Joined: Thu Apr 19, 2012 8:49 pm

Re: ALSA drivers?

Fri Apr 20, 2012 10:44 pm

I get sound view audiojack but not via HDMI ...

Yfory
Posts: 96
Joined: Thu Apr 19, 2012 10:29 am

Re: ALSA drivers?

Sat Apr 21, 2012 6:17 pm

Following the instructions on this thread, using the 19/04 build, I have so far managed to get recognisable sound out of the 3.5 jack from .wav files using LXMusic, however using aplay with the same files I get white noise. If I set for audio to go to HDMI for output, I hear nothing. This is using a tv without mute

mplayer crashes more than I care to mention.

reggie
Posts: 151
Joined: Fri Aug 26, 2011 11:51 am

Re: ALSA drivers?

Wed May 02, 2012 8:35 pm

Hi all, I'm probably a bit late to this party but have any of you jumped onto #alsa-soc on freenode?  Last time I was there a really helpful guy called Broonie helped me with a driver issue, the guy knows his beans!!  Might be worth asking if he'll take a look over the code to see if there's anything glaringly obvious that might've been missed?

Regards,

Reggie.

Mash
Posts: 2
Joined: Fri May 25, 2012 2:55 am

Re: ALSA drivers?

Fri May 25, 2012 3:18 am

I'm having the stalling of audio issues as well. I'm using raspbian with pianobar. If I don't do anything on the pi while pianobar is playing it'll be fine. If I open another ssh session and run something it'll cause the audio to stall as well. Running top in another SSH session will usually cause the stall within it's 5th update, 'find /' will cause the stall pretty quickly. I saw these in dmesg tonight and had not seen them previously:

Code: Select all

bcm2835 ALSA CARD CREATED!
### BCM2835 ALSA driver init OK ###
snd_bcm2835_playback_open:97 Alsa open (0)
vcos: [2057]: bcm2835_audio_write:778 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
vcos: [2057]: bcm2835_audio_write:778 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
vcos: [2057]: bcm2835_audio_write:778 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
vcos: [2057]: bcm2835_audio_write:778 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
vcos: [2057]: bcm2835_audio_write:778 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
vcos: [2057]: bcm2835_audio_write:778 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
vcos: [2057]: bcm2835_audio_write:778 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
vcos: [2057]: bcm2835_audio_write:778 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
vcos: [2057]: bcm2835_audio_write:778 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
vcos: [2057]: bcm2835_audio_write:778 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
vcos: [2057]: bcm2835_audio_write:778 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
vcos: [2057]: bcm2835_audio_write:778 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
vcos: [2057]: bcm2835_audio_write:778 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
vcos: [2057]: bcm2835_audio_write:778 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
vcos: [2057]: bcm2835_audio_write:778 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
vcos: [2057]: bcm2835_audio_write:778 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
vcos: [2057]: bcm2835_audio_write:778 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
vcos: [2057]: bcm2835_audio_write:778 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
vcos: [2057]: bcm2835_audio_write:778 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
vcos: [2057]: bcm2835_audio_write:778 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
vcos: [2057]: bcm2835_audio_write:778 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
vcos: [2057]: bcm2835_audio_write:778 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
vcos: [2057]: bcm2835_audio_write:778 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
vcos: [2484]: bcm2835_audio_set_ctls_chan:475 bcm2835_audio_set_ctls_chan: failed on waiting for event (status=10)
Failed to set ALSA controls..
vcos: [2485]: bcm2835_audio_set_ctls_chan:475 bcm2835_audio_set_ctls_chan: failed on waiting for event (status=10)
Failed to set ALSA controls..
vcos: [2057]: bcm2835_audio_write:778 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
vcos: [2057]: bcm2835_audio_write:778 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
snd_bcm2835_playback_close:167 Alsa close
vcos: [2057]: bcm2835_audio_close:702 bcm2835_audio_close: failed on waiting for event (status=10)
vcos: [2057]: vc_vchi_audio_deinit:309 vc_vchi_audio_deinit: failed to close VCHI service connection (status=1)
vcos: [2521]: bcm2835_audio_set_ctls_chan:475 bcm2835_audio_set_ctls_chan: failed on waiting for event (status=10)
Failed to set ALSA controls..
snd_bcm2835_playback_open:97 Alsa open (0)
vcos: [2525]: bcm2835_audio_write:778 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
vcos: [2525]: bcm2835_audio_write:778 bcm2835_audio_write: failed on vchi_bulk_queue_transmit (status=-1)
vcos: [2530]: bcm2835_audio_set_ctls_chan:475 bcm2835_audio_set_ctls_chan: failed on waiting for event (status=10)
Failed to set ALSA controls..
snd_bcm2835_playback_close:167 Alsa close

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5097
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: ALSA drivers?

Fri May 25, 2012 8:56 am


Return to “Troubleshooting”

Who is online

Users browsing this forum: ab1jx, ukscone and 55 guests