Re: [pulseaudio-discuss] Pulseaudio and S/PDIF

2023-03-26 Thread Alexander E. Patrakov
On Fri, Mar 24, 2023 at 2:32 AM Jerry Geis  wrote:
>
> >Don't bother. This is an issue common to 99% of USB webcams. Namely,
> >those not listed explicitly in /usr/share/alsa/cards/USB-Audio.conf.
>
> >Both the analog and the fake S/PDIF microphones ultimately point to
> >exactly the same ALSA hardware device.
>
> Alexandar - thanks
>
> But it seems if I dont "mute" the S/PDIF microphone - it get feedback ???
> If I mute it from the GUI and use the webcam all is fine.
> If I unmute it back I get feedback.

What do you mean by "feedback"? Are you saying that it somehow plays
to your speakers, or that your words are captured twice, or that the
other party complains during calls?

As I said, these "analog" and "S/PDIF" microphones are in fact the
same thing (both are mapped to hw:2), and, due to the mechanisms of
profiles, only one can be active at a time, so it doesn't matter which
one you use.

To select the analog profile (which is mutually exclusive with the
fake S/PDIF), run this command:

pactl set-card-profile 2 input:analog-stereo

But I am 100% sure that it won't help.

To completely turn the webcam microphone off, run this command:

pactl set-card-profile 2 off

To filter out the sound of your speakers from the signal captured by
the webcam, run this command:

pactl load-module module-echo-cancel sink_master=alsa_output.pci-_00_1b.0.
hdmi-stereo 
source_master=alsa_input.usb-046d_Logitech_Webcam_C930e_8E44BAAE-02.iec958-stereo
channels=2 rate=48000 use_master_format=true

(or 
source_master=alsa_input.usb-046d_Logitech_Webcam_C930e_8E44BAAE-02.analog-stereo
if you switched the webcam to analog, but, again, this is meaningless)

This will create a new sink and a new source that have "echo
cancelled" in their names. Set them as default and move all
applications to them.

-- 
Alexander E. Patrakov


Re: [pulseaudio-discuss] Pulseaudio and S/PDIF

2023-03-23 Thread Jerry Geis
>Don't bother. This is an issue common to 99% of USB webcams. Namely,
>those not listed explicitly in /usr/share/alsa/cards/USB-Audio.conf.

>Both the analog and the fake S/PDIF microphones ultimately point to
>exactly the same ALSA hardware device.

Alexandar - thanks

But it seems if I dont "mute" the S/PDIF microphone - it get feedback ???
If I mute it from the GUI and use the webcam all is fine.
If I unmute it back I get feedback.

I am trying to figure out how to unmute it from the command line though as
there is more than 1 of these.
THanks

Jerry


Re: [pulseaudio-discuss] Pulseaudio and S/PDIF

2023-03-23 Thread Alexander E. Patrakov
On Thu, Mar 23, 2023 at 10:06 PM Jerry Geis  wrote:
>
>
>
> On Thu, Mar 23, 2023 at 9:35 AM Jerry Geis  wrote:
>>
>>
>> I see the below for list-sources.
>>
>> Source index 1 is muted.
>> Source index 2 presents  - TWO -  microphones
>> I want to MUTE the S/PDIF one 
>> how do I do that ?
>>
>> The GUI on Ubuntu 20.04 for the Input shows two items
>> Digital S/PDIF Webcam and  Webcam.
>>
>> Muting from GUI - works - but how do I do it from the command line ?
>>
>> Thanks
>>
>> Jerry
>>
>> 
>> pacmd list-sources
>> 2 source(s) available.
>> index: 1
>> name: 
>> driver: 
>> flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
>> state: SUSPENDED
>> suspend cause: IDLE
>> priority: 1030
>> volume: front-left: 0 /   0% / -inf dB,   front-right: 0 /   0% / -inf dB
>>balance 0.00
>> base volume: 65536 / 100% / 0.00 dB
>> volume steps: 65537
>> muted: yes
>> current latency: 0.00 ms
>> max rewind: 0 KiB
>> sample spec: s16le 2ch 44100Hz
>> channel map: front-left,front-right
>> Stereo
>> used by: 0
>> linked by: 0
>> configured latency: 0.00 ms; range is 16.00 .. 2000.00 ms
>> monitor_of: 0
>> card: 1 
>> module: 8
>> properties:
>> device.description = "Monitor of Built-in Audio Digital Stereo (HDMI)"
>> device.class = "monitor"
>> alsa.card = "0"
>> alsa.card_name = "HDA Intel PCH"
>> alsa.long_card_name = "HDA Intel PCH at 0x89414000 irq 126"
>> alsa.driver_name = "snd_hda_intel"
>> device.bus_path = "pci-:00:1b.0"
>> sysfs.path = "/devices/pci:00/:00:1b.0/sound/card0"
>> device.bus = "pci"
>> device.vendor.id = "8086"
>> device.vendor.name = "Intel Corporation"
>> device.product.id = "2284"
>> device.product.name = "Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx 
>> Series High Definition Audio Controller"
>> device.form_factor = "internal"
>> device.string = "0"
>> module-udev-detect.discovered = "1"
>> device.icon_name = "audio-card-pci"
>>   * index: 2
>> name: 
>> driver: 
>> flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
>> state: RUNNING
>> suspend cause: (none)
>> priority: 9048
>> volume: front-left: 29450 /  45% / -20.84 dB,   front-right: 29450 /  45% / 
>> -20.84 dB
>>balance 0.00
>> base volume: 65536 / 100% / 0.00 dB
>> volume steps: 65537
>> muted: no
>> current latency: 0.62 ms
>> max rewind: 0 KiB
>> sample spec: s16le 2ch 48000Hz
>> channel map: front-left,front-right
>> Stereo
>> used by: 1
>> linked by: 1
>> configured latency: 40.00 ms; range is 0.50 .. 2000.00 ms
>> card: 0 
>> module: 7
>> properties:
>> alsa.resolution_bits = "16"
>> device.api = "alsa"
>> device.class = "sound"
>> alsa.class = "generic"
>> alsa.subclass = "generic-mix"
>> alsa.name = "USB Audio"
>> alsa.id = "USB Audio"
>> alsa.subdevice = "0"
>> alsa.subdevice_name = "subdevice #0"
>> alsa.device = "0"
>> alsa.card = "1"
>> alsa.card_name = "Logitech Webcam C930e"
>> alsa.long_card_name = "Logitech Webcam C930e at usb-:00:14.0-2, high 
>> speed"
>> alsa.driver_name = "snd_usb_audio"
>> device.bus_path = "pci-:00:14.0-usb-0:2:1.2"
>> sysfs.path = "/devices/pci:00/:00:14.0/usb1/1-2/1-2:1.2/sound/card1"
>> udev.id = "usb-046d_Logitech_Webcam_C930e_8E44BAAE-02"
>> device.bus = "usb"
>> device.vendor.id = "046d"
>> device.vendor.name = "Logitech, Inc."
>> device.product.id = "0843"
>> device.product.name = "Webcam C930e"
>> device.serial = "046d_Logitech_Webcam_C930e_8E44BAAE"
>> device.form_factor = "webcam"
>> device.string = "iec958:1"
>> device.buffering.buffer_size = "384000"
>> device.buffering.fragment_size = "192000"
>> device.access_mode = "mmap+timer"
>> device.profile.name = "iec958-stereo"
>> device.profile.description = "Digital Stereo (IEC958)"
>> device.description = "Webcam C930e Digital Stereo (IEC958)"
>> module-udev-detect.discovered = "1"
>> device.icon_name = "camera-web-usb"
>> ports:
>> iec958-stereo-input: Digital Input (S/PDIF) (priority 0, latency offset 0 
>> usec, available: unknown)
>> properties:
>>
>> active port: 
>
>
> This shows it: with "pacmd list-cards"
>
>   input:analog-stereo: Analog Stereo Input (priority 65, available: unknown)
> input:iec958-stereo: Digital Stereo (IEC958) Input (priority 55, available: 
> unknown)
>
> I want the analog to be active and want to MUTE this iec958
>
> So there are TWO microphones presented on this card (webcam) or USB input 
> microphone.
> I want to use the analog one and not the iec958.  I get feedback with both 
> enabled.
> I can mute it from GUI - but I need to be able to mute JUST the iec958 input 
> and not the analog from the command line.
>
> So seems the webcam presents two microphones-  I need to mute one of them 
> S/PDIF from the command line
> thanks
>
> Jerry
>
>
> pacmd list-cards
> 2 card(s) available.
> index: 0
> name: 
> driver: 
> owner module: 7
> properties:
> alsa.card = "1"
> alsa.card_name = "Logitech Webcam C930e"
> alsa.long_card_name = "Logitech Webcam C930e at usb-:00:14.0-2, high 
> speed"
> alsa.driver_name = "snd_usb_audio"

Re: [pulseaudio-discuss] Pulseaudio and S/PDIF

2023-03-23 Thread Jerry Geis
On Thu, Mar 23, 2023 at 9:35 AM Jerry Geis  wrote:

>
> I see the below for list-sources.
>
> Source index 1 is muted.
> Source index 2 presents  - TWO -  microphones
> I want to MUTE the S/PDIF one 
> how do I do that ?
>
> The GUI on Ubuntu 20.04 for the Input shows two items
> Digital S/PDIF Webcam and  Webcam.
>
> Muting from GUI - works - but how do I do it from the command line ?
>
> Thanks
>
> Jerry
>
> 
> pacmd list-sources
> 2 source(s) available.
> index: 1
> name: 
> driver: 
> flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
> state: SUSPENDED
> suspend cause: IDLE
> priority: 1030
> volume: front-left: 0 /   0% / -inf dB,   front-right: 0 /   0% / -inf dB
>balance 0.00
> base volume: 65536 / 100% / 0.00 dB
> volume steps: 65537
> muted: yes
> current latency: 0.00 ms
> max rewind: 0 KiB
> sample spec: s16le 2ch 44100Hz
> channel map: front-left,front-right
> Stereo
> used by: 0
> linked by: 0
> configured latency: 0.00 ms; range is 16.00 .. 2000.00 ms
> monitor_of: 0
> card: 1 
> module: 8
> properties:
> device.description = "Monitor of Built-in Audio Digital Stereo (HDMI)"
> device.class = "monitor"
> alsa.card = "0"
> alsa.card_name = "HDA Intel PCH"
> alsa.long_card_name = "HDA Intel PCH at 0x89414000 irq 126"
> alsa.driver_name = "snd_hda_intel"
> device.bus_path = "pci-:00:1b.0"
> sysfs.path = "/devices/pci:00/:00:1b.0/sound/card0"
> device.bus = "pci"
> device.vendor.id = "8086"
> device.vendor.name = "Intel Corporation"
> device.product.id = "2284"
> device.product.name = "Atom/Celeron/Pentium Processor
> x5-E8000/J3xxx/N3xxx Series High Definition Audio Controller"
> device.form_factor = "internal"
> device.string = "0"
> module-udev-detect.discovered = "1"
> device.icon_name = "audio-card-pci"
>   * index: 2
> name: 
> driver: 
> flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
> state: RUNNING
> suspend cause: (none)
> priority: 9048
> volume: front-left: 29450 /  45% / -20.84 dB,   front-right: 29450 /  45%
> / -20.84 dB
>balance 0.00
> base volume: 65536 / 100% / 0.00 dB
> volume steps: 65537
> muted: no
> current latency: 0.62 ms
> max rewind: 0 KiB
> sample spec: s16le 2ch 48000Hz
> channel map: front-left,front-right
> Stereo
> used by: 1
> linked by: 1
> configured latency: 40.00 ms; range is 0.50 .. 2000.00 ms
> card: 0 
> module: 7
> properties:
> alsa.resolution_bits = "16"
> device.api = "alsa"
> device.class = "sound"
> alsa.class = "generic"
> alsa.subclass = "generic-mix"
> alsa.name = "USB Audio"
> alsa.id = "USB Audio"
> alsa.subdevice = "0"
> alsa.subdevice_name = "subdevice #0"
> alsa.device = "0"
> alsa.card = "1"
> alsa.card_name = "Logitech Webcam C930e"
> alsa.long_card_name = "Logitech Webcam C930e at usb-:00:14.0-2, high
> speed"
> alsa.driver_name = "snd_usb_audio"
> device.bus_path = "pci-:00:14.0-usb-0:2:1.2"
> sysfs.path =
> "/devices/pci:00/:00:14.0/usb1/1-2/1-2:1.2/sound/card1"
> udev.id = "usb-046d_Logitech_Webcam_C930e_8E44BAAE-02"
> device.bus = "usb"
> device.vendor.id = "046d"
> device.vendor.name = "Logitech, Inc."
> device.product.id = "0843"
> device.product.name = "Webcam C930e"
> device.serial = "046d_Logitech_Webcam_C930e_8E44BAAE"
> device.form_factor = "webcam"
> device.string = "iec958:1"
> device.buffering.buffer_size = "384000"
> device.buffering.fragment_size = "192000"
> device.access_mode = "mmap+timer"
> device.profile.name = "iec958-stereo"
> device.profile.description = "Digital Stereo (IEC958)"
> device.description = "Webcam C930e Digital Stereo (IEC958)"
> module-udev-detect.discovered = "1"
> device.icon_name = "camera-web-usb"
> ports:
> iec958-stereo-input: Digital Input (S/PDIF) (priority 0, latency offset 0
> usec, available: unknown)
> properties:
>
> active port: 
>

This shows it: with "pacmd list-cards"

  input:analog-stereo: Analog Stereo Input (priority 65, available: unknown)
input:iec958-stereo: Digital Stereo (IEC958) Input (priority 55, available:
unknown)

I want the analog to be active and want to MUTE this iec958

So there are TWO microphones presented on this card (webcam) or USB input
microphone.
I want to use the analog one and not the iec958.  I get feedback with both
enabled.
I can mute it from GUI - but I need to be able to mute JUST the iec958
input and not the analog from the command line.

So seems the webcam presents two microphones-  I need to mute one of them
S/PDIF from the command line
thanks

Jerry


pacmd list-cards
2 card(s) available.
index: 0
name: 
driver: 
owner module: 7
properties:
alsa.card = "1"
alsa.card_name = "Logitech Webcam C930e"
alsa.long_card_name = "Logitech Webcam C930e at usb-:00:14.0-2, high
speed"
alsa.driver_name = "snd_usb_audio"
device.bus_path = "pci-:00:14.0-usb-0:2:1.2"
sysfs.path = "/devices/pci:00/:00:14.0/usb1/1-2/1-2:1.2/sound/card1"
udev.id = "usb-046d_Logitech_Webcam_C930e_8E44BAAE-02"
device.bus = "usb"
device.vendor.id = "046d"
device.vendor.name = "Logitech, 

[pulseaudio-discuss] Pulseaudio and S/PDIF

2023-03-23 Thread Jerry Geis
I see the below for list-sources.

Source index 1 is muted.
Source index 2 presents  - TWO -  microphones
I want to MUTE the S/PDIF one 
how do I do that ?

The GUI on Ubuntu 20.04 for the Input shows two items
Digital S/PDIF Webcam and  Webcam.

Muting from GUI - works - but how do I do it from the command line ?

Thanks

Jerry


pacmd list-sources
2 source(s) available.
index: 1
name: 
driver: 
flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: SUSPENDED
suspend cause: IDLE
priority: 1030
volume: front-left: 0 /   0% / -inf dB,   front-right: 0 /   0% / -inf dB
   balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: yes
current latency: 0.00 ms
max rewind: 0 KiB
sample spec: s16le 2ch 44100Hz
channel map: front-left,front-right
Stereo
used by: 0
linked by: 0
configured latency: 0.00 ms; range is 16.00 .. 2000.00 ms
monitor_of: 0
card: 1 
module: 8
properties:
device.description = "Monitor of Built-in Audio Digital Stereo (HDMI)"
device.class = "monitor"
alsa.card = "0"
alsa.card_name = "HDA Intel PCH"
alsa.long_card_name = "HDA Intel PCH at 0x89414000 irq 126"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-:00:1b.0"
sysfs.path = "/devices/pci:00/:00:1b.0/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "2284"
device.product.name = "Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx
Series High Definition Audio Controller"
device.form_factor = "internal"
device.string = "0"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
  * index: 2
name: 
driver: 
flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: RUNNING
suspend cause: (none)
priority: 9048
volume: front-left: 29450 /  45% / -20.84 dB,   front-right: 29450 /  45% /
-20.84 dB
   balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 0.62 ms
max rewind: 0 KiB
sample spec: s16le 2ch 48000Hz
channel map: front-left,front-right
Stereo
used by: 1
linked by: 1
configured latency: 40.00 ms; range is 0.50 .. 2000.00 ms
card: 0 
module: 7
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "USB Audio"
alsa.id = "USB Audio"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "1"
alsa.card_name = "Logitech Webcam C930e"
alsa.long_card_name = "Logitech Webcam C930e at usb-:00:14.0-2, high
speed"
alsa.driver_name = "snd_usb_audio"
device.bus_path = "pci-:00:14.0-usb-0:2:1.2"
sysfs.path = "/devices/pci:00/:00:14.0/usb1/1-2/1-2:1.2/sound/card1"
udev.id = "usb-046d_Logitech_Webcam_C930e_8E44BAAE-02"
device.bus = "usb"
device.vendor.id = "046d"
device.vendor.name = "Logitech, Inc."
device.product.id = "0843"
device.product.name = "Webcam C930e"
device.serial = "046d_Logitech_Webcam_C930e_8E44BAAE"
device.form_factor = "webcam"
device.string = "iec958:1"
device.buffering.buffer_size = "384000"
device.buffering.fragment_size = "192000"
device.access_mode = "mmap+timer"
device.profile.name = "iec958-stereo"
device.profile.description = "Digital Stereo (IEC958)"
device.description = "Webcam C930e Digital Stereo (IEC958)"
module-udev-detect.discovered = "1"
device.icon_name = "camera-web-usb"
ports:
iec958-stereo-input: Digital Input (S/PDIF) (priority 0, latency offset 0
usec, available: unknown)
properties:

active port: