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

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



On 22:53 Wed 01 Jan     , Klaus wrote:
> >
> So, even just after reboot and as it would be expected, the two
> cards are listed by alsa, and yet, first time round PA doesn't find
> them both. When you restart PA, they are correctly identified and
> subsequently functional through PA. How odd.
> 
> I don't really know now: I'd probably try whether card0 is
> functional in alsa before you restart PA:
> 
> $ aplay -D front <sound-file.wav>


Before I kill pa the first time:

mlaks@Rashi:~$ aplay -D front piano2.wav 
aplay: main:682: audio open error: Device or resource busy

then I do:

mlaks@Rashi:~$ ps aux|grep pulse
125       5074 14.4  0.0 457064  7192 ?        Sl   21:13   1:07 /usr/bin/pulseaudio --start --log-target=syslog
125       5570  0.0  0.0 117148  3204 ?        S    21:13   0:00 /usr/lib/pulseaudio/pulse/gconf-helper
mlaks     6601  0.0  0.0 311224  6432 ?        S<l  21:20   0:00 /usr/bin/pulseaudio --start --log-target=syslog
mlaks     6608  0.0  0.0 117120  3172 ?        S    21:20   0:00 /usr/lib/pulseaudio/pulse/gconf-helper
mlaks     6629  0.0  0.0   8528   876 pts/2    S+   21:21   0:00 grep pulse

then as root I kill 5074 and and 6601

After I kill pa

mlaks@Rashi:~$ aplay -D front piano2.wav 
aplay: main:682: audio open error: Device or resource busy




> 
> (there are some files under /usr/share/sounds/ )
> AFAIK udev should have initiated loading the sound modules, and if
> the above aplay cmd doesn't work, I'd check
> 
> $ lsmod | grep snd

I did this after restarting pa and it says


Rashi:/home/mlaks# lsmod |grep snd
snd_hda_codec_hdmi     35722  1 
snd_hda_codec_via      22798  1 
snd_hda_intel          39672  4 
snd_hda_codec         146743  3 snd_hda_codec_hdmi,snd_hda_codec_via,snd_hda_intel
snd_hwdep              13148  1 snd_hda_codec
snd_pcm_oss            44847  0 
snd_mixer_oss          22042  1 snd_pcm_oss
snd_pcm                84096  4 snd_pcm_oss,snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
snd_page_alloc         17114  2 snd_pcm,snd_hda_intel
snd_seq_midi           12848  0 
snd_seq_midi_event     13316  1 snd_seq_midi
snd_rawmidi            26805  1 snd_seq_midi
snd_seq                48834  2 snd_seq_midi_event,snd_seq_midi
snd_seq_device         13132  3 snd_seq,snd_rawmidi,snd_seq_midi
snd_timer              26614  2 snd_pcm,snd_seq
snd                    60869  20 snd_pcm_oss,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_hda_codec_via,snd_pcm,snd_seq,snd_rawmidi,snd_hda_codec,snd_hda_intel,snd_seq_device,snd_mixer_oss



> 
> Are there any pulseaudio related messages in syslog?
> 
> $ grep -i pulse /var/log/syslog
> 



Rashi:/home/mlaks# grep -i pulse /var/log/syslog
Jan  1 00:52:57 Rashi pulseaudio[9010]: [pulseaudio] module-jackdbus-detect.c: Unable to contact D-Bus session bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Jan  1 00:52:57 Rashi pulseaudio[9010]: [pulseaudio] module.c: Failed to load module "module-jackdbus-detect" (argument: "channels=2"): initialization failed.
Jan  1 00:52:57 Rashi pulseaudio[9010]: [pulseaudio] main.c: Module load failed.
Jan  1 00:52:57 Rashi pulseaudio[9010]: [pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Jan  1 00:52:57 Rashi pulseaudio[9010]: [pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Jan  1 00:52:57 Rashi pulseaudio[9010]: [pulseaudio] bluetooth-util.c: org.bluez.Manager.GetProperties() failed: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 2 matched rules; type="method_call", sender=":1.67" (uid=125 pid=9010 comm="/usr/bin/pulseaudio --start --log-target=syslog ") interface="org.bluez.Manager" member="GetProperties" error name="(unset)" requested_reply="0" destination="org.bluez" (uid=0 pid=4606 comm="/usr/sbin/bluetoothd ")
Jan  1 08:47:37 Rashi pulseaudio[8196]: [alsa-sink-VT1708S Analog] alsa-sink.c: Error opening PCM device front:0: Device or resource busy
Jan  1 08:48:21 Rashi rtkit-daemon[4852]: Successfully made thread 15287 of process 15287 (/usr/bin/pulseaudio) owned by '1000' high priority at nice level -11.
Jan  1 08:48:21 Rashi rtkit-daemon[4852]: Successfully made thread 15289 of process 15287 (/usr/bin/pulseaudio) owned by '1000' RT at priority 5.
Jan  1 08:48:21 Rashi rtkit-daemon[4852]: Successfully made thread 15290 of process 15287 (/usr/bin/pulseaudio) owned by '1000' RT at priority 5.
Jan  1 21:13:56 Rashi pulseaudio[5074]: [pulseaudio] module-jackdbus-detect.c: Unable to contact D-Bus session bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Jan  1 21:13:56 Rashi pulseaudio[5074]: [pulseaudio] module.c: Failed to load module "module-jackdbus-detect" (argument: "channels=2"): initialization failed.
Jan  1 21:13:56 Rashi pulseaudio[5074]: [pulseaudio] main.c: Module load failed.
Jan  1 21:13:56 Rashi pulseaudio[5074]: [pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Jan  1 21:13:56 Rashi pulseaudio[5074]: [pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Jan  1 21:13:56 Rashi pulseaudio[5074]: [pulseaudio] bluetooth-util.c: org.bluez.Manager.GetProperties() failed: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 2 matched rules; type="method_call", sender=":1.25" (uid=125 pid=5074 comm="/usr/bin/pulseaudio --start --log-target=syslog ") interface="org.bluez.Manager" member="GetProperties" error name="(unset)" requested_reply="0" destination="org.bluez" (uid=0 pid=4536 comm="/usr/sbin/bluetoothd ")
Jan  1 21:20:39 Rashi rtkit-daemon[5076]: Successfully made thread 6601 of process 6601 (/usr/bin/pulseaudio) owned by '1000' high priority at nice level -11.
Jan  1 21:20:39 Rashi rtkit-daemon[5076]: Successfully made thread 6607 of process 6601 (/usr/bin/pulseaudio) owned by '1000' RT at priority 5.
Jan  1 21:26:10 Rashi rtkit-daemon[5076]: Successfully made thread 6857 of process 6857 (/usr/bin/pulseaudio) owned by '1000' high priority at nice level -11.
Jan  1 21:26:10 Rashi rtkit-daemon[5076]: Successfully made thread 6859 of process 6857 (/usr/bin/pulseaudio) owned by '1000' RT at priority 5.
Jan  1 21:26:10 Rashi rtkit-daemon[5076]: Successfully made thread 6860 of process 6857 (/usr/bin/pulseaudio) owned by '1000' RT at priority 5.


Note that Jan 00:52:57 was last nights reboot startup
while 
Jan  1 21:13:56 
was my  just repeated reboot


> And lastly, anything catching your eye in the output of (before and
> after PA restart):
> 
> $ pacmd dump


The following is the output after 
1.  killing pa  via ps aux|grep pulse ; kill pid1 pid2 
then 
2. vlc file.wav 



mlaks@Rashi:~$ pacmd dump
Welcome to PulseAudio! Use "help" for usage information.
>>> ### Configuration dump generated at Wed Jan  1 21:34:11 2014

load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore
load-module module-augment-properties
load-module module-switch-on-port-available
load-module module-alsa-card device_id="1" name="pci-0000_01_00.1" card_name="alsa_card.pci-0000_01_00.1" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1"
load-module module-alsa-card device_id="0" name="pci-0000_00_14.2" card_name="alsa_card.pci-0000_00_14.2" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1"
load-module module-udev-detect
load-module module-jackdbus-detect channels=2
load-module module-bluetooth-policy
load-module module-bluetooth-discover
load-module module-esound-protocol-unix
load-module module-native-protocol-unix
load-module module-gconf
load-module module-default-device-restore
load-module module-rescue-streams
load-module module-always-sink
load-module module-intended-roles
load-module module-suspend-on-idle
load-module module-console-kit
load-module module-systemd-login
load-module module-position-event-sounds
load-module module-role-cork
load-module module-filter-heuristics
load-module module-filter-apply
load-module module-dbus-protocol
load-module module-cli-protocol-unix

set-sink-volume alsa_output.pci-0000_01_00.1.hdmi-stereo 0x10000
set-sink-mute alsa_output.pci-0000_01_00.1.hdmi-stereo no
suspend-sink alsa_output.pci-0000_01_00.1.hdmi-stereo yes
set-sink-volume alsa_output.pci-0000_00_14.2.analog-stereo 0x10000
set-sink-mute alsa_output.pci-0000_00_14.2.analog-stereo no
suspend-sink alsa_output.pci-0000_00_14.2.analog-stereo yes

set-source-volume alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor 0x10000
set-source-mute alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor no
suspend-source alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor yes
set-source-volume alsa_output.pci-0000_00_14.2.analog-stereo.monitor 0x10000
set-source-mute alsa_output.pci-0000_00_14.2.analog-stereo.monitor no
suspend-source alsa_output.pci-0000_00_14.2.analog-stereo.monitor yes

set-card-profile alsa_card.pci-0000_01_00.1 output:hdmi-stereo
set-card-profile alsa_card.pci-0000_00_14.2 output:analog-stereo

set-default-sink alsa_output.pci-0000_01_00.1.hdmi-stereo
set-default-source alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor

### EOF



> 
> 
> -- 
> Klaus

It looks like a tough nut to crack...
Mitchell


Reply to: