[alsa-devel] explicit commandline control of speakers vs headphone output

Eric Holstege eric_holstege at yahoo.com
Thu Aug 26 20:40:49 CEST 2010


My specific sound HW is "nVidia Corporation MCP79 High Definition Audio 
(rev b1)"
*== lspci*:
00:08.0 Audio device: nVidia Corporation MCP79 High Definition Audio 
(rev b1)
        Subsystem: Micro-Star International Co., Ltd. Device 4570
        Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 23
        Memory at fae78000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: <access denied>
        Kernel driver in use: HDA Intel
        Kernel modules: snd-hda-intel
*== lshal*:
udi = '/org/freedesktop/Hal/devices/pci_10de_ac0'
  info.linux.driver = '*HDA Intel*'  (string)
  info.parent = '/org/freedesktop/Hal/devices/computer'  (string)
  info.product = 'MCP79 High Definition Audio'  (string)
  info.subsystem = 'pci'  (string)
  info.udi = '/org/freedesktop/Hal/devices/pci_10de_ac0'  (string)
  info.vendor = 'nVidia Corporation'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'pci'  (string)
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:08.0'  (string)
  pci.device_class = 4  (0x4)  (int)
  pci.device_protocol = 0  (0x0)  (int)
  pci.device_subclass = 3  (0x3)  (int)
  pci.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:08.0'  (string)
  pci.product = '*MCP79 High Definition Audio*'  (string)
  pci.product_id = 2752  (*0xac0*)  (int)
  pci.subsys_product_id = 17776  (0x4570)  (int)
  pci.subsys_vendor = 'Micro-Star International Co., Ltd.'  (string)
  pci.subsys_vendor_id = 5218  (0x1462)  (int)
  pci.vendor = 'nVidia Corporation'  (string)
  pci.vendor_id = 4318  (0x10de)  (int)

Does the hardware support this (explicit control (e.g. via a script or 
commandline) of whether the sound  is going to the speakers or to the 
headphone even when the headphone is plugged in.)

If the hardware supports it, how would I, in fact, switch via 
commandline between the two outputs?
Thanks in advance
-Eric

-----------------------

Eric Holstege wrote:
> It appears that when I have a headphone plugged in, the speakers are 
> automatically disabled and the output sound is sent to the headphone.
>
> However, I want to explicitly control (e.g. via a script or 
> commandline - not a GUI) whether the sound from an (arbitrary) 
> application is going to the speakers or to the headphone even when the 
> headphone is plugged in.
> (When I say "arbitrary application" that means I can't alter the code 
> of the application itself).
>
> Is this possible?
>
> (I have heard that ALSA mutes the speakers when it detects plugged-in 
> headphones. Is switching between them as simple as using e.g. 
> amixer(1) to unmute the speakers and mute the headphones and vice 
> versa, or is there more to it.)
>







      


More information about the Alsa-devel mailing list