USB Microphone over USB switch doesn't work with TeamSpeak
I run an USB Microphone over a USB switch (together with Mouse and Keyboard) on multiple Computers.
When i switch back from my other Computer, my Microphone is re-activated by Linux, but TeamSpeak cannot reactivate it or still thinks it is broken/not available. I have to change the "Capture Device" configuration in Teamspeak from "Default" to my USB Microphone or the other way around to make it work again.
In an older Ubuntu installation i somehow solved this with the help of Google so that the USB Microphone always appeared active (even though it was unplugged), but i cannot for the live of me find this fix again.
usb microphone alsa pulse-audio teamspeak
add a comment |
I run an USB Microphone over a USB switch (together with Mouse and Keyboard) on multiple Computers.
When i switch back from my other Computer, my Microphone is re-activated by Linux, but TeamSpeak cannot reactivate it or still thinks it is broken/not available. I have to change the "Capture Device" configuration in Teamspeak from "Default" to my USB Microphone or the other way around to make it work again.
In an older Ubuntu installation i somehow solved this with the help of Google so that the USB Microphone always appeared active (even though it was unplugged), but i cannot for the live of me find this fix again.
usb microphone alsa pulse-audio teamspeak
Do you remember any details how you solved it? With a null Pulseaudio sink, and loopback? With some ALSA plugins, editing.asoundrc
? Anything?
– dirkt
Nov 28 '18 at 7:02
@dirkt no, unfortunately not. i just tried the null sink with a loopback module idea, and it only works one time, if i disconnect the microphone more than one time it does not reconnect the mic to the null sink.
– TimeWaster
Nov 28 '18 at 19:33
add a comment |
I run an USB Microphone over a USB switch (together with Mouse and Keyboard) on multiple Computers.
When i switch back from my other Computer, my Microphone is re-activated by Linux, but TeamSpeak cannot reactivate it or still thinks it is broken/not available. I have to change the "Capture Device" configuration in Teamspeak from "Default" to my USB Microphone or the other way around to make it work again.
In an older Ubuntu installation i somehow solved this with the help of Google so that the USB Microphone always appeared active (even though it was unplugged), but i cannot for the live of me find this fix again.
usb microphone alsa pulse-audio teamspeak
I run an USB Microphone over a USB switch (together with Mouse and Keyboard) on multiple Computers.
When i switch back from my other Computer, my Microphone is re-activated by Linux, but TeamSpeak cannot reactivate it or still thinks it is broken/not available. I have to change the "Capture Device" configuration in Teamspeak from "Default" to my USB Microphone or the other way around to make it work again.
In an older Ubuntu installation i somehow solved this with the help of Google so that the USB Microphone always appeared active (even though it was unplugged), but i cannot for the live of me find this fix again.
usb microphone alsa pulse-audio teamspeak
usb microphone alsa pulse-audio teamspeak
edited Dec 14 '18 at 2:18
TimeWaster
asked Nov 27 '18 at 15:20
TimeWasterTimeWaster
63
63
Do you remember any details how you solved it? With a null Pulseaudio sink, and loopback? With some ALSA plugins, editing.asoundrc
? Anything?
– dirkt
Nov 28 '18 at 7:02
@dirkt no, unfortunately not. i just tried the null sink with a loopback module idea, and it only works one time, if i disconnect the microphone more than one time it does not reconnect the mic to the null sink.
– TimeWaster
Nov 28 '18 at 19:33
add a comment |
Do you remember any details how you solved it? With a null Pulseaudio sink, and loopback? With some ALSA plugins, editing.asoundrc
? Anything?
– dirkt
Nov 28 '18 at 7:02
@dirkt no, unfortunately not. i just tried the null sink with a loopback module idea, and it only works one time, if i disconnect the microphone more than one time it does not reconnect the mic to the null sink.
– TimeWaster
Nov 28 '18 at 19:33
Do you remember any details how you solved it? With a null Pulseaudio sink, and loopback? With some ALSA plugins, editing
.asoundrc
? Anything?– dirkt
Nov 28 '18 at 7:02
Do you remember any details how you solved it? With a null Pulseaudio sink, and loopback? With some ALSA plugins, editing
.asoundrc
? Anything?– dirkt
Nov 28 '18 at 7:02
@dirkt no, unfortunately not. i just tried the null sink with a loopback module idea, and it only works one time, if i disconnect the microphone more than one time it does not reconnect the mic to the null sink.
– TimeWaster
Nov 28 '18 at 19:33
@dirkt no, unfortunately not. i just tried the null sink with a loopback module idea, and it only works one time, if i disconnect the microphone more than one time it does not reconnect the mic to the null sink.
– TimeWaster
Nov 28 '18 at 19:33
add a comment |
1 Answer
1
active
oldest
votes
so, after sweating blood and tears, reading tons over tons of documentation and trying stuff out for days on end i have a solution. not a good one, but i have one.
first add to the end of your pulseaudio config (in my case sudo nano /etc/pulse/default.pa
) the following config:
# create virtual sink named Mic and loopback USB Microphone to virtual sink
load-module module-null-sink sink_name=Mic
load-module module-loopback source=alsa_input.usb-Thomann_SC450USB-00.iec958-stereo sink=Mic source_dont_move=true sink_dont_move=true
set-default-source Mic.monitor
this creates a "null-sink" which does not go away when some device is detached because it does not belong to any device, which also has a corresponding monitor source which TS3 can use as a permanent source. then a loopback is created from the microphone to the null sink.
now restart pulseaudio:
pulseaudio -k
now you need to make sure that TS3 uses the Mic monitor as a source permanently by opening pavucontrol
and making sure that under the "Recording" tab "TeamSpeak3" is bound to "Monitor of Null Output" in the dropdown.
normally this would be enough, but pulseaudio does not re-attach the loopback once the microphone is re-connected. for that to happen we need udev.
first create a script that can be called by udev:
sudo nano /usr/local/bin/udev_sound
and add the following script:
#!/bin/bash
# check if microphone is mounted already
while ! $(pactl list sources|grep -q 'alsa_input.usb-Thomann_SC450USB-00.iec958-stereo')
do
let "n += 1"
sleep 1
if [ "$n" -eq 10 ]
then break
fi
echo "running"
done
# loopback microphone to null sink
export PULSE_RUNTIME_PATH="/run/user/$(id -u)/pulse/"
pactl load-module module-loopback source=alsa_input.usb-Thomann_SC450USB-00.iec958-stereo sink=Mic source_dont_move=true sink_dont_move=true
now make the script executable:
sudo chmod +x /usr/local/bin/udev_sound
this will check for a time period of 10 seconds if the microphone is attached, and if yes, create the pulseaudio loopback again that was removed when the microphone was detached.
now lets create a udev rule starting the script when when the device is re-attached:
sudo nano /lib/udev/rules.d/91-someNameYouWillRecogniseAsYours.rules
with the following content:
ACTION=="add", SUBSYSTEM=="sound", ATTR{id}=="SC450USB", RUN+="/bin/su YOURuSERnAME -c 'screen -d -m /usr/local/bin/udev_sound'"
now restart udev:
sudo /etc/init.d/udev restart
this checks if a device with a certain id is added (attached) and runs the script we just created under your username (don't forget to change it). this is important since on most system pulseaudio is run in userland. screen -d -m
is important so the script is run non-blocking, otherwise the microphone would not be attached until the script did end running.
your device-specific command will most likely look different, what "ATTR" and other identifiers to use depends on your device, how to find that out is described a million times online.
this should be it. now everytime the microphone is re-attached the script creates the loopback, and TS3 should all that time be listening to the null sinks monitor thinking it is a real microphone.
in all these steps replace "alsa_input.usb-Thomann_SC450USB-00.iec958-stereo" with whatever your device is named like!
overall i can say i hate udev. it has a million special things it handles different than a normal linux system and it is nearly impossible to debug. i never want to see it again.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1378791%2fusb-microphone-over-usb-switch-doesnt-work-with-teamspeak%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
so, after sweating blood and tears, reading tons over tons of documentation and trying stuff out for days on end i have a solution. not a good one, but i have one.
first add to the end of your pulseaudio config (in my case sudo nano /etc/pulse/default.pa
) the following config:
# create virtual sink named Mic and loopback USB Microphone to virtual sink
load-module module-null-sink sink_name=Mic
load-module module-loopback source=alsa_input.usb-Thomann_SC450USB-00.iec958-stereo sink=Mic source_dont_move=true sink_dont_move=true
set-default-source Mic.monitor
this creates a "null-sink" which does not go away when some device is detached because it does not belong to any device, which also has a corresponding monitor source which TS3 can use as a permanent source. then a loopback is created from the microphone to the null sink.
now restart pulseaudio:
pulseaudio -k
now you need to make sure that TS3 uses the Mic monitor as a source permanently by opening pavucontrol
and making sure that under the "Recording" tab "TeamSpeak3" is bound to "Monitor of Null Output" in the dropdown.
normally this would be enough, but pulseaudio does not re-attach the loopback once the microphone is re-connected. for that to happen we need udev.
first create a script that can be called by udev:
sudo nano /usr/local/bin/udev_sound
and add the following script:
#!/bin/bash
# check if microphone is mounted already
while ! $(pactl list sources|grep -q 'alsa_input.usb-Thomann_SC450USB-00.iec958-stereo')
do
let "n += 1"
sleep 1
if [ "$n" -eq 10 ]
then break
fi
echo "running"
done
# loopback microphone to null sink
export PULSE_RUNTIME_PATH="/run/user/$(id -u)/pulse/"
pactl load-module module-loopback source=alsa_input.usb-Thomann_SC450USB-00.iec958-stereo sink=Mic source_dont_move=true sink_dont_move=true
now make the script executable:
sudo chmod +x /usr/local/bin/udev_sound
this will check for a time period of 10 seconds if the microphone is attached, and if yes, create the pulseaudio loopback again that was removed when the microphone was detached.
now lets create a udev rule starting the script when when the device is re-attached:
sudo nano /lib/udev/rules.d/91-someNameYouWillRecogniseAsYours.rules
with the following content:
ACTION=="add", SUBSYSTEM=="sound", ATTR{id}=="SC450USB", RUN+="/bin/su YOURuSERnAME -c 'screen -d -m /usr/local/bin/udev_sound'"
now restart udev:
sudo /etc/init.d/udev restart
this checks if a device with a certain id is added (attached) and runs the script we just created under your username (don't forget to change it). this is important since on most system pulseaudio is run in userland. screen -d -m
is important so the script is run non-blocking, otherwise the microphone would not be attached until the script did end running.
your device-specific command will most likely look different, what "ATTR" and other identifiers to use depends on your device, how to find that out is described a million times online.
this should be it. now everytime the microphone is re-attached the script creates the loopback, and TS3 should all that time be listening to the null sinks monitor thinking it is a real microphone.
in all these steps replace "alsa_input.usb-Thomann_SC450USB-00.iec958-stereo" with whatever your device is named like!
overall i can say i hate udev. it has a million special things it handles different than a normal linux system and it is nearly impossible to debug. i never want to see it again.
add a comment |
so, after sweating blood and tears, reading tons over tons of documentation and trying stuff out for days on end i have a solution. not a good one, but i have one.
first add to the end of your pulseaudio config (in my case sudo nano /etc/pulse/default.pa
) the following config:
# create virtual sink named Mic and loopback USB Microphone to virtual sink
load-module module-null-sink sink_name=Mic
load-module module-loopback source=alsa_input.usb-Thomann_SC450USB-00.iec958-stereo sink=Mic source_dont_move=true sink_dont_move=true
set-default-source Mic.monitor
this creates a "null-sink" which does not go away when some device is detached because it does not belong to any device, which also has a corresponding monitor source which TS3 can use as a permanent source. then a loopback is created from the microphone to the null sink.
now restart pulseaudio:
pulseaudio -k
now you need to make sure that TS3 uses the Mic monitor as a source permanently by opening pavucontrol
and making sure that under the "Recording" tab "TeamSpeak3" is bound to "Monitor of Null Output" in the dropdown.
normally this would be enough, but pulseaudio does not re-attach the loopback once the microphone is re-connected. for that to happen we need udev.
first create a script that can be called by udev:
sudo nano /usr/local/bin/udev_sound
and add the following script:
#!/bin/bash
# check if microphone is mounted already
while ! $(pactl list sources|grep -q 'alsa_input.usb-Thomann_SC450USB-00.iec958-stereo')
do
let "n += 1"
sleep 1
if [ "$n" -eq 10 ]
then break
fi
echo "running"
done
# loopback microphone to null sink
export PULSE_RUNTIME_PATH="/run/user/$(id -u)/pulse/"
pactl load-module module-loopback source=alsa_input.usb-Thomann_SC450USB-00.iec958-stereo sink=Mic source_dont_move=true sink_dont_move=true
now make the script executable:
sudo chmod +x /usr/local/bin/udev_sound
this will check for a time period of 10 seconds if the microphone is attached, and if yes, create the pulseaudio loopback again that was removed when the microphone was detached.
now lets create a udev rule starting the script when when the device is re-attached:
sudo nano /lib/udev/rules.d/91-someNameYouWillRecogniseAsYours.rules
with the following content:
ACTION=="add", SUBSYSTEM=="sound", ATTR{id}=="SC450USB", RUN+="/bin/su YOURuSERnAME -c 'screen -d -m /usr/local/bin/udev_sound'"
now restart udev:
sudo /etc/init.d/udev restart
this checks if a device with a certain id is added (attached) and runs the script we just created under your username (don't forget to change it). this is important since on most system pulseaudio is run in userland. screen -d -m
is important so the script is run non-blocking, otherwise the microphone would not be attached until the script did end running.
your device-specific command will most likely look different, what "ATTR" and other identifiers to use depends on your device, how to find that out is described a million times online.
this should be it. now everytime the microphone is re-attached the script creates the loopback, and TS3 should all that time be listening to the null sinks monitor thinking it is a real microphone.
in all these steps replace "alsa_input.usb-Thomann_SC450USB-00.iec958-stereo" with whatever your device is named like!
overall i can say i hate udev. it has a million special things it handles different than a normal linux system and it is nearly impossible to debug. i never want to see it again.
add a comment |
so, after sweating blood and tears, reading tons over tons of documentation and trying stuff out for days on end i have a solution. not a good one, but i have one.
first add to the end of your pulseaudio config (in my case sudo nano /etc/pulse/default.pa
) the following config:
# create virtual sink named Mic and loopback USB Microphone to virtual sink
load-module module-null-sink sink_name=Mic
load-module module-loopback source=alsa_input.usb-Thomann_SC450USB-00.iec958-stereo sink=Mic source_dont_move=true sink_dont_move=true
set-default-source Mic.monitor
this creates a "null-sink" which does not go away when some device is detached because it does not belong to any device, which also has a corresponding monitor source which TS3 can use as a permanent source. then a loopback is created from the microphone to the null sink.
now restart pulseaudio:
pulseaudio -k
now you need to make sure that TS3 uses the Mic monitor as a source permanently by opening pavucontrol
and making sure that under the "Recording" tab "TeamSpeak3" is bound to "Monitor of Null Output" in the dropdown.
normally this would be enough, but pulseaudio does not re-attach the loopback once the microphone is re-connected. for that to happen we need udev.
first create a script that can be called by udev:
sudo nano /usr/local/bin/udev_sound
and add the following script:
#!/bin/bash
# check if microphone is mounted already
while ! $(pactl list sources|grep -q 'alsa_input.usb-Thomann_SC450USB-00.iec958-stereo')
do
let "n += 1"
sleep 1
if [ "$n" -eq 10 ]
then break
fi
echo "running"
done
# loopback microphone to null sink
export PULSE_RUNTIME_PATH="/run/user/$(id -u)/pulse/"
pactl load-module module-loopback source=alsa_input.usb-Thomann_SC450USB-00.iec958-stereo sink=Mic source_dont_move=true sink_dont_move=true
now make the script executable:
sudo chmod +x /usr/local/bin/udev_sound
this will check for a time period of 10 seconds if the microphone is attached, and if yes, create the pulseaudio loopback again that was removed when the microphone was detached.
now lets create a udev rule starting the script when when the device is re-attached:
sudo nano /lib/udev/rules.d/91-someNameYouWillRecogniseAsYours.rules
with the following content:
ACTION=="add", SUBSYSTEM=="sound", ATTR{id}=="SC450USB", RUN+="/bin/su YOURuSERnAME -c 'screen -d -m /usr/local/bin/udev_sound'"
now restart udev:
sudo /etc/init.d/udev restart
this checks if a device with a certain id is added (attached) and runs the script we just created under your username (don't forget to change it). this is important since on most system pulseaudio is run in userland. screen -d -m
is important so the script is run non-blocking, otherwise the microphone would not be attached until the script did end running.
your device-specific command will most likely look different, what "ATTR" and other identifiers to use depends on your device, how to find that out is described a million times online.
this should be it. now everytime the microphone is re-attached the script creates the loopback, and TS3 should all that time be listening to the null sinks monitor thinking it is a real microphone.
in all these steps replace "alsa_input.usb-Thomann_SC450USB-00.iec958-stereo" with whatever your device is named like!
overall i can say i hate udev. it has a million special things it handles different than a normal linux system and it is nearly impossible to debug. i never want to see it again.
so, after sweating blood and tears, reading tons over tons of documentation and trying stuff out for days on end i have a solution. not a good one, but i have one.
first add to the end of your pulseaudio config (in my case sudo nano /etc/pulse/default.pa
) the following config:
# create virtual sink named Mic and loopback USB Microphone to virtual sink
load-module module-null-sink sink_name=Mic
load-module module-loopback source=alsa_input.usb-Thomann_SC450USB-00.iec958-stereo sink=Mic source_dont_move=true sink_dont_move=true
set-default-source Mic.monitor
this creates a "null-sink" which does not go away when some device is detached because it does not belong to any device, which also has a corresponding monitor source which TS3 can use as a permanent source. then a loopback is created from the microphone to the null sink.
now restart pulseaudio:
pulseaudio -k
now you need to make sure that TS3 uses the Mic monitor as a source permanently by opening pavucontrol
and making sure that under the "Recording" tab "TeamSpeak3" is bound to "Monitor of Null Output" in the dropdown.
normally this would be enough, but pulseaudio does not re-attach the loopback once the microphone is re-connected. for that to happen we need udev.
first create a script that can be called by udev:
sudo nano /usr/local/bin/udev_sound
and add the following script:
#!/bin/bash
# check if microphone is mounted already
while ! $(pactl list sources|grep -q 'alsa_input.usb-Thomann_SC450USB-00.iec958-stereo')
do
let "n += 1"
sleep 1
if [ "$n" -eq 10 ]
then break
fi
echo "running"
done
# loopback microphone to null sink
export PULSE_RUNTIME_PATH="/run/user/$(id -u)/pulse/"
pactl load-module module-loopback source=alsa_input.usb-Thomann_SC450USB-00.iec958-stereo sink=Mic source_dont_move=true sink_dont_move=true
now make the script executable:
sudo chmod +x /usr/local/bin/udev_sound
this will check for a time period of 10 seconds if the microphone is attached, and if yes, create the pulseaudio loopback again that was removed when the microphone was detached.
now lets create a udev rule starting the script when when the device is re-attached:
sudo nano /lib/udev/rules.d/91-someNameYouWillRecogniseAsYours.rules
with the following content:
ACTION=="add", SUBSYSTEM=="sound", ATTR{id}=="SC450USB", RUN+="/bin/su YOURuSERnAME -c 'screen -d -m /usr/local/bin/udev_sound'"
now restart udev:
sudo /etc/init.d/udev restart
this checks if a device with a certain id is added (attached) and runs the script we just created under your username (don't forget to change it). this is important since on most system pulseaudio is run in userland. screen -d -m
is important so the script is run non-blocking, otherwise the microphone would not be attached until the script did end running.
your device-specific command will most likely look different, what "ATTR" and other identifiers to use depends on your device, how to find that out is described a million times online.
this should be it. now everytime the microphone is re-attached the script creates the loopback, and TS3 should all that time be listening to the null sinks monitor thinking it is a real microphone.
in all these steps replace "alsa_input.usb-Thomann_SC450USB-00.iec958-stereo" with whatever your device is named like!
overall i can say i hate udev. it has a million special things it handles different than a normal linux system and it is nearly impossible to debug. i never want to see it again.
answered Dec 9 '18 at 1:10
TimeWasterTimeWaster
63
63
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1378791%2fusb-microphone-over-usb-switch-doesnt-work-with-teamspeak%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Do you remember any details how you solved it? With a null Pulseaudio sink, and loopback? With some ALSA plugins, editing
.asoundrc
? Anything?– dirkt
Nov 28 '18 at 7:02
@dirkt no, unfortunately not. i just tried the null sink with a loopback module idea, and it only works one time, if i disconnect the microphone more than one time it does not reconnect the mic to the null sink.
– TimeWaster
Nov 28 '18 at 19:33