strange audio bug with flash

OSS specific Linux discussion (x86/amd64)

Moderators: hannu, dev, cesium, kodachi

strange audio bug with flash

Postby krz » Fri Jul 02, 2010 10:28 pm

I found a strange flashplayer bug. On deviantart.com there is one flash advertisement which causes my browser and oss freeze (I don't know which one causes the problem). I can't play anything until I kill the flashplugin process. After that the sound works again without reloading oss (sudo soundoff/soundon). I think this is a flashplayer libraries fault.

My specs are:
Ubuntu 10.04 + SBLive 5.1
krz
 
Posts: 11
Joined: Fri Jul 02, 2010 10:08 pm

Re: strange audio bug with flash

Postby cesium » Fri Jul 02, 2010 11:45 pm

I suspect it's flash's fault, but if you gave a direct URL it would help.
You probably remember how it looks, right? So erase/move /usr/lib/libflashsupport.so symlink - if flash can't find that file, it can't play sound under oss. Make sure it can't play sound. Then navigate to that URL, and find the ad. If it still freezes and such, than the issue is flash's fault. If it does not freeze, you should be to get the URL and paste it here. Once you are done, you can move the symlink back.
cesium
 
Posts: 903
Joined: Sun Aug 12, 2007 12:51 am

Re: strange audio bug with flash

Postby krz » Sat Jul 03, 2010 4:21 pm

Now I found real source of the problem. I can't run mplayer and flashplayer simultaneously. One of them blocks access to oss another, but other programs (like Audacious) work nice. If I close a card with flash advertisement or youtube movie, firefox hangs itself.

If I run mplayer first, Firefox gives me this:
Code: Select all
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib pcm_hw.c:1401:(_snd_pcm_hw_open) Invalid value for card


Same in another way (it's gmplayer):
Code: Select all
[AO OSS] audio_setup: Can't open audio device /dev/dsp: Device or resource busy
Failed to initialize audio driver 'oss'
Could not open/initialize audio device -> no sound.
Audio: no sound


After reloading oss driver, both work again, but still not at the same time.
krz
 
Posts: 11
Joined: Fri Jul 02, 2010 10:08 pm

Re: strange audio bug with flash

Postby cesium » Sat Jul 03, 2010 6:31 pm

Can you paste output of 'ossinfo -v3'? vmix probably isn't attached, so that's why multiple clients don't work. You probably need to put a "vmixctl attach" command in soundon.user.
cesium
 
Posts: 903
Joined: Sun Aug 12, 2007 12:51 am

Re: strange audio bug with flash

Postby krz » Sat Jul 03, 2010 6:44 pm

This is what I got:
Code: Select all
Version info: OSS 4.2 (b 2003/201005280201) (0x00040100) TRIAL
Platform: Linux/i686 2.6.32-23-generic #37-Ubuntu SMP Fri Jun 11 07:54:58 UTC 2010 (krzysiek)

Number of audio devices:   5
Number of audio engines:   9
Number of MIDI devices:      1
Number of mixer devices:   1


Device objects
0: osscore0 OSS core services
1: oss_sblive0 SB Live interrupts=35743 (35743)
2: oss_usb0 USB audio core services

MIDI devices (/dev/midi*)
0: SB Live external MIDI (MIDI port 1 of device object 1)
    Device file /dev/oss/oss_sblive0/mid0, Legacy device /dev/midi00
    Modes: IN/OUT , Available for use
    Caps:
    Minimum latency: Not indicated
    Device handle: PCI80641102-0000:04:01.0-md01


Mixer devices
0: SB Live (STAC9708) (Mixer 0 of device object 1)
    Device file /dev/oss/oss_sblive0/mix0, Legacy device /dev/mixer1
    Priority: 2
    Caps:
    Device handle: PCI80641102-0000:04:01.0-mx01
    Device priority: 2


Audio devices
SB Live main                      /dev/oss/oss_sblive0/pcm0  (device index 0)
    Legacy device /dev/dsp8
    Caps: DUPLEX TRIGGER MMAP
    Modes: IN/OUT
      Engine      1: 0/SB Live main
                     Busy (OUT) by PID 6641 / plugin-containe label 'plugin-containe'
      Engine      2: 1/SB Live main (vmix)
                     Available for use
      Engine      3: 2/SB Live main (vmix)
                     Available for use
      Engine      4: 3/SB Live main (vmix)
                     Available for use
      Engine      5: 4/SB Live main (vmix)
                     Available for use
    Input formats (0x00000010):
      AFMT_S16_LE   - 16 bit signed little endian
    Output formats (0x00000418):
      AFMT_U8      - 8 bit unsigned
      AFMT_S16_LE   - 16 bit signed little endian
      AFMT_AC3      - AC3 (Dolby Digital) encoded audio
    Device handle: PCI80641102-0000:04:01.0-au01
    Related mixer dev: 0
    Sample rate source: 0
    Preferred channel configuration: Not indicated
    Supported number of channels (min - max): 1 - 2
    Native sample rates (min - max): 8000 - 48000 (8000,11025,16000,22050,24000,32000,44100,48000)
    HW Type: Not indicated.
    Minimum latency: Not indicated

SB Live front out                 /dev/oss/oss_sblive0/pcm1  (device index 1)
    Legacy device /dev/dsp9
    Caps: TRIGGER MMAP
    Modes: OUTPUT
      Out engine  1: 5/SB Live front out
                     Available for use
    Input formats (0x00000010):
      AFMT_S16_LE   - 16 bit signed little endian
    Output formats (0x00000418):
      AFMT_U8      - 8 bit unsigned
      AFMT_S16_LE   - 16 bit signed little endian
      AFMT_AC3      - AC3 (Dolby Digital) encoded audio
    Device handle: PCI80641102-0000:04:01.0-au02
    Related mixer dev: 0
    Sample rate source: 0
    Preferred channel configuration: Not indicated
    Supported number of channels (min - max): 1 - 2
    Native sample rates (min - max): 8000 - 48000 (8000,11025,16000,22050,24000,32000,44100,48000)
    HW Type: Not indicated.
    Minimum latency: Not indicated

SB Live side out                  /dev/oss/oss_sblive0/pcm2  (device index 2)
    Legacy device /dev/dsp10
    Caps: TRIGGER MMAP
    Modes: OUTPUT
      Out engine  1: 6/SB Live side out
                     Available for use
    Input formats (0x00000010):
      AFMT_S16_LE   - 16 bit signed little endian
    Output formats (0x00000418):
      AFMT_U8      - 8 bit unsigned
      AFMT_S16_LE   - 16 bit signed little endian
      AFMT_AC3      - AC3 (Dolby Digital) encoded audio
    Device handle: PCI80641102-0000:04:01.0-au03
    Related mixer dev: 0
    Sample rate source: 0
    Preferred channel configuration: Not indicated
    Supported number of channels (min - max): 1 - 2
    Native sample rates (min - max): 8000 - 48000 (8000,11025,16000,22050,24000,32000,44100,48000)
    HW Type: Not indicated.
    Minimum latency: Not indicated

SB Live center/lfe out            /dev/oss/oss_sblive0/pcm3  (device index 3)
    Legacy device /dev/dsp11
    Caps: TRIGGER MMAP
    Modes: OUTPUT
      Out engine  1: 7/SB Live center/lfe out
                     Available for use
    Input formats (0x00000010):
      AFMT_S16_LE   - 16 bit signed little endian
    Output formats (0x00000418):
      AFMT_U8      - 8 bit unsigned
      AFMT_S16_LE   - 16 bit signed little endian
      AFMT_AC3      - AC3 (Dolby Digital) encoded audio
    Device handle: PCI80641102-0000:04:01.0-au04
    Related mixer dev: 0
    Sample rate source: 0
    Preferred channel configuration: Not indicated
    Supported number of channels (min - max): 1 - 2
    Native sample rates (min - max): 8000 - 48000 (8000,11025,16000,22050,24000,32000,44100,48000)
    HW Type: Not indicated.
    Minimum latency: Not indicated

SB Live 5.1 output device         /dev/oss/oss_sblive0/pcm4  (device index 4)
    Legacy device /dev/dsp12
    Caps: TRIGGER MMAP
    Modes: OUTPUT
      Out engine  1: 8/SB Live 5.1 output device
                     Available for use
    Input formats (0x00000010):
      AFMT_S16_LE   - 16 bit signed little endian
    Output formats (0x00000010):
      AFMT_S16_LE   - 16 bit signed little endian
    Device handle: PCI80641102-0000:04:01.0-au05
    Related mixer dev: -1
    Sample rate source: 5
    Preferred channel configuration: MULTICH
    Supported number of channels (min - max): 2 - 6
    Native sample rates (min - max): 8000 - 48000
    HW Type: Not indicated.
    Minimum latency: Not indicated


Nodes
  /dev/dsp -> /dev/oss/oss_sblive0/pcm0
  /dev/dsp_in -> /dev/oss/oss_hdaudio0/pcm0
  /dev/dsp_out -> /dev/oss/oss_hdaudio0/pcm0
  /dev/dsp_ac3 -> /dev/oss/oss_hdaudio0/spdout0
  /dev/dsp_mmap -> /dev/oss/oss_hdaudio0/pcm0
  /dev/dsp_multich -> /dev/oss/oss_hdaudio0/pcm0
krz
 
Posts: 11
Joined: Fri Jul 02, 2010 10:08 pm

Re: strange audio bug with flash

Postby cesium » Sat Jul 03, 2010 6:47 pm

vmix is attached...

Can multiple instances of 'osstest -V' play together? And what is "plugin-containe"?

Anyhow, some compat symlinks are out of whack. Try running "sudo ossdevlinks -v -r".

Btw, your card has hardware mixing, so you can use that too. e.g. 'mplayer -ao oss:/dev/oss/oss_sblive0/pcm1' etc.
cesium
 
Posts: 903
Joined: Sun Aug 12, 2007 12:51 am

Re: strange audio bug with flash

Postby krz » Sat Jul 03, 2010 7:40 pm

I think I know where the problem is. Something crashed before, and it can't handle more processes. I can run xine and audacity at the same moment, but most programs not! Before everything was ok.

Can multiple instances of 'osstest -V' play together?
Yes

And what is "plugin-containe"?
"plugin-containe" is a firefox feature used to run plugins like flashplayer.

Try running "sudo ossdevlinks -v -r".
Code: Select all
5 audio devices
/dev/dsp0 is the next free legacy device
/dev/dsp0: No such file or directory
Created new legacy device /dev/dsp0 -> /dev/oss/oss_sblive0/pcm0
/dev/dsp1: No such file or directory
Created new legacy device /dev/dsp1 -> /dev/oss/oss_sblive0/pcm1
/dev/dsp2: No such file or directory
Created new legacy device /dev/dsp2 -> /dev/oss/oss_sblive0/pcm2
/dev/dsp3: No such file or directory
Created new legacy device /dev/dsp3 -> /dev/oss/oss_sblive0/pcm3
/dev/dsp4: No such file or directory
Created new legacy device /dev/dsp4 -> /dev/oss/oss_sblive0/pcm4
0 legacy dsp device files
/dev/oss/oss_sblive0/pcm0 is the default /dev/dsp device
/dev/oss/oss_sblive0/pcm0 is the default dsp_out device
/dev/oss/oss_sblive0/pcm0 is the default dsp_in device
/dev/oss/oss_sblive0/pcm0 is the default AC3 output device
/dev/oss/oss_sblive0/pcm0 is the default mmap output device
/dev/oss/oss_sblive0/pcm4 is the default multichan output device
1 mixer devices
/dev/mixer1 is the next free legacy device
/dev/mixer0: No such file or directory
Created new legacy device /dev/mixer0 -> /dev/oss/oss_sblive0/mix0
1 legacy mixer device files
1 midi devices
/dev/midi01 is the next free legacy device
/dev/midi00: No such file or directory
Created new legacy device /dev/midi00 -> /dev/oss/oss_sblive0/mid0
1 legacy MIDI device files

Is it right?
krz
 
Posts: 11
Joined: Fri Jul 02, 2010 10:08 pm

Re: strange audio bug with flash

Postby cesium » Sat Jul 03, 2010 8:34 pm

If 'osstest -V' works multiple times, then maybe it's a software issue... First, stop firefox, restart OSS and test again both with 'osstest -V', 'ossplay' and whatever programs you using. If it still fails, tell me which program fails and see if you can get an error message.
cesium
 
Posts: 903
Joined: Sun Aug 12, 2007 12:51 am

Re: strange audio bug with flash

Postby krz » Sat Jul 03, 2010 9:59 pm

Ok. I reinstalled oss, setup everything, and now it works.
Anyway. Thanks for help :)
krz
 
Posts: 11
Joined: Fri Jul 02, 2010 10:08 pm


Return to Linux

Who is online

Users browsing this forum: Google [Bot] and 5 guests