I figured out what's going wrong. Every time my computer resumes from
suspend, the indices of the sound sinks and sources change in pulseaudio
(you can see this by doing `pacmd list-sinks` or `pacmd list-sources` .
I force the same card to be selected by creating the following script
into /etc/pm/sleep.d/66_pulse_audio_select
#!/bin/bash
case $1 in
hibernate)
echo "Suspending to disk (hibernate)."
;;
suspend)
echo "Suspending to RAM (suspend)."
;;
thaw)
echo "Resuming from suspend to disk (thaw)."
;;
resume)
echo "Resuming from suspend to ram (resume)."
sudo -u my_user_name pacmd set-default-sink
alsa_output.usb-0d8c_C-Media_USB_Headphone_Set-00-Set.iec958-stereo
sudo -u my_user_name pacmd set-default-source
alsa_input.usb-046d_089d-01-U0x46d0x89d.analog-mono
;;
*) echo "Somebody is calling me totally incorrectly."
;;
esac
You will of course want to replace the alsa_output....... strings with
the NAMES of your desired cards.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1013218
Title:
Wrong sound cards (input and output) selected after suspend
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1013218/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs