You are not logged in.

#1 2014-06-22 01:44:32

chx
Member
Registered: 2011-05-28
Posts: 83

What's the equivalent of -ao alsa:device=hdmi in PulseAudio?

So let's suppose Skype forces me to move to Pulse. I know how to force mplayer to use the hdmi output instead of hw0:0 but how do I do the same once I have moved to Pulse?

Offline

#2 2014-06-22 01:57:30

headkase
Member
From: Canada
Registered: 2011-12-06
Posts: 1,403
Website

Re: What's the equivalent of -ao alsa:device=hdmi in PulseAudio?

Install "pavucontrol" and that has a tab that lets you choose your default input and output devices, including HDMI.

Once you do that you tell mplayer to use Pulse.  If mplayer doesn't do Pulse, but does do ALSA then install Pulse Audio ALSA to create a fake ALSA sink which goes into and is managed by Pulse.


We all make choices, but in the end, our choices make us.

Offline

#3 2014-06-22 02:03:51

progandy
Member
Registered: 2012-05-17
Posts: 2,143

Re: What's the equivalent of -ao alsa:device=hdmi in PulseAudio?

mplayer might work with something like

mplayer -ao pulse::SINKNAME URI

Offline

#4 2014-06-22 02:08:25

headkase
Member
From: Canada
Registered: 2011-12-06
Posts: 1,403
Website

Re: What's the equivalent of -ao alsa:device=hdmi in PulseAudio?

The Pulse Audio ALSA sink I use because Adobe Flash uses ALSA, it works perfect with my Pulse system configuration.  I didn't mention, but if you have a custom asound.conf in your home folder then rename that to something else so it isn't used, Pulse Audio ALSA installs one that makes ALSA programs feed into it instead.


We all make choices, but in the end, our choices make us.

Offline

#5 2014-06-22 07:54:32

chx
Member
Registered: 2011-05-28
Posts: 83

Re: What's the equivalent of -ao alsa:device=hdmi in PulseAudio?

I do not want to change the default, that's why I use a command line argument. Occasionally I plug in the laptop into the HDTV on the wall and want to run the audio over HDMI to there. Most of the time the 3.5" output (hw0:0) is fine.

Last edited by chx (2014-06-22 07:55:25)

Offline

#6 2014-06-22 08:28:27

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,830
Website

Re: What's the equivalent of -ao alsa:device=hdmi in PulseAudio?

here a little dmenu script to change output/change volume
run with scriptname -sink
if you use this with slmenu instead of dmenu its a purely console based menu smile

#!/bin/bash

client=$(pacmd list-sink-inputs | grep -E 'client:|index:' | awk 'NR % 2 == 1 { o=$0 ; next } { print o " " $0 }'| awk '{print $2" "substr($0, index($0,$5))}' | dmenu -p "Clients: " $@)


case $1 in
    -vol)
        shift
        levels="0
10
20
30
40
50
60
70
80
90
100"
        volume=$(echo "$levels" | dmenu -p "Volume: " $@)
        set_vol=$(echo "scale=1; $volume / 100 * 65536" | bc)
        pacmd set-sink-input-volume "$( echo "$client" | awk '{print $1}' 2>/dev/null )" "${set_vol%.*}"

    ;;
    -sink)
        shift
        sink=$(pacmd list-sinks | grep name: | awk 'gsub(">$","")' | cut -c 9- | dmenu -p "Sink: " $@)
        pacmd move-sink-input $(echo "$client" | awk '{print $1}') $(echo $sink)
    ;;
    *)
esac

Last edited by Rasi (2014-06-22 08:35:03)


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

Board footer

Powered by FluxBB