[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

how to configure pulseaudio to use analog speaker on motherboard not hdmi on video card



Hi,

On my machine, which was installed long ago, and recently upgraded with new motherboard
and new video card which has an HDMI interface, I am having difficulities with pulseaudio.

My problem is: 
When I boot up I can't hear sound from vlc application nor iceweasel  via  my speakers connected
to the motherboard 
(nor even via the HDMI cable to my monitor - but I prefer the speakers and not the monitor HDMI).


When I  boot, my machine pulseaudio selects a HDMI sound device (on the video card I guess)
while  I would like it to select the analog sound card on the motherboard.  

Additonally pulseaudio seems not to recognize the analog sink on the motherboard initially
at all.

Thus:
After I startup X and then run

mlaks@Rashi:~$ pacmd
No PulseAudio daemon running, or not running as session daemon.

So I run

mlaks@Rashi:~$ start-pulseaudio-x11
mlaks@Rashi:~$ pacmd
Welcome to PulseAudio! Use "help" for usage information.
>>> list-sinks
1 sink(s) available.
  * index: 0
	name: <alsa_output.pci-0000_01_00.1.hdmi-stereo>
	driver: <module-alsa-card.c>
	flags: HARDWARE DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
	state: SUSPENDED
	suspend cause: IDLE 
	priority: 9050
	volume: 0: 100% 1: 100%
	        0: 0.00 dB 1: 0.00 dB
	        balance 0.00
	base volume: 100%
	             0.00 dB
	volume steps: 65537
	muted: no
	current latency: 0.00 ms
	max request: 0 KiB
	max rewind: 0 KiB
	monitor source: 0
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	used by: 0
	linked by: 0
	configured latency: 0.00 ms; range is 0.50 .. 371.52 ms
	card: 0 <alsa_card.pci-0000_01_00.1>
	module: 5
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "HDMI 0"
		alsa.id = "HDMI 0"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "3"
		alsa.card = "1"
		alsa.card_name = "HDA ATI HDMI"
		alsa.long_card_name = "HDA ATI HDMI at 0xfbe9c000 irq 44"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:01:00.1"
		sysfs.path = "/devices/pci0000:00/0000:00:02.0/0000:01:00.1/sound/card1"
		device.bus = "pci"
		device.vendor.id = "1002"
		device.string = "hdmi:1"
		device.buffering.buffer_size = "65536"
		device.buffering.fragment_size = "32768"
		device.access_mode = "mmap+timer"
		device.profile.name = "hdmi-stereo"
		device.profile.description = "Digital Stereo (HDMI)"
		device.description = "HDA ATI HDMI Digital Stereo (HDMI)"
		alsa.mixer_name = "ATI R6xx HDMI"
		alsa.components = "HDA:1002aa01,00aa0100,00100300"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: yes)
			properties:
				device.icon_name = "video-display"
	active port: <hdmi-output-0>

>>> list-cards
1 card(s) available.
    index: 0
	name: <alsa_card.pci-0000_01_00.1>
	driver: <module-alsa-card.c>
	owner module: 5
	properties:
		alsa.card = "1"
		alsa.card_name = "HDA ATI HDMI"
		alsa.long_card_name = "HDA ATI HDMI at 0xfbe9c000 irq 44"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:01:00.1"
		sysfs.path = "/devices/pci0000:00/0000:00:02.0/0000:01:00.1/sound/card1"
		device.bus = "pci"
		device.vendor.id = "1002"
		device.string = "1"
		device.description = "HDA ATI HDMI"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	profiles:
		output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5400, available: unknown)
		off: Off (priority 0, available: unknown)
	active profile: <output:hdmi-stereo>
	sinks:
		alsa_output.pci-0000_01_00.1.hdmi-stereo/#0: HDA ATI HDMI Digital Stereo (HDMI)
	sources:
		alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor/#0: Monitor of HDA ATI HDMI Digital Stereo (HDMI)
	ports:
		hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: yes)
			properties:
				device.icon_name = "video-display"



Then I do the following 
I run this script:

#!/bin/bash
for i in /dev/snd/*; do echo $i; sudo lsof $i; done

and I get this output


/dev/snd/by-path
/dev/snd/controlC0
COMMAND    PID              USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
pulseaudi 5165 speech-dispatcher   23u   CHR  116,6      0t0 5100 /dev/snd/controlC0
pulseaudi 5165 speech-dispatcher   28u   CHR  116,6      0t0 5100 /dev/snd/controlC0
pulseaudi 5165 speech-dispatcher   30u   CHR  116,6      0t0 5100 /dev/snd/controlC0
pulseaudi 5165 speech-dispatcher   35u   CHR  116,6      0t0 5100 /dev/snd/controlC0
/dev/snd/controlC1
COMMAND    PID              USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
pulseaudi 5165 speech-dispatcher   15u   CHR 116,14      0t0 9226 /dev/snd/controlC1
pulseaudi 5165 speech-dispatcher   22u   CHR 116,14      0t0 9226 /dev/snd/controlC1
pulseaudi 6623             mlaks   16u   CHR 116,14      0t0 9226 /dev/snd/controlC1
pulseaudi 6623             mlaks   23u   CHR 116,14      0t0 9226 /dev/snd/controlC1
/dev/snd/hwC0D0
/dev/snd/hwC1D0
/dev/snd/pcmC0D0c
/dev/snd/pcmC0D0p
COMMAND    PID              USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
pulseaudi 5165 speech-dispatcher  mem    CHR  116,3          5095 /dev/snd/pcmC0D0p
pulseaudi 5165 speech-dispatcher   29u   CHR  116,3      0t0 5095 /dev/snd/pcmC0D0p
/dev/snd/pcmC0D1p
/dev/snd/pcmC1D10p
/dev/snd/pcmC1D11p
/dev/snd/pcmC1D3p
/dev/snd/pcmC1D7p
/dev/snd/pcmC1D8p
/dev/snd/pcmC1D9p
/dev/snd/seq
/dev/snd/timer

Then I do 

Rashi:/home/mlaks# kill 5165 6623

Then I do 

mlaks@Rashi:~$ start-pulseaudio-x11
mlaks@Rashi:~$ pacmd




mlaks@Rashi:~$ pacmd
Welcome to PulseAudio! Use "help" for usage information.
>>> list-sinks
2 sink(s) available.
  * index: 0
	name: <alsa_output.pci-0000_01_00.1.hdmi-stereo>
	driver: <module-alsa-card.c>
	flags: HARDWARE DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
	state: SUSPENDED
	suspend cause: IDLE 
	priority: 9050
	volume: 0: 100% 1: 100%
	        0: 0.00 dB 1: 0.00 dB
	        balance 0.00
	base volume: 100%
	             0.00 dB
	volume steps: 65537
	muted: no
	current latency: 0.00 ms
	max request: 0 KiB
	max rewind: 0 KiB
	monitor source: 0
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	used by: 0
	linked by: 0
	configured latency: 0.00 ms; range is 0.50 .. 371.52 ms
	card: 0 <alsa_card.pci-0000_01_00.1>
	module: 5
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "HDMI 0"
		alsa.id = "HDMI 0"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "3"
		alsa.card = "1"
		alsa.card_name = "HDA ATI HDMI"
		alsa.long_card_name = "HDA ATI HDMI at 0xfbe9c000 irq 44"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:01:00.1"
		sysfs.path = "/devices/pci0000:00/0000:00:02.0/0000:01:00.1/sound/card1"
		device.bus = "pci"
		device.vendor.id = "1002"
		device.string = "hdmi:1"
		device.buffering.buffer_size = "65536"
		device.buffering.fragment_size = "32768"
		device.access_mode = "mmap+timer"
		device.profile.name = "hdmi-stereo"
		device.profile.description = "Digital Stereo (HDMI)"
		device.description = "HDA ATI HDMI Digital Stereo (HDMI)"
		alsa.mixer_name = "ATI R6xx HDMI"
		alsa.components = "HDA:1002aa01,00aa0100,00100300"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: yes)
			properties:
				device.icon_name = "video-display"
	active port: <hdmi-output-0>
    index: 1
	name: <alsa_output.pci-0000_00_14.2.analog-stereo>
	driver: <module-alsa-card.c>
	flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
	state: SUSPENDED
	suspend cause: IDLE 
	priority: 9959
	volume: 0: 100% 1: 100%
	        0: 0.00 dB 1: 0.00 dB
	        balance 0.00
	base volume: 100%
	             0.00 dB
	volume steps: 65537
	muted: no
	current latency: 0.00 ms
	max request: 0 KiB
	max rewind: 0 KiB
	monitor source: 1
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	used by: 0
	linked by: 0
	configured latency: 0.00 ms; range is 0.50 .. 371.52 ms
	card: 1 <alsa_card.pci-0000_00_14.2>
	module: 6
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "VT1708S Analog"
		alsa.id = "VT1708S Analog"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "0"
		alsa.card_name = "HDA ATI SB"
		alsa.long_card_name = "HDA ATI SB at 0xfbdf4000 irq 16"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:14.2"
		sysfs.path = "/devices/pci0000:00/0000:00:14.2/sound/card0"
		device.bus = "pci"
		device.vendor.id = "1002"
		device.form_factor = "internal"
		device.string = "front:0"
		device.buffering.buffer_size = "65536"
		device.buffering.fragment_size = "32768"
		device.access_mode = "mmap+timer"
		device.profile.name = "analog-stereo"
		device.profile.description = "Analog Stereo"
		device.description = "Built-in Audio Analog Stereo"
		alsa.mixer_name = "VIA VT1708S"
		alsa.components = "HDA:11060397,1043836c,00100000"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		analog-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
			properties:
				
		analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-headphones"
	active port: <analog-output>

Now I can select the correct device via

>>> set-default-sink 1 

And now I hear sound on my applications via the speaker.

If I now close pacmd via
>>>exit
I lose sound.

 

So what can I do to avoid this whole dance of starting up with the HDMI device I dont want.
and then selecting via pacmd 


Note that if I run
gnome-control-center, it similarly will only see the analog sound sysem if
I first kill the HDMI pulseaudio that starts up initially.

mlaks@Rashi:~$ uname -a
Linux Rashi 3.12-1-amd64 #1 SMP Debian 3.12.6-1 (2013-12-21) x86_64 GNU/Linux


mlaks@Rashi:~$ lspci

00:00.0 Host bridge: Advanced Micro Devices [AMD] nee ATI RX780/RX790 Chipset Host Bridge
00:02.0 PCI bridge: Advanced Micro Devices [AMD] nee ATI RD790 PCI to PCI bridge (external gfx0 port A)
00:0a.0 PCI bridge: Advanced Micro Devices [AMD] nee ATI RD790 PCI to PCI bridge (PCI express gpp port F)
00:11.0 SATA controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 SATA Controller [IDE mode]
00:12.0 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:12.1 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0 USB OHCI1 Controller
00:12.2 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:13.0 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:13.1 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0 USB OHCI1 Controller
00:13.2 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:14.0 SMBus: Advanced Micro Devices [AMD] nee ATI SBx00 SMBus Controller (rev 3c)
00:14.1 IDE interface: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 IDE Controller
00:14.2 Audio device: Advanced Micro Devices [AMD] nee ATI SBx00 Azalia (Intel HDA)
00:14.3 ISA bridge: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 LPC host controller
00:14.4 PCI bridge: Advanced Micro Devices [AMD] nee ATI SBx00 PCI to PCI Bridge
00:14.5 USB controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB OHCI2 Controller
00:18.0 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor HyperTransport Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Miscellaneous Control
00:18.4 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Link Control
01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Cape Verde [Radeon HD 7700 Series]
01:00.1 Audio device: Advanced Micro Devices [AMD] nee ATI Device aab0
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)


Thanks,
Mitchell


Reply to: