Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Multimedia
  • Search

[Solved] Alsa, Dmix, Flash and keyboard volume control

Help with creation, editing, or playback of sounds, images, or video. Amarok, audacious, mplayer, grip, cdparanoia and anything else that makes a sound or plays a video.
Post Reply
Advanced search
13 posts • Page 1 of 1
Author
Message
GTXcube
n00b
n00b
Posts: 31
Joined: Thu Apr 05, 2012 3:39 pm

[Solved] Alsa, Dmix, Flash and keyboard volume control

  • Quote

Post by GTXcube » Thu Jan 03, 2013 3:19 pm

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: Select all

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.
Top
Logicien
Veteran
Veteran
User avatar
Posts: 1555
Joined: Fri Sep 16, 2005 8:04 am
Location: Montréal

  • Quote

Post by Logicien » Thu Jan 03, 2013 3:58 pm

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: Select all

$ 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
Top
PaulBredbury
Watchman
Watchman
User avatar
Posts: 7310
Joined: Thu Jul 14, 2005 3:47 pm

  • Quote

Post by PaulBredbury » Thu Jan 03, 2013 5:06 pm

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
Top
Logicien
Veteran
Veteran
User avatar
Posts: 1555
Joined: Fri Sep 16, 2005 8:04 am
Location: Montréal

  • Quote

Post by Logicien » Thu Jan 03, 2013 6:21 pm

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
Top
PaulBredbury
Watchman
Watchman
User avatar
Posts: 7310
Joined: Thu Jul 14, 2005 3:47 pm

  • Quote

Post by PaulBredbury » Thu Jan 03, 2013 6:36 pm

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.
Top
Logicien
Veteran
Veteran
User avatar
Posts: 1555
Joined: Fri Sep 16, 2005 8:04 am
Location: Montréal

  • Quote

Post by Logicien » Thu Jan 03, 2013 7:38 pm

Very good. Thank you !
Paul
Top
GTXcube
n00b
n00b
Posts: 31
Joined: Thu Apr 05, 2012 3:39 pm

  • Quote

Post by GTXcube » Fri Jan 04, 2013 1:26 pm

This is my aplay -l

Code: Select all

**** 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 ?
Top
Logicien
Veteran
Veteran
User avatar
Posts: 1555
Joined: Fri Sep 16, 2005 8:04 am
Location: Montréal

  • Quote

Post by Logicien » Sat Jan 05, 2013 4:17 pm

Did youy try card 0?
Paul
Top
GTXcube
n00b
n00b
Posts: 31
Joined: Thu Apr 05, 2012 3:39 pm

  • Quote

Post by GTXcube » Sat Jan 05, 2013 4:37 pm

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 :/
Top
jiaxi
n00b
n00b
Posts: 30
Joined: Tue Sep 25, 2012 6:52 am

  • Quote

Post by jiaxi » Tue Jan 08, 2013 2:08 pm

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.
Top
_______0
Guru
Guru
Posts: 521
Joined: Mon Oct 15, 2012 6:05 pm

  • Quote

Post by _______0 » Wed Jan 09, 2013 12:44 pm

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.
Top
PaulBredbury
Watchman
Watchman
User avatar
Posts: 7310
Joined: Thu Jul 14, 2005 3:47 pm

  • Quote

Post by PaulBredbury » Wed Jan 09, 2013 1:10 pm

_______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.
Top
GTXcube
n00b
n00b
Posts: 31
Joined: Thu Apr 05, 2012 3:39 pm

  • Quote

Post by GTXcube » Wed Jan 09, 2013 10:23 pm

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 :)
Top
Post Reply

13 posts • Page 1 of 1

Return to “Multimedia”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Authors
Gentoo is a trademark of the Gentoo Foundation, Inc. and of Förderverein Gentoo e.V.
The contents of this document, unless otherwise expressly stated, are licensed under the CC-BY-SA-4.0 license.
The Gentoo Name and Logo Usage Guidelines apply.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy