New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for network sinks and sources #48

Closed
ngiraldo opened this Issue Mar 28, 2017 · 10 comments

Comments

Projects
None yet
3 participants
@ngiraldo
Copy link

ngiraldo commented Mar 28, 2017

I have setup a remote pulseaudio server, and added a pulseaudio tunnel in the local client.

The tunnel works and audio is emitted in the remote server.

I can select the tunnel as an output in sound settings "Tunnel to 192.168.0.20", but no selected or selectable entry appears in the indicator.

@yktoo

This comment has been minimized.

Copy link
Owner

yktoo commented Mar 28, 2017

An interesting use case. Do you mind attaching the output of indicator-sound-switcher -vv (also interesting to see messages that are logged when you switch to the tunnel via Sound Settings)?

@ngiraldo

This comment has been minimized.

Copy link
Author

ngiraldo commented Mar 28, 2017

INF Configuration file /home/nicolay/.config/indicator-sound-switcher.json not found, falling back to defaults
INF Context connected
DEB   + Card[0] added: `alsa_card.pci-0000_00_03.0`
DEB     + Card profile added: `off` (`Off`), 0 sinks, 0 sources, priority: 0
DEB     + Card profile added: `output:hdmi-stereo-extra2` (`Digital Stereo (HDMI 3) Output`), 1 sinks, 0 sources, priority: 200
DEB     + Card profile added: `output:hdmi-surround` (`Digital Surround 5.1 (HDMI) Output`), 1 sinks, 0 sources, priority: 3300 -- Active
DEB     + Card profile added: `output:hdmi-stereo-extra1` (`Digital Stereo (HDMI 2) Output`), 1 sinks, 0 sources, priority: 200
DEB     + Card profile added: `output:hdmi-surround-extra1` (`Digital Surround 5.1 (HDMI 2) Output`), 1 sinks, 0 sources, priority: 3100
DEB     + Card profile added: `output:hdmi-stereo` (`Digital Stereo (HDMI) Output`), 1 sinks, 0 sources, priority: 400
DEB     + Card profile added: `output:hdmi-surround71-extra1` (`Digital Surround 7.1 (HDMI 2) Output`), 1 sinks, 0 sources, priority: 100
DEB     + Card profile added: `output:hdmi-surround-extra2` (`Digital Surround 5.1 (HDMI 3) Output`), 1 sinks, 0 sources, priority: 3100
DEB     + Card profile added: `output:hdmi-surround71` (`Digital Surround 7.1 (HDMI) Output`), 1 sinks, 0 sources, priority: 300
DEB     + Card profile added: `output:hdmi-surround71-extra2` (`Digital Surround 7.1 (HDMI 3) Output`), 1 sinks, 0 sources, priority: 100
DEB     + Card port added: `hdmi-output-2` (`HDMI / DisplayPort 3`); priority: 5700; direction: 1; available: No
DEB       . Supported profile: `output:hdmi-stereo-extra2`
DEB       . Supported profile: `output:hdmi-surround-extra2`
DEB       . Supported profile: `output:hdmi-surround71-extra2`
DEB     + Card port added: `hdmi-output-1` (`HDMI / DisplayPort 2`); priority: 5800; direction: 1; available: No
DEB       . Supported profile: `output:hdmi-stereo-extra1`
DEB       . Supported profile: `output:hdmi-surround-extra1`
DEB       . Supported profile: `output:hdmi-surround71-extra1`
DEB     + Card port added: `hdmi-output-0` (`HDMI / DisplayPort`); priority: 5900; direction: 1; available: No
DEB       . Supported profile: `output:hdmi-stereo`
DEB       . Supported profile: `output:hdmi-surround`
DEB       . Supported profile: `output:hdmi-surround71`
DEB   + Card[1] added: `alsa_card.pci-0000_00_1b.0`
DEB     + Card profile added: `output:analog-stereo` (`Analog Stereo Output`), 1 sinks, 0 sources, priority: 1000
DEB     + Card profile added: `off` (`Off`), 0 sinks, 0 sources, priority: 0
DEB     + Card profile added: `output:analog-stereo+input:analog-stereo` (`Analog Stereo Duplex`), 1 sinks, 1 sources, priority: 1010 -- Active
DEB     + Card profile added: `input:analog-stereo` (`Analog Stereo Input`), 0 sinks, 1 sources, priority: 10
DEB     + Card port added: `analog-input-headphone-mic` (`Microphone`); priority: 8700; direction: 2; available: No
DEB       . Supported profile: `input:analog-stereo`
DEB       . Supported profile: `output:analog-stereo+input:analog-stereo`
DEB     + Card port added: `analog-output-headphones` (`Headphones`); priority: 9000; direction: 1; available: No
DEB       . Supported profile: `output:analog-stereo`
DEB       . Supported profile: `output:analog-stereo+input:analog-stereo`
DEB     + Card port added: `analog-output-speaker` (`Speakers`); priority: 10000; direction: 1; available: Yes
DEB       . Supported profile: `output:analog-stereo`
DEB       . Supported profile: `output:analog-stereo+input:analog-stereo`
DEB     + Card port added: `analog-input-headset-mic` (`Headset Microphone`); priority: 8700; direction: 2; available: No
DEB       . Supported profile: `input:analog-stereo`
DEB       . Supported profile: `output:analog-stereo+input:analog-stereo`
DEB     + Card port added: `analog-input-internal-mic` (`Internal Microphone`); priority: 8900; direction: 2; available: Yes
DEB       . Supported profile: `input:analog-stereo`
DEB       . Supported profile: `output:analog-stereo+input:analog-stereo`
DEB   + Source[2] added: `alsa_input.pci-0000_00_1b.0.analog-stereo`, card 1
DEB     + Source port added: `analog-input-internal-mic` (`Internal Microphone`); priority: 8900; available: Yes
DEB     + Source port added: `analog-input-headphone-mic` (`Microphone`); priority: 8700; available: No
DEB     + Source port added: `analog-input-headset-mic` (`Headset Microphone`); priority: 8700; available: No
DEB     * Activated source port `analog-input-internal-mic`
DEB   + Source output[1] added: `Peak detect`
DEB   + Sink[0] added: `alsa_output.pci-0000_00_03.0.hdmi-surround`, card 0
DEB     + Sink port added: `hdmi-output-0` (`HDMI / DisplayPort`); priority: 5900; available: No
DEB     * Activated sink port `hdmi-output-0`
DEB   + Sink[1] added: `alsa_output.pci-0000_00_1b.0.analog-stereo`, card 1
DEB     + Sink port added: `analog-output-speaker` (`Speakers`); priority: 10000; available: Yes
DEB     + Sink port added: `analog-output-headphones` (`Headphones`); priority: 9000; available: No
DEB     * Activated sink port `analog-output-speaker`
DEB   + Sink[2] added: `Cincopuntouno`, card 4294967295
DEB * Activated sink: `alsa_output.pci-0000_00_1b.0.analog-stereo`
DEB * Activated source: `alsa_input.pci-0000_00_1b.0.analog-stereo`
DEB .do_context_subscribe(facility: 7, kind: 16, index: 4294967295)
DEB * Activated sink: `Cincopuntouno`
DEB * Activated source: `alsa_input.pci-0000_00_1b.0.analog-stereo`
@yktoo

This comment has been minimized.

Copy link
Owner

yktoo commented Mar 29, 2017

Okay so that's the sink called Cincopuntouno, and it doesn't have any ports?

@ngiraldo

This comment has been minimized.

Copy link
Author

ngiraldo commented Mar 29, 2017

Yep, I added the tunnel to the remote sound server as Cincopuntouno.

Do you need the output of another test?

@yktoo

This comment has been minimized.

Copy link
Owner

yktoo commented Mar 29, 2017

No, thanks.

A new version that supports network sinks/sources is pushed to dev. Please test if you can.

@yktoo yktoo changed the title Network tunnel not present in the indicator Add support for network sinks and sources Mar 29, 2017

@yktoo yktoo added the enhancement label Mar 29, 2017

@yktoo yktoo self-assigned this Mar 29, 2017

@yktoo yktoo added this to the 2.1.2 milestone Mar 29, 2017

@ngiraldo

This comment has been minimized.

Copy link
Author

ngiraldo commented Mar 29, 2017

Now I get this:

Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 234, in 'calling callback function'
  File "./indicator-sound-switcher", line 375, in pacb_sink_info
    self.sink_info(struct.contents)
  File "./indicator-sound-switcher", line 687, in sink_info
    port.get_menu_item_title(),
  File "/usr/lib/python3/dist-packages/indicator_sound_switcher/port.py", line 92, in get_menu_item_title
    (self.owner_card.get_display_name() if self.owner_card else _('(unknown device)')) + \
AttributeError: 'Port' object has no attribute 'owner_card'
@yktoo

This comment has been minimized.

Copy link
Owner

yktoo commented Mar 30, 2017

It looks like you're still using the old indicator library. Try running it with:

PYTHONPATH=lib ./indicator-sound-switcher -vv
@ngiraldo

This comment has been minimized.

Copy link
Author

ngiraldo commented Mar 30, 2017

It works perfectly.

@xmbwd

This comment has been minimized.

Copy link

xmbwd commented Apr 22, 2017

I can confirm that the dev version works for network sinks, including Chromecast from mkchromecast.

@yktoo

This comment has been minimized.

Copy link
Owner

yktoo commented Jan 13, 2019

Resolved in 2.2.0.

@yktoo yktoo closed this Jan 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment