View previous topic :: View next topic |
Author |
Message |
GTXcube n00b
Joined: 05 Apr 2012 Posts: 31
|
Posted: Thu Jan 03, 2013 3:19 pm Post subject: [Solved] Alsa, Dmix, Flash and keyboard volume control |
|
|
Hello everybody. I have some problems with those things. I give you an examples.
1. When I start vlc & rhythmbox and then I start firefox with flash player, I can't hear any sound from flash. Sound from rhythmbox and vlc works
2. When I start firefox with 2 flash videos and then I start rhythmbox or vlc, I can hear sound from both vids but I can't hear sound from my player
3. I have some keys to control volume on my keyboard. They works good but not for flash !
This is my /etc/asound.conf file
Code: | pcm.dmixer
{
type dmix
slave
{
pcm "hw:1,7"
}
bindings
{
0 0
1 1
}
}
pcm.!default
{
type plug
slave.pcm dmixer
} |
Do you have any ideas ? What else should I post ? Thanks
Last edited by GTXcube on Sun Jan 13, 2013 3:51 pm; edited 1 time in total |
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Thu Jan 03, 2013 3:58 pm Post subject: |
|
|
Hi,
I just come to make a test. I played two Flash videos from Youtube simultaneously, than start Gnome-mplayer with an other video and all of them where earable. According with
Code: | $ aplay -l
**** Liste des Périphériques Matériels PLAYBACK ****
carte 0: pcsp [pcsp], périphérique 0: pcspeaker [pcsp]
Sous-périphériques: 1/1
Sous-périphérique #0: subdevice #0
carte 1: HDMI [HDA ATI HDMI], périphérique 3: HDMI 0 [HDMI 0]
Sous-périphériques: 1/1
Sous-périphérique #0: subdevice #0
carte 2: Generic [HD-Audio Generic], périphérique 0: STAC92xx Analog [STAC92xx Analog]
Sous-périphériques: 1/1
Sous-périphérique #0: subdevice #0
|
I use card number 2. So my /etc/asound.conf is
pcm.!default {
type hw
card 2
}
pcm.!default {
type plug
slave.pcm "dmixer"
}
pcm.dmixer {
type dmix
ipc_key 1024
slave {
channels 6
buffer_size 4096
buffer_time 0
pcm "hw:2,0"
period_size 1024
period_time 0
rate 48000
}
bindings {
0 0
1 1
}
}
ctl.dmixer {
type hw
card 2
}
ctl.!default {
type hw
card 2
}
The 2 in bold tell Alsa to use card number 2. You have to restart all applications after make a change to /etc/asound.conf. _________________ Paul |
|
Back to top |
|
|
PaulBredbury Watchman
Joined: 14 Jul 2005 Posts: 7310
|
Posted: Thu Jan 03, 2013 5:06 pm Post subject: |
|
|
Flash does not like low values for period_size and/or buffer_size. Take a look at the sample config in my sig. _________________ Improve your font rendering and ALSA sound |
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Thu Jan 03, 2013 6:21 pm Post subject: |
|
|
I haven't remark any problem with my actual asound.conf. I will try to increase the values. What's the best if I am not only using Flash? _________________ Paul |
|
Back to top |
|
|
PaulBredbury Watchman
Joined: 14 Jul 2005 Posts: 7310
|
Posted: Thu Jan 03, 2013 6:36 pm Post subject: |
|
|
Logicien wrote: | What's the best if I am not only using Flash? |
Whatever works with reasonable latency. The important thing is to be specifying them, so the first app to open the sound device doesn't set weird parameters that the other apps are then forced to use. |
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Thu Jan 03, 2013 7:38 pm Post subject: |
|
|
Very good. Thank you ! _________________ Paul |
|
Back to top |
|
|
GTXcube n00b
Joined: 05 Apr 2012 Posts: 31
|
Posted: Fri Jan 04, 2013 1:26 pm Post subject: |
|
|
This is my aplay -l
Code: | **** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
|
I use card 1, device 7 si I edited Logicien's asound.conf but always I can't hear sound from flash and some player in the same time and control volume of flash with my keyboard :/
Isn't it because I use HDMI ? |
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Sat Jan 05, 2013 4:17 pm Post subject: |
|
|
Did youy try card 0? _________________ Paul |
|
Back to top |
|
|
GTXcube n00b
Joined: 05 Apr 2012 Posts: 31
|
Posted: Sat Jan 05, 2013 4:37 pm Post subject: |
|
|
Card 0 is internal intel audio card on my motherboard and I have HDMI cable to A/V receiver from my nvidia card so I use card 1. I think the problem is in asound.conf but idk where :/ |
|
Back to top |
|
|
jiaxi n00b
Joined: 25 Sep 2012 Posts: 30
|
Posted: Tue Jan 08, 2013 2:08 pm Post subject: |
|
|
You can use dmix when you use default params to open audio device. And you canot open audio device use hw:1,7 when you use default params to open audio. |
|
Back to top |
|
|
_______0 Guru
Joined: 15 Oct 2012 Posts: 521
|
Posted: Wed Jan 09, 2013 12:44 pm Post subject: |
|
|
PaulBredbury wrote: | Flash does not like low values for period_size and/or buffer_size. Take a look at the sample config in my sig. |
Is it possible to find out about sound card's hardware buffer size? Then to work around those values to optimize for the card.
I ask because on another thread I was told that all hardware have buffers in them. |
|
Back to top |
|
|
PaulBredbury Watchman
Joined: 14 Jul 2005 Posts: 7310
|
Posted: Wed Jan 09, 2013 1:10 pm Post subject: |
|
|
_______0 wrote: | optimize for the card |
Gotta optimize for the software as well as the hardware, and the fussiness of the user.
So it's more a case of trial and error. I don't know a way of getting the hardware specs. |
|
Back to top |
|
|
GTXcube n00b
Joined: 05 Apr 2012 Posts: 31
|
Posted: Wed Jan 09, 2013 10:23 pm Post subject: |
|
|
So is there any possible way to get software mixing for my hw1,7 ? I think I tried everything I found with google but nothing works
Edit: Ok finally i got it working. I don't understand how but it works. I removed /etc/asound.conf, ~/.asoundrc and then I just selected right audio device in gnome-volume-control but anyway, thanks for all your replies |
|
Back to top |
|
|
|