Jump to content
Sign in to follow this  
fraktal15

Automatyczne przełączenie dźwięku na HDMI

Recommended Posts

spa-acp-tool list
card 0: profiles:7 devices:7 ports:5
    profile 0: name:"off" prio:0 (available: yes)
  * profile 1: name:"output:analog-stereo+input:analog-stereo" prio:6565 (available: yes)
    profile 2: name:"output:analog-stereo" prio:6500 (available: yes)
    profile 3: name:"output:iec958-stereo+input:analog-stereo" prio:5565 (available: yes)
    profile 4: name:"output:iec958-stereo" prio:5500 (available: yes)
    profile 5: name:"input:analog-stereo" prio:65 (available: yes)
    profile 6: name:"pro-audio" prio:1 (available: unknown)
  * port 0: name:"analog-input-internal-mic" direction:capture prio:8900 (available: unknown)
    port 1: name:"analog-input-mic" direction:capture prio:8700 (available: no)
  * port 2: name:"analog-output-speaker" direction:playback prio:10000 (available: unknown)
    port 3: name:"analog-output-headphones" direction:playback prio:9900 (available: no)
    port 4: name:"iec958-stereo-output" direction:playback prio:0 (available: unknown)
  * device 0: direction:capture name:"analog-stereo" prio:65 flags:00000007 devices: "front:%f" 
    device 1: direction:playback name:"pro-output-0" prio:0 flags:00000000 devices: "hw:0,0" 
    device 2: direction:playback name:"pro-output-1" prio:0 flags:00000000 devices: "hw:0,1" 
    device 3: direction:playback name:"pro-output-3" prio:0 flags:00000000 devices: "hw:0,3" 
    device 4: direction:capture name:"pro-input-0" prio:0 flags:00000000 devices: "hw:0,0" 
  * device 5: direction:playback name:"analog-stereo" prio:65 flags:00000007 devices: "front:%f" 
    device 6: direction:playback name:"iec958-stereo" prio:55 flags:00000010 devices: "iec958:%f" 

 

Share this post


Link to post
Share on other sites

przy włączonym:

spa-acp-tool list
card 0: profiles:7 devices:7 ports:5
    profile 0: name:"off" prio:0 (available: yes)
  * profile 1: name:"output:analog-stereo+input:analog-stereo" prio:6565 (available: yes)
    profile 2: name:"output:analog-stereo" prio:6500 (available: yes)
    profile 3: name:"output:iec958-stereo+input:analog-stereo" prio:5565 (available: yes)
    profile 4: name:"output:iec958-stereo" prio:5500 (available: yes)
    profile 5: name:"input:analog-stereo" prio:65 (available: yes)
    profile 6: name:"pro-audio" prio:1 (available: unknown)
  * port 0: name:"analog-input-internal-mic" direction:capture prio:8900 (available: unknown)
    port 1: name:"analog-input-mic" direction:capture prio:8700 (available: no)
  * port 2: name:"analog-output-speaker" direction:playback prio:10000 (available: unknown)
    port 3: name:"analog-output-headphones" direction:playback prio:9900 (available: no)
    port 4: name:"iec958-stereo-output" direction:playback prio:0 (available: unknown)
  * device 0: direction:capture name:"analog-stereo" prio:65 flags:00000007 devices: "front:%f" 
    device 1: direction:playback name:"pro-output-0" prio:0 flags:00000000 devices: "hw:0,0" 
    device 2: direction:playback name:"pro-output-1" prio:0 flags:00000000 devices: "hw:0,1" 
    device 3: direction:playback name:"pro-output-3" prio:0 flags:00000000 devices: "hw:0,3" 
    device 4: direction:capture name:"pro-input-0" prio:0 flags:00000000 devices: "hw:0,0" 
  * device 5: direction:playback name:"analog-stereo" prio:65 flags:00000007 devices: "front:%f" 
    device 6: direction:playback name:"iec958-stereo" prio:55 flags:00000010 devices: "iec958:%f" 

przy wyłączonym:

spa-acp-tool list
card 0: profiles:7 devices:7 ports:5
    profile 0: name:"off" prio:0 (available: yes)
  * profile 1: name:"output:analog-stereo+input:analog-stereo" prio:6565 (available: yes)
    profile 2: name:"output:analog-stereo" prio:6500 (available: yes)
    profile 3: name:"output:iec958-stereo+input:analog-stereo" prio:5565 (available: yes)
    profile 4: name:"output:iec958-stereo" prio:5500 (available: yes)
    profile 5: name:"input:analog-stereo" prio:65 (available: yes)
    profile 6: name:"pro-audio" prio:1 (available: unknown)
  * port 0: name:"analog-input-internal-mic" direction:capture prio:8900 (available: unknown)
    port 1: name:"analog-input-mic" direction:capture prio:8700 (available: no)
  * port 2: name:"analog-output-speaker" direction:playback prio:10000 (available: unknown)
    port 3: name:"analog-output-headphones" direction:playback prio:9900 (available: no)
    port 4: name:"iec958-stereo-output" direction:playback prio:0 (available: unknown)
  * device 0: direction:capture name:"analog-stereo" prio:65 flags:00000007 devices: "front:%f" 
    device 1: direction:playback name:"pro-output-0" prio:0 flags:00000000 devices: "hw:0,0" 
    device 2: direction:playback name:"pro-output-1" prio:0 flags:00000000 devices: "hw:0,1" 
    device 3: direction:playback name:"pro-output-3" prio:0 flags:00000000 devices: "hw:0,3" 
    device 4: direction:capture name:"pro-input-0" prio:0 flags:00000000 devices: "hw:0,0" 
  * device 5: direction:playback name:"analog-stereo" prio:65 flags:00000007 devices: "front:%f" 
    device 6: direction:playback name:"iec958-stereo" prio:55 flags:00000010 devices: "iec958:%f"

 

Share this post


Link to post
Share on other sites

na podłączonym HDMI:

 

spa-acp-tool list
card 0: profiles:9 devices:8 ports:6
    profile 0: name:"off" prio:0 (available: yes)
  * profile 1: name:"output:analog-stereo+input:analog-stereo" prio:6565 (available: yes)
    profile 2: name:"output:analog-stereo" prio:6500 (available: yes)
    profile 3: name:"output:hdmi-stereo+input:analog-stereo" prio:5965 (available: yes)
    profile 4: name:"output:hdmi-stereo" prio:5900 (available: yes)
    profile 5: name:"output:iec958-stereo+input:analog-stereo" prio:5565 (available: yes)
    profile 6: name:"output:iec958-stereo" prio:5500 (available: yes)
    profile 7: name:"input:analog-stereo" prio:65 (available: yes)
    profile 8: name:"pro-audio" prio:1 (available: unknown)
  * port 0: name:"analog-input-internal-mic" direction:capture prio:8900 (available: unknown)
    port 1: name:"analog-input-mic" direction:capture prio:8700 (available: no)
  * port 2: name:"analog-output-speaker" direction:playback prio:10000 (available: unknown)
    port 3: name:"analog-output-headphones" direction:playback prio:9900 (available: no)
    port 4: name:"iec958-stereo-output" direction:playback prio:0 (available: unknown)
    port 5: name:"hdmi-output-0" direction:playback prio:5900 (available: yes)
  * device 0: direction:capture name:"analog-stereo" prio:65 flags:00000007 devices: "front:%f" 
    device 1: direction:playback name:"pro-output-0" prio:0 flags:00000000 devices: "hw:0,0" 
    device 2: direction:playback name:"pro-output-1" prio:0 flags:00000000 devices: "hw:0,1" 
    device 3: direction:playback name:"pro-output-3" prio:0 flags:00000000 devices: "hw:0,3" 
    device 4: direction:capture name:"pro-input-0" prio:0 flags:00000000 devices: "hw:0,0" 
  * device 5: direction:playback name:"analog-stereo" prio:65 flags:00000007 devices: "front:%f" 
    device 6: direction:playback name:"iec958-stereo" prio:55 flags:00000010 devices: "iec958:%f" 
    device 7: direction:playback name:"hdmi-stereo" prio:59 flags:00000010 devices: "hdmi:%f" 

 

Share this post


Link to post
Share on other sites
26 minut temu, fraktal15 napisał:

na podłączonym HDMI:

 

spa-acp-tool list
card 0: profiles:9 devices:8 ports:6
    profile 0: name:"off" prio:0 (available: yes)
  * profile 1: name:"output:analog-stereo+input:analog-stereo" prio:6565 (available: yes)
    profile 2: name:"output:analog-stereo" prio:6500 (available: yes)
    profile 3: name:"output:hdmi-stereo+input:analog-stereo" prio:5965 (available: yes)
    profile 4: name:"output:hdmi-stereo" prio:5900 (available: yes)
    profile 5: name:"output:iec958-stereo+input:analog-stereo" prio:5565 (available: yes)
    profile 6: name:"output:iec958-stereo" prio:5500 (available: yes)
    profile 7: name:"input:analog-stereo" prio:65 (available: yes)
    profile 8: name:"pro-audio" prio:1 (available: unknown)
  * port 0: name:"analog-input-internal-mic" direction:capture prio:8900 (available: unknown)
    port 1: name:"analog-input-mic" direction:capture prio:8700 (available: no)
  * port 2: name:"analog-output-speaker" direction:playback prio:10000 (available: unknown)
    port 3: name:"analog-output-headphones" direction:playback prio:9900 (available: no)
    port 4: name:"iec958-stereo-output" direction:playback prio:0 (available: unknown)
    port 5: name:"hdmi-output-0" direction:playback prio:5900 (available: yes)
  * device 0: direction:capture name:"analog-stereo" prio:65 flags:00000007 devices: "front:%f" 
    device 1: direction:playback name:"pro-output-0" prio:0 flags:00000000 devices: "hw:0,0" 
    device 2: direction:playback name:"pro-output-1" prio:0 flags:00000000 devices: "hw:0,1" 
    device 3: direction:playback name:"pro-output-3" prio:0 flags:00000000 devices: "hw:0,3" 
    device 4: direction:capture name:"pro-input-0" prio:0 flags:00000000 devices: "hw:0,0" 
  * device 5: direction:playback name:"analog-stereo" prio:65 flags:00000007 devices: "front:%f" 
    device 6: direction:playback name:"iec958-stereo" prio:55 flags:00000010 devices: "iec958:%f" 
    device 7: direction:playback name:"hdmi-stereo" prio:59 flags:00000010 devices: "hdmi:%f" 

 

I teraz spróbuj przełączyć porty lub cały profil na hdmi i z powrotem na głośniki

dla portów

przełączenie na hdmi

spa-acp-tool set-port 5

przełączenie na głośniki

spa-acp-tool set-port 2

dla profili

przełączenie na hdmi

spa-acp-tool set-profile 3

przełączenie na głośniki

spa-acp-tool set-profile 1

 

Share this post


Link to post
Share on other sites

dla portów - wyrzuca błąd

dla profili - jest ok, ale dźwięk nadal gra tylko z laptopa

 

[[email protected] ~]# spa-acp-tool set-port 5
arguments: <device_id> <port_id> missing
error: Invalid argument
[[email protected] ~]# spa-acp-tool set-port 2
arguments: <device_id> <port_id> missing
error: Invalid argument
[[email protected] ~]# spa-acp-tool set-profile 3
[[email protected] ~]# spa-acp-tool set-profile 1
[[email protected] ~]# spa-acp-tool set-port 5
arguments: <device_id> <port_id> missing
error: Invalid argument
[[email protected] ~]# spa-acp-tool set-profile 3
[[email protected] ~]# spa-acp-tool set-profile 1
[[email protected] ~]# spa-acp-tool set-port 2
arguments: <device_id> <port_id> missing
error: Invalid argument
[[email protected] ~]# 

 

Share this post


Link to post
Share on other sites
39 minut temu, fraktal15 napisał:

dla portów - wyrzuca błąd

Wygląda, że trzeba podać jeszcze device

Zapewne będzie coś takiego.

przełączenie na hdmi

spa-acp-tool set-port 7 5

przełączenie na głośniki

spa-acp-tool set-port 5 2

Niestety dokumentacja jest dość uboga.

  • Upvote 1

Share this post


Link to post
Share on other sites
[[email protected] ~]$ spa-acp-tool set-port 7 5
error: Invalid argument
[[email protected] ~]$ spa-acp-tool set-port 5 2
'm' failed at ../spa/plugins/alsa/acp/alsa-mixer.c:1422 pa_alsa_path_select()
Przerwane (zrzut pamięci)
[[email protected] ~]$ spa-acp-tool set-port 5 2
'm' failed at ../spa/plugins/alsa/acp/alsa-mixer.c:1422 pa_alsa_path_select()
Przerwane (zrzut pamięci)

:(

Share this post


Link to post
Share on other sites
10 minut temu, fraktal15 napisał:

[[email protected] ~]$ pactl load-module module-switch-on-connect 262150 [[email protected] ~]$ pactl load-module module-switch-on-connect 262151 [[email protected] ~]$ pactl load-module module-switch-on-connect 262152

Wystarczy raz :)

Jak już masz załadowany moduł to podłącz do HDMI, wątpię żeby pomogło, ale kto wie.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...