View previous topic :: View next topic |
Author |
Message |
deter0k n00b
Joined: 12 Dec 2015 Posts: 2
|
Posted: Sat Dec 12, 2015 3:47 pm Post subject: Pulseaudio не переключается на bluetooth гарнитуру |
|
|
Условия: Имеется гарнитура "aftershokz bluez 2" которая отлично подцепилась по bluetooth. Имеется pulseaudio-7.1 и чистый рабочий профиль kde.
Задача: При подключение гарнитуры весь звук выводить на нее автоматически.
Решение: Первая мысль - подключить гарнитуру. Вуаля! Она определилась:
Code: | pactl list
Sink #0
State: SUSPENDED
Name: alsa_output.pci-0000_00_03.0.hdmi-stereo
Description: Built-in Audio Digital Stereo (HDMI)
Driver: module-alsa-card.c
Sample Specification: s16le 2ch 44100Hz
Channel Map: front-left,front-right
Owner Module: 6
Mute: no
Volume: front-left: 65536 / 100% / 0,00 dB, front-right: 65536 / 100% / 0,00 dB
balance 0,00
Base Volume: 65536 / 100% / 0,00 dB
Monitor Source: alsa_output.pci-0000_00_03.0.hdmi-stereo.monitor
Latency: 0 usec, configured 0 usec
Flags: HARDWARE DECIBEL_VOLUME LATENCY SET_FORMATS
Properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "ID 2807 Digital"
alsa.id = "ID 2807 Digital"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "3"
alsa.card = "0"
alsa.card_name = "HDA Intel HDMI"
alsa.long_card_name = "HDA Intel HDMI at 0xe0510000 irq 45"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:03.0"
sysfs.path = "/devices/pci0000:00/0000:00:03.0/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "0a0c"
device.product.name = "Haswell-ULT HD Audio Controller"
device.form_factor = "internal"
device.string = "hdmi:0"
device.buffering.buffer_size = "352768"
device.buffering.fragment_size = "176384"
device.access_mode = "mmap+timer"
device.profile.name = "hdmi-stereo"
device.profile.description = "Digital Stereo (HDMI)"
device.description = "Built-in Audio Digital Stereo (HDMI)"
alsa.mixer_name = "Intel ID 2807"
alsa.components = "HDA:80862807,80860101,00100000"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
Ports:
hdmi-output-0: HDMI / DisplayPort (priority: 5900)
Active Port: hdmi-output-0
Formats:
pcm
Sink #1
State: SUSPENDED
Name: alsa_output.pci-0000_00_1b.0.analog-stereo
Description: Built-in Audio Analog Stereo
Driver: module-alsa-card.c
Sample Specification: s16le 2ch 44100Hz
Channel Map: front-left,front-right
Owner Module: 7
Mute: no
Volume: front-left: 48930 / 75% / -7,61 dB, front-right: 48930 / 75% / -7,61 dB
balance 0,00
Base Volume: 65536 / 100% / 0,00 dB
Monitor Source: alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
Latency: 0 usec, configured 0 usec
Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
Properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "ALC283 Analog"
alsa.id = "ALC283 Analog"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "1"
alsa.card_name = "HDA Intel PCH"
alsa.long_card_name = "HDA Intel PCH at 0xe0514000 irq 44"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:1b.0"
sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card1"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "9c20"
device.product.name = "8 Series HD Audio Controller"
device.form_factor = "internal"
device.string = "front:1"
device.buffering.buffer_size = "352800"
device.buffering.fragment_size = "176400"
device.access_mode = "mmap+timer"
device.profile.name = "analog-stereo"
device.profile.description = "Analog Stereo"
device.description = "Built-in Audio Analog Stereo"
alsa.mixer_name = "Realtek ALC283"
alsa.components = "HDA:10ec0283,10ec0283,00100003"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
Ports:
analog-output-speaker: Speakers (priority: 10000)
analog-output-headphones: Headphones (priority: 9000, not available)
Active Port: analog-output-speaker
Formats:
pcm
Sink #2
State: RUNNING
Name: bluez_sink.20_74_CF_01_8A_E5
Description: AfterShokz BLUEZ 2
Driver: module-bluez5-device.c
Sample Specification: s16le 2ch 44100Hz
Channel Map: front-left,front-right
Owner Module: 24
Mute: no
Volume: front-left: 65536 / 100% / 0,00 dB, front-right: 65536 / 100% / 0,00 dB
balance 0,00
Base Volume: 65536 / 100% / 0,00 dB
Monitor Source: bluez_sink.20_74_CF_01_8A_E5.monitor
Latency: 30717 usec, configured 45317 usec
Flags: HARDWARE DECIBEL_VOLUME LATENCY
Properties:
bluetooth.protocol = "a2dp_sink"
device.description = "AfterShokz BLUEZ 2"
device.string = "20:74:CF:01:8A:E5"
device.api = "bluez"
device.class = "sound"
device.bus = "bluetooth"
device.form_factor = "headset"
bluez.path = "/org/bluez/hci0/dev_20_74_CF_01_8A_E5"
bluez.class = "0x240404"
bluez.alias = "AfterShokz BLUEZ 2"
device.icon_name = "audio-headset-bluetooth"
device.intended_roles = "phone"
Ports:
headset-output: Headset (priority: 0, available)
Active Port: headset-output
Formats:
pcm
Source #0
State: SUSPENDED
Name: alsa_output.pci-0000_00_03.0.hdmi-stereo.monitor
Description: Monitor of Built-in Audio Digital Stereo (HDMI)
Driver: module-alsa-card.c
Sample Specification: s16le 2ch 44100Hz
Channel Map: front-left,front-right
Owner Module: 6
Mute: no
Volume: front-left: 65536 / 100% / 0,00 dB, front-right: 65536 / 100% / 0,00 dB
balance 0,00
Base Volume: 65536 / 100% / 0,00 dB
Monitor of Sink: alsa_output.pci-0000_00_03.0.hdmi-stereo
Latency: 0 usec, configured 0 usec
Flags: DECIBEL_VOLUME LATENCY
Properties:
device.description = "Monitor of Built-in Audio Digital Stereo (HDMI)"
device.class = "monitor"
alsa.card = "0"
alsa.card_name = "HDA Intel HDMI"
alsa.long_card_name = "HDA Intel HDMI at 0xe0510000 irq 45"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:03.0"
sysfs.path = "/devices/pci0000:00/0000:00:03.0/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "0a0c"
device.product.name = "Haswell-ULT HD Audio Controller"
device.form_factor = "internal"
device.string = "0"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
Formats:
pcm
Source #1
State: SUSPENDED
Name: alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
Description: Monitor of Built-in Audio Analog Stereo
Driver: module-alsa-card.c
Sample Specification: s16le 2ch 44100Hz
Channel Map: front-left,front-right
Owner Module: 7
Mute: no
Volume: front-left: 65536 / 100% / 0,00 dB, front-right: 65536 / 100% / 0,00 dB
balance 0,00
Base Volume: 65536 / 100% / 0,00 dB
Monitor of Sink: alsa_output.pci-0000_00_1b.0.analog-stereo
Latency: 0 usec, configured 0 usec
Flags: DECIBEL_VOLUME LATENCY
Properties:
device.description = "Monitor of Built-in Audio Analog Stereo"
device.class = "monitor"
alsa.card = "1"
alsa.card_name = "HDA Intel PCH"
alsa.long_card_name = "HDA Intel PCH at 0xe0514000 irq 44"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:1b.0"
sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card1"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "9c20"
device.product.name = "8 Series HD Audio Controller"
device.form_factor = "internal"
device.string = "1"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
Formats:
pcm
Source #2
State: SUSPENDED
Name: alsa_input.pci-0000_00_1b.0.analog-stereo
Description: Built-in Audio Analog Stereo
Driver: module-alsa-card.c
Sample Specification: s16le 2ch 44100Hz
Channel Map: front-left,front-right
Owner Module: 7
Mute: no
Volume: front-left: 8251 / 13% / -54,00 dB, front-right: 8251 / 13% / -54,00 dB
balance 0,00
Base Volume: 5206 / 8% / -66,00 dB
Monitor of Sink: n/a
Latency: 0 usec, configured 0 usec
Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
Properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "ALC283 Analog"
alsa.id = "ALC283 Analog"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "1"
alsa.card_name = "HDA Intel PCH"
alsa.long_card_name = "HDA Intel PCH at 0xe0514000 irq 44"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:1b.0"
sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card1"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "9c20"
device.product.name = "8 Series HD Audio Controller"
device.form_factor = "internal"
device.string = "front:1"
device.buffering.buffer_size = "352800"
device.buffering.fragment_size = "176400"
device.access_mode = "mmap+timer"
device.profile.name = "analog-stereo"
device.profile.description = "Analog Stereo"
device.description = "Built-in Audio Analog Stereo"
alsa.mixer_name = "Realtek ALC283"
alsa.components = "HDA:10ec0283,10ec0283,00100003"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
Ports:
analog-input-internal-mic: Internal Microphone (priority: 8900)
analog-input-mic: Microphone (priority: 8700, not available)
Active Port: analog-input-internal-mic
Formats:
pcm
Source #3
State: IDLE
Name: bluez_sink.20_74_CF_01_8A_E5.monitor
Description: Monitor of AfterShokz BLUEZ 2
Driver: module-bluez5-device.c
Sample Specification: s16le 2ch 44100Hz
Channel Map: front-left,front-right
Owner Module: 24
Mute: no
Volume: front-left: 65536 / 100% / 0,00 dB, front-right: 65536 / 100% / 0,00 dB
balance 0,00
Base Volume: 65536 / 100% / 0,00 dB
Monitor of Sink: bluez_sink.20_74_CF_01_8A_E5
Latency: 0 usec, configured 45317 usec
Flags: DECIBEL_VOLUME LATENCY
Properties:
device.description = "Monitor of AfterShokz BLUEZ 2"
device.class = "monitor"
device.string = "20:74:CF:01:8A:E5"
device.api = "bluez"
device.bus = "bluetooth"
device.form_factor = "headset"
bluez.path = "/org/bluez/hci0/dev_20_74_CF_01_8A_E5"
bluez.class = "0x240404"
bluez.alias = "AfterShokz BLUEZ 2"
device.icon_name = "audio-headset-bluetooth"
device.intended_roles = "phone"
Formats:
pcm
Sink Input #2
Driver: protocol-native.c
Owner Module: 12
Client: 3
Sink: 2
Sample Specification: float32le 2ch 44100Hz
Channel Map: front-left,front-right
Format: pcm, format.sample_format = "\"float32le\"" format.channels = "2" format.rate = "44100" format.channel_map = "\"front-left,front-right\""
Corked: no
Mute: no
Volume: front-left: 65536 / 100% / 0,00 dB, front-right: 65536 / 100% / 0,00 dB
balance 0,00
Buffer Latency: 110000 usec
Sink Latency: 30101 usec
Resample method: copy
Properties:
media.name = "Shinsuke Matsumoto - Aqua"
application.name = "Clementine"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "30"
application.process.id = "28625"
application.process.user = "deterok"
application.process.host = "fort_sun"
application.process.binary = "clementine"
application.language = "ru_RU.utf8"
window.x11.display = ":0"
application.process.machine_id = "5ec298202fb2646d2c32380f5653aa06"
application.process.session_id = "c6"
application.icon_name = "application-x-clementine"
module-stream-restore.id = "sink-input-by-application-name:Clementine"
media.filename = "http://www.di.fm/dubtechno/"
media.title = "Shinsuke Matsumoto - Aqua"
Client #0
Driver: module-systemd-login.c
Owner Module: 19
Properties:
application.name = "Login Session c6"
systemd-login.session = "c6"
Client #1
Driver: module-systemd-login.c
Owner Module: 19
Properties:
application.name = "Login Session c3"
systemd-login.session = "c3"
Client #2
Driver: module-systemd-login.c
Owner Module: 19
Properties:
application.name = "Login Session c2"
systemd-login.session = "c2"
Client #3
Driver: protocol-native.c
Owner Module: 12
Properties:
application.name = "Clementine"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "30"
application.process.id = "28625"
application.process.user = "deterok"
application.process.host = "fort_sun"
application.process.binary = "clementine"
application.language = "ru_RU.utf8"
window.x11.display = ":0"
application.process.machine_id = "5ec298202fb2646d2c32380f5653aa06"
application.process.session_id = "c6"
application.icon_name = "application-x-clementine"
Client #5
Driver: protocol-native.c
Owner Module: 12
Properties:
application.name = "KMix"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "30"
application.process.id = "28687"
application.process.user = "deterok"
application.process.host = "fort_sun"
application.process.binary = "kdeinit4"
application.language = "ru_RU.utf8"
window.x11.display = ":0"
application.process.machine_id = "5ec298202fb2646d2c32380f5653aa06"
application.process.session_id = "c6"
Client #7
Driver: protocol-native.c
Owner Module: 12
Properties:
application.name = "pactl"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "30"
application.process.id = "28752"
application.process.user = "deterok"
application.process.host = "fort_sun"
application.process.binary = "pactl"
application.language = "ru_RU.utf8"
application.process.machine_id = "5ec298202fb2646d2c32380f5653aa06"
application.process.session_id = "c3"
Card #0
Name: alsa_card.pci-0000_00_03.0
Driver: module-alsa-card.c
Owner Module: 6
Properties:
alsa.card = "0"
alsa.card_name = "HDA Intel HDMI"
alsa.long_card_name = "HDA Intel HDMI at 0xe0510000 irq 45"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:03.0"
sysfs.path = "/devices/pci0000:00/0000:00:03.0/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "0a0c"
device.product.name = "Haswell-ULT HD Audio Controller"
device.form_factor = "internal"
device.string = "0"
device.description = "Built-in Audio"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
Profiles:
output:hdmi-stereo: Digital Stereo (HDMI) Output (sinks: 1, sources: 0, priority: 5400, available: yes)
off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
Active Profile: output:hdmi-stereo
Ports:
hdmi-output-0: HDMI / DisplayPort (priority: 5900, latency offset: 0 usec)
Properties:
device.icon_name = "video-display"
Part of profile(s): output:hdmi-stereo
Card #1
Name: alsa_card.pci-0000_00_1b.0
Driver: module-alsa-card.c
Owner Module: 7
Properties:
alsa.card = "1"
alsa.card_name = "HDA Intel PCH"
alsa.long_card_name = "HDA Intel PCH at 0xe0514000 irq 44"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:1b.0"
sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card1"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "9c20"
device.product.name = "8 Series HD Audio Controller"
device.form_factor = "internal"
device.string = "1"
device.description = "Built-in Audio"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
Profiles:
input:analog-stereo: Analog Stereo Input (sinks: 0, sources: 1, priority: 60, available: yes)
output:analog-stereo: Analog Stereo Output (sinks: 1, sources: 0, priority: 6000, available: yes)
output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (sinks: 1, sources: 1, priority: 6060, available: yes)
off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
Active Profile: output:analog-stereo+input:analog-stereo
Ports:
analog-input-internal-mic: Internal Microphone (priority: 8900, latency offset: 0 usec)
Properties:
device.icon_name = "audio-input-microphone"
Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo
analog-input-mic: Microphone (priority: 8700, latency offset: 0 usec, not available)
Properties:
device.icon_name = "audio-input-microphone"
Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo
analog-output-speaker: Speakers (priority: 10000, latency offset: 0 usec)
Properties:
device.icon_name = "audio-speakers"
Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo
analog-output-headphones: Headphones (priority: 9000, latency offset: 0 usec, not available)
Properties:
device.icon_name = "audio-headphones"
Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo
Card #2
Name: bluez_card.20_74_CF_01_8A_E5
Driver: module-bluez5-device.c
Owner Module: 24
Properties:
device.description = "AfterShokz BLUEZ 2"
device.string = "20:74:CF:01:8A:E5"
device.api = "bluez"
device.class = "sound"
device.bus = "bluetooth"
device.form_factor = "headset"
bluez.path = "/org/bluez/hci0/dev_20_74_CF_01_8A_E5"
bluez.class = "0x240404"
bluez.alias = "AfterShokz BLUEZ 2"
device.icon_name = "audio-headset-bluetooth"
device.intended_roles = "phone"
Profiles:
headset_head_unit: Headset Head Unit (HSP/HFP) (sinks: 1, sources: 1, priority: 20, available: no)
a2dp_sink: High Fidelity Playback (A2DP Sink) (sinks: 1, sources: 0, priority: 10, available: yes)
off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
Active Profile: a2dp_sink
Ports:
headset-output: Headset (priority: 0, latency offset: 0 usec, available)
Part of profile(s): headset_head_unit, a2dp_sink
headset-input: Headset (priority: 0, latency offset: 0 usec, not available)
Part of profile(s): headset_head_unit
|
Проблема в том, что после того как он появился в списках, на него не перенаправляется аудио поток...
При этом на обычные наушники pulseaudio реагирует просто супер!
При этом я отлично смогу перевести поток плеера на гарнитуру pacmd move-sink-input 14 2 и там играет именно плеер!
Однако меня не устроила эта ситуация и я стал играться. В итоге пришел к интересному результату.
Я выполнил от юзера pulseaudio -k и процессы pulsaudio перезапустились, гарнитура отвалилась от bluetooth.
Я подключил ее снова и о чудо! На нее пошли все аудио потоки.
pulseaudio -k решает проблему с гарнитурой, но мне кажется странным, почему релогин не решает эту проблему тоже.
Ведь при нем процессы тоже умирают, однако гарнитура при релогине продолжает не подключаться...
Кто-нибдуь может объяснить почему так? Меня всем устраивал autospawn=yes, но это странное шаманство...
По запросу дам всю необходимую инфу. |
|
Back to top |
|
|
deter0k n00b
Joined: 12 Dec 2015 Posts: 2
|
Posted: Sat Dec 12, 2015 4:46 pm Post subject: |
|
|
Залогинился в терминале, с помощью bluetoothctl подцепил гарнитуру и с помошью aplay запустил тестовый трек, все зараотало! После залогивания в kde все опять через калонки пошло... |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|