You are not logged in.

#1 2017-03-28 13:55:30

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 628

Pulseaudio - sound is skipping, laggy

Hi.

I would like to ask for your help. I'm starting to think that i will never learn correct way of setting sound in KDE/Arch using KDE.

I have two sound cards:

[firekage@7500_uATX ~]$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
[firekage@7500_uATX ~]$ 

I want to use NVIDIA sound card from GT730 with Alsa. There is only one problem - KDE/Sound settings sees only default device, nothing more, when aplay sees two of them:

https://ibb.co/hs0Bva


As you can see, there is only one "device" called default.

I don't know why, default one is constantly Intel HD:

  Subdevice #0: subdevice #0
[firekage@7500_uATX ~]$ aplay -L | grep :CARD
default:CARD=PCH
sysdefault:CARD=PCH
front:CARD=PCH,DEV=0
surround21:CARD=PCH,DEV=0
surround40:CARD=PCH,DEV=0
surround41:CARD=PCH,DEV=0
surround50:CARD=PCH,DEV=0
surround51:CARD=PCH,DEV=0
surround71:CARD=PCH,DEV=0
iec958:CARD=PCH,DEV=0
hdmi:CARD=NVidia,DEV=0
hdmi:CARD=NVidia,DEV=1
[firekage@7500_uATX ~]$ 

when i have something like this in /etc/modprobe/alsa-base.conf:

options snd_hda_codec_hdmi index=0

for nvidia to be default one.

Could somebody help? I don't want to use pulseaudio. I tried to delete Alsa, reinstall it, but still only default one. Don't know why in Phonon i see only default one, and not something like "Realtec ALC" and "Nvidia HDMI Codec" - i read that UDEV is managing it so it should be detected.

Modules as fallows:

[firekage@7500_uATX ~]$ lsmod | grep snd
snd_hda_codec_realtek    73728  1
snd_hda_codec_hdmi     45056  1
snd_hda_codec_generic    69632  1 snd_hda_codec_realtek
snd_hda_intel          32768  7
snd_hda_codec         106496  4 snd_hda_intel,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek
snd_hda_core           65536  5 snd_hda_intel,snd_hda_codec,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek
snd_hwdep              16384  1 snd_hda_codec
snd_pcm                90112  5 snd_hda_intel,snd_hda_codec,snd_hda_core,snd_hda_codec_hdmi
snd_timer              28672  2 snd_pcm
snd                    65536  20 snd_hda_intel,snd_hwdep,snd_hda_codec,snd_timer,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek,snd_pcm
soundcore              16384  1 snd

Could somebody help or point me to a good direction? No i don't have sound at all. I cant choose sound card in Phonon,. When i open alsamixer i got

alsamixer
cannot open mixer: Bad argument 

Last edited by firekage (2017-04-02 15:23:31)

Offline

#2 2017-03-28 14:14:53

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,567

Re: Pulseaudio - sound is skipping, laggy

when i have something like this in /etc/modprobe/alsa-base.conf:

options snd_hda_codec_hdmi index=0

wrong options.

Assuming the nvidia audio card also uses snd_hda_intel (98% sure it does, but can be verified with lspci -k ), try this :

# /etc/modprobe.d/alsa-base.conf
options snd_hda_intel index=1,0

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2017-03-28 14:43:02

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 628

Re: Pulseaudio - sound is skipping, laggy

Thanks.

Unfortunaltey, did not helped. I still in Phonon have only "default" sound device - dummy? I don't have sound at all. I saw that people in KDE's Phonon have tab with device, with being able to test right/left audio channel. I don't have it. When i do a sound test from the tab that i have (picture above) i don't have even sounds from KDE.

One thing changed:

[firekage@7500_uATX ~]$ aplay -L | grep :CARD
hdmi:CARD=NVidia,DEV=0
hdmi:CARD=NVidia,DEV=1
default:CARD=PCH
sysdefault:CARD=PCH
front:CARD=PCH,DEV=0
surround21:CARD=PCH,DEV=0
surround40:CARD=PCH,DEV=0
surround41:CARD=PCH,DEV=0
surround50:CARD=PCH,DEV=0
surround51:CARD=PCH,DEV=0
surround71:CARD=PCH,DEV=0
iec958:CARD=PCH,DEV=0
[firekage@7500_uATX ~]$ 

now i see that NVIDIA is above. But no sound. I have something like this in ~/.asoundrc

~/.asounrc
pcm.!default {
        type hw
        card 1
        device 3
}

ctl.!default {
        type hw           
        card 1
}

Last edited by firekage (2017-03-28 14:45:43)

Offline

#4 2017-03-29 22:34:59

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,567

Re: Pulseaudio - sound is skipping, laggy

On various systems I help to maintain Phonon only shows the default device, but sound does work.
I think it may have to do with the replacement of phonon by qt5-multimedia not long ago but am not sure of that.


Remove that asoundrc file, then post aplay -l and full aplay -L output please.

If those confirm HDMI is now default , try speaker-test or aplay from tty to verify alsa is working as intended.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#5 2017-03-30 14:24:33

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 628

Re: Pulseaudio - sound is skipping, laggy

I have sound - it changed somehow to card 1 device 7.

There is now only one problem and i think that i won't find an answer or solution. On plain ALSA sound is superb. With Pulseaudio...i have "glitches" in sound. It looks like sometimes the sound is again repeated. It, for an example, we can hear, let's say, a word "HELLO" i hear "HEE-LLLOO-HELL-OO". I've been searching a lot on www and it looks that it is a bug, old one, with Pulse. adding tsched=0 does not help. I've with ArchWiki help, tried to calculate fragments and fragments.size but still the same - sound is being, sometimes of course, repeated - like a freez, and over again the same thing is heard, spoken and so on. On plain Alsa it works correctly. Unfortunately, i cant have plain alsa because i use sound from nvidia, over hdmi, but for skype i use mic settings from intel sound card and only Pulse allow me in KDE to have nvidia as the main sound card with HDMI and mic from intel hda. Maybe it is possible to achieve it in plain Alsa but don'kt know how.

Last edited by firekage (2017-03-30 14:26:26)

Offline

#6 2017-03-30 14:51:10

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,437

Re: Pulseaudio - sound is skipping, laggy

If you are currently using pulseaudio, remove that ~.asoundrc , reenable tsched if you have it disabled currently and install pulseaudio-alsa (and gst-plugins-good to fix the phonon pulse display, so you see more than just 'default'), then reboot. While playing something that reproduces this effect post

sudo fuser -v /dev/snd/*
pacmd list-cards
pacmd list-sinks
pacmd list-sink-inputs

Last edited by V1del (2017-03-30 15:02:28)

Offline

#7 2017-03-30 18:15:18

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 628

Re: Pulseaudio - sound is skipping, laggy

If i do that, i will fix "default" issue, but will have problem with audio skipping using pulse.



BTW - this is my "working" asoundrc

pcm.!default {
        type hw;
        card 0;
        device 7;
}

ctl.!default {
        type hw;           
        card 0;
}

Eith this i can use nvidia and hdmi and having sound trough hdmi. Unfortunately, i don't know how to input here microphone in order to work, from intel card (second one) - if i could, i think that my problem somehow could be fixed.

**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Microphone is from Intel HDA - card 1 while i use HDMI from nvidia - card 0.



Don't know if i understood - i have to play something and give output? I forgot to mention - this problem does not occur all the time, it is random. I dont think that i would be able to reproduce it at the exact moment.


Edit: i did all what you suggested. While doing it...i again had this problem - sound was repeated...

firekage@7500_uATX ~]$ LANG=C sudo fuser -v /dev/snd/*
                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  firekage    698 F.... pulseaudio
/dev/snd/controlC1:  firekage    698 F.... pulseaudio
/dev/snd/pcmC0D7p:   firekage    698 F...m pulseaudio
/dev/snd/timer:      firekage    698 f.... pulseaudio
[firekage@7500_uATX ~]$ 
[firekage@7500_uATX ~]$ pacmd list-cards
2 card(s) available.
    index: 0
        name: <alsa_card.pci-0000_01_00.1>
        driver: <module-alsa-card.c>
        owner module: 6
        properties:
                alsa.card = "0"
                alsa.card_name = "HDA NVidia"
                alsa.long_card_name = "HDA NVidia at 0xdf080000 irq 17"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:01:00.1"
                sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0"
                device.bus = "pci"
                device.vendor.id = "10de"
                device.vendor.name = "NVIDIA Corporation"
                device.product.id = "0e0f"
                device.product.name = "GK208 HDMI/DP Audio Controller"
                device.string = "0"
                device.description = "GK208 HDMI/DP Audio Controller"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        profiles:
                output:hdmi-stereo: Wyjście Digital Stereo (HDMI) (priority 5400, available: no)
                output:hdmi-surround: Wyjście Digital Surround 5.1 (HDMI) (priority 300, available: no)
                output:hdmi-surround71: Wyjście Digital Surround 7.1 (HDMI) (priority 300, available: no)
                output:hdmi-stereo-extra1: Wyjście Digital Stereo (HDMI 2) (priority 5200, available: unknown)
                output:hdmi-surround-extra1: Wyjście Digital Surround 5.1 (HDMI 2) (priority 100, available: unknown)
                off: Wyłączone (priority 0, available: unknown)
        active profile: <output:hdmi-stereo-extra1>
        sinks:
                alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1/#0: GK208 HDMI/DP Audio Controller Digital Stereo (HDMI 2)
        sources:
                alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1.monitor/#0: Monitor of GK208 HDMI/DP Audio Controller Digital Stereo (HDMI 2)
        ports:
                hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "video-display"
                hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: yes)
                        properties:
                                device.icon_name = "video-display"
                                device.product.name = "2D FHD LG TV
"
    index: 1
        name: <alsa_card.pci-0000_00_1f.3>
        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 0xdf320000 irq 126"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:1f.3"
                sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card1"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "a170"
                device.product.name = "Sunrise Point-H HD Audio"
                device.form_factor = "internal"
                device.string = "1"
                device.description = "Wbudowany dźwięk"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        profiles:
                input:analog-stereo: Wejście Analogowe stereo (priority 60, available: unknown)
                output:analog-stereo: Wyjście Analogowe stereo (priority 6000, available: unknown)
                output:analog-stereo+input:analog-stereo: Analogowy dupleks stereo (priority 6060, available: unknown)
                output:analog-surround-21: Wyjście Analogowe przestrzenne 2.1 (priority 800, available: no)
                output:analog-surround-21+input:analog-stereo: Wyjście Analogowe przestrzenne 2.1 + Wejście Analogowe stereo (priority 860, available: unknown)
                output:analog-surround-40: Wyjście Analogowe przestrzenne 4.0 (priority 700, available: no)
                output:analog-surround-40+input:analog-stereo: Wyjście Analogowe przestrzenne 4.0 + Wejście Analogowe stereo (priority 760, available: unknown)
                output:analog-surround-41: Wyjście Analogowe przestrzenne 4.1 (priority 800, available: no)
                output:analog-surround-41+input:analog-stereo: Wyjście Analogowe przestrzenne 4.1 + Wejście Analogowe stereo (priority 860, available: unknown)
                output:analog-surround-50: Wyjście Analogowe przestrzenne 5.0 (priority 700, available: no)
                output:analog-surround-50+input:analog-stereo: Wyjście Analogowe przestrzenne 5.0 + Wejście Analogowe stereo (priority 760, available: unknown)
                output:analog-surround-51: Wyjście Analogowe przestrzenne 5.1 (priority 800, available: no)
                output:analog-surround-51+input:analog-stereo: Wyjście Analogowe przestrzenne 5.1 + Wejście Analogowe stereo (priority 860, available: unknown)
                output:iec958-stereo: Wyjście Cyfrowe stereo (IEC958) (priority 5500, available: unknown)
                output:iec958-stereo+input:analog-stereo: Wyjście Cyfrowe stereo (IEC958) + Wejście Analogowe stereo (priority 5560, available: unknown)
                off: Wyłączone (priority 0, available: unknown)
        active profile: <output:analog-stereo+input:analog-stereo>
        sinks:
                alsa_output.pci-0000_00_1f.3.analog-stereo/#1: Wbudowany dźwięk Analogowe stereo
        sources:
                alsa_output.pci-0000_00_1f.3.analog-stereo.monitor/#1: Monitor of Wbudowany dźwięk Analogowe stereo
                alsa_input.pci-0000_00_1f.3.analog-stereo/#2: Wbudowany dźwięk Analogowe stereo
        ports:
                analog-input-front-mic: Przedni mikrofon (priority 8500, latency offset 0 usec, available: yes)
                        properties:
                                device.icon_name = "audio-input-microphone"
                analog-input-rear-mic: Tylny mikrofon (priority 8200, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "audio-input-microphone"
                analog-input-linein: Wejście liniowe (priority 8100, latency offset 0 usec, available: no)
                        properties:

                analog-output-lineout: Wyjście liniowe (priority 9900, latency offset 0 usec, available: no)
                        properties:

                analog-output-headphones: Słuchawki (priority 9000, latency offset 0 usec, available: yes)
                        properties:
                                device.icon_name = "audio-headphones"
                iec958-stereo-output: Wyjście cyfrowe (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
                        properties:

[firekage@7500_uATX ~]$ 
[firekage@7500_uATX ~]$ pacmd list-sinks
2 sink(s) available.
    index: 0
        name: <alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1>
        driver: <module-alsa-card.c>
        flags: HARDWARE DECIBEL_VOLUME LATENCY 
        state: RUNNING
        suspend cause: 
        priority: 9050
        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
        volume steps: 65537
        muted: no
        current latency: 71,83 ms
        max request: 12 KiB
        max rewind: 12 KiB
        monitor source: 0
        sample spec: s16le 2 k 44100 Hz
        channel map: front-left,front-right
                     Stereo
        used by: 1
        linked by: 1
        fixed latency: 71,84 ms
        card: 0 <alsa_card.pci-0000_01_00.1>
        module: 6
        properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "HDMI 1"
                alsa.id = "HDMI 1"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "7"
                alsa.card = "0"
                alsa.card_name = "HDA NVidia"
                alsa.long_card_name = "HDA NVidia at 0xdf080000 irq 17"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:01:00.1"
                sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0"
                device.bus = "pci"
                device.vendor.id = "10de"
                device.vendor.name = "NVIDIA Corporation"
                device.product.id = "0e0f"
                device.product.name = "GK208 HDMI/DP Audio Controller"
                device.string = "hdmi:0,1"
                device.buffering.buffer_size = "12672"
                device.buffering.fragment_size = "4224"
                device.access_mode = "mmap"
                device.profile.name = "hdmi-stereo-extra1"
                device.profile.description = "Digital Stereo (HDMI 2)"
                device.description = "GK208 HDMI/DP Audio Controller Digital Stereo (HDMI 2)"
                alsa.mixer_name = "Nvidia GPU 51 HDMI/DP"
                alsa.components = "HDA:10de0051,14628a9f,00100100"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        ports:
                hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: yes)
                        properties:
                                device.icon_name = "video-display"
                                device.product.name = "2D FHD LG TV
"
        active port: <hdmi-output-1>
  * index: 1
        name: <alsa_output.pci-0000_00_1f.3.analog-stereo>
        driver: <module-alsa-card.c>
        flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
        state: SUSPENDED
        suspend cause: IDLE 
        priority: 9959
        volume: front-left: 57672 /  88% / -3,33 dB,   front-right: 57672 /  88% / -3,33 dB
                balance 0,00
        base volume: 65536 / 100% / 0,00 dB
        volume steps: 65537
        muted: no
        current latency: 0,00 ms
        max request: 0 KiB
        max rewind: 0 KiB
        monitor source: 1
        sample spec: s16le 2 k 44100 Hz
        channel map: front-left,front-right
                     Stereo
        used by: 0
        linked by: 0
        fixed latency: 71,97 ms
        card: 1 <alsa_card.pci-0000_00_1f.3>
        module: 7
        properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "ALC892 Analog"
                alsa.id = "ALC892 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 0xdf320000 irq 126"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:1f.3"
                sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card1"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "a170"
                device.product.name = "Sunrise Point-H HD Audio"
                device.form_factor = "internal"
                device.string = "front:1"
                device.buffering.buffer_size = "12696"
                device.buffering.fragment_size = "2116"
                device.access_mode = "mmap"
                device.profile.name = "analog-stereo"
                device.profile.description = "Analogowe stereo"
                device.description = "Wbudowany dźwięk Analogowe stereo"
                alsa.mixer_name = "Realtek ALC892"
                alsa.components = "HDA:10ec0892,1462f972,00100302"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        ports:
                analog-output-lineout: Wyjście liniowe (priority 9900, latency offset 0 usec, available: no)
                        properties:

                analog-output-headphones: Słuchawki (priority 9000, latency offset 0 usec, available: yes)
                        properties:
                                device.icon_name = "audio-headphones"
        active port: <analog-output-headphones>
[firekage@7500_uATX ~]$ 
[firekage@7500_uATX ~]$ pacmd list-sink-inputs
1 sink input(s) available.
    index: 8
        driver: <protocol-native.c>
        flags: 
        state: RUNNING
        sink: 0 <alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1>
        volume: front-left: 65536 / 100% / 0,00 dB,   front-right: 65536 / 100% / 0,00 dB
                balance 0,00
        muted: no
        current latency: 440,42 ms
        requested latency: 71,84 ms
        sample spec: float32le 2 k 48000 Hz
        channel map: front-left,front-right
                     Stereo
        resample method: speex-float-8
        module: 9
        client: 25 <ALSA plug-in [mplayer]>
        properties:
                media.name = "ALSA Playback"
                application.name = "ALSA plug-in [mplayer]"
                native-protocol.peer = "UNIX socket client"
                native-protocol.version = "32"
                application.process.id = "2419"
                application.process.user = "firekage"
                application.process.host = "7500_uATX"
                application.process.binary = "mplayer"
                application.language = "C"
                window.x11.display = ":0"
                application.process.machine_id = "95a5d060c2cd4f68a47dbb79cf2430f4"
                application.process.session_id = "c2"
                application.icon_name = "mplayer"
                module-stream-restore.id = "sink-input-by-application-name:ALSA plug-in [mplayer]"
[firekage@7500_uATX ~]$ 

I posted it above, as you suggested.

Last edited by firekage (2017-03-31 20:18:55)

Offline

#8 2017-04-09 10:35:42

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 628

Re: Pulseaudio - sound is skipping, laggy

Sorry for refresh - anybody could help?

Offline

#9 2017-04-09 11:11:26

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,437

Re: Pulseaudio - sound is skipping, laggy

V1del wrote:

If you are currently using pulseaudio, remove that ~.asoundrc , reenable tsched

Post your /etc/pulse/default.pa and daemon.conf currently timer based scheduling is disabled. Remove the tsched=0 you have in your default.pa, then restart pulse

systemctl --user restart pulseaudio

. Then try to reproduce and repost the outputs.

Also if you don't want to use pulseaudio but need to change the microphone to be used, have you seen https://wiki.archlinux.org/index.php/Ad … ure_device ?

Offline

#10 2017-04-12 14:25:55

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 628

Re: Pulseaudio - sound is skipping, laggy

V1del wrote:
V1del wrote:

If you are currently using pulseaudio, remove that ~.asoundrc , reenable tsched

Post your /etc/pulse/default.pa and daemon.conf currently timer based scheduling is disabled. Remove the tsched=0 you have in your default.pa, then restart pulse

systemctl --user restart pulseaudio

. Then try to reproduce and repost the outputs.

Also if you don't want to use pulseaudio but need to change the microphone to be used, have you seen https://wiki.archlinux.org/index.php/Ad … ure_device ?

default.pa

#!/usr/bin/pulseaudio -nF
#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.

# This startup script is used only if PulseAudio is started per-user
# (i.e. not in system mode)

.fail

### Automatically restore the volume of streams and devices
load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore

### Automatically augment property information from .desktop files
### stored in /usr/share/application
load-module module-augment-properties

### Should be after module-*-restore but before module-*-detect
load-module module-switch-on-port-available

### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-sink device=dmix
#load-module module-alsa-source device=hw:1,0
#load-module module-alsa-source device=dsnoop
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
#load-module module-null-sink
#load-module module-pipe-sink

### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect tsched=0
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif

### Automatically connect sink and source if JACK server is present
.ifexists module-jackdbus-detect.so
.nofail
load-module module-jackdbus-detect channels=2
.fail
.endif

### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif

.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif

### Load several protocols
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix

### Network access (may be configured with paprefs, so leave this commented
### here if you plan to use paprefs)
#load-module module-esound-protocol-tcp
#load-module module-native-protocol-tcp
#load-module module-zeroconf-publish

### Load the RTP receiver module (also configured via paprefs, see above)
#load-module module-rtp-recv

### Load the RTP sender module (also configured via paprefs, see above)
#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 sink_properties="device.description='RTP Multicast Sink'"
#load-module module-rtp-send source=rtp.monitor

### Load additional modules from GConf settings. This can be configured with the paprefs tool.
### Please keep in mind that the modules configured by paprefs might conflict with manually
### loaded modules.
.ifexists module-gconf.so
.nofail
load-module module-gconf
.fail
.endif

### Automatically restore the default sink/source when changed by the user
### during runtime
### NOTE: This should be loaded as early as possible so that subsequent modules
### that look up the default sink/source get the right value
load-module module-default-device-restore

### Automatically move streams to the default sink if the sink they are
### connected to dies, similar for sources
load-module module-rescue-streams

### Make sure we always have a sink around, even if it is a null sink.
load-module module-always-sink

### Honour intended role device property
load-module module-intended-roles

### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle

### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
.ifexists module-console-kit.so
load-module module-console-kit
.endif
.ifexists module-systemd-login.so
load-module module-systemd-login
.endif

### Enable positioned event sounds
load-module module-position-event-sounds

### Cork music/video streams when a phone stream is active
load-module module-role-cork

### Modules to allow autoloading of filters (such as echo cancellation)
### on demand. module-filter-heuristics tries to determine what filters
### make sense, and module-filter-apply does the heavy-lifting of
### loading modules and rerouting streams.
load-module module-filter-heuristics
load-module module-filter-apply

### Make some devices default
#set-default-sink output
#set-default-source input

deamon.conf

# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.

## Configuration file for the PulseAudio daemon. See pulse-daemon.conf(5) for
## more information. Default values are commented out.  Use either ; or # for
## commenting.

; daemonize = no
; fail = yes
allow-module-loading = yes
allow-exit = yes
; use-pid-file = yes
; system-instance = no
; local-server-type = user
; enable-shm = yes
; enable-memfd = yes
; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB
; lock-memory = no
; cpu-limit = no

high-priority = yes
nice-level = -11

realtime-scheduling = yes
; realtime-priority = 5
realtime-priority = 99

; exit-idle-time = 20
exit-idle-time = 1
; scache-idle-time = 20
scache-idle-time = 1

; dl-search-path = (depends on architecture)

; load-default-script-file = yes
; default-script-file = /etc/pulse/default.pa

log-target = auto
; log-level = notice
log-level = error
; log-meta = no
; log-time = no
; log-backtrace = 0

; resample-method = speex-float-1
resample-method = speex-float-8
enable-remixing = yes
; enable-lfe-remixing = no
; lfe-crossover-freq = 0

flat-volumes = no
; flat-volumes = yes

; rlimit-fsize = -1
; rlimit-data = -1
; rlimit-stack = -1
; rlimit-core = -1
; rlimit-as = -1
; rlimit-rss = -1
; rlimit-nproc = -1
; rlimit-nofile = 256
rlimit-nofile = -1
; rlimit-memlock = -1
; rlimit-locks = -1
; rlimit-sigpending = -1
; rlimit-msgqueue = -1
; rlimit-nice = 31
rlimit-nice = -1
; rlimit-rtprio = 9
rlimit-rtprio = -1
; rlimit-rttime = 200000
rlimit-rttime = -1

default-sample-format = s16le
default-sample-rate = 44100
alternate-sample-rate = 44100
default-sample-channels = 2
default-channel-map = front-left,front-right

; default-fragments = 4
default-fragments = 6
; default-fragment-size-msec = 25
default-fragment-size-msec = 12

; enable-deferred-volume = yes
; deferred-volume-safety-margin-usec = 8000
; deferred-volume-extra-delay-usec = 0

I can disable or reenable tsched=0 but the result is the same. Sound is skipping, like being "spoken" again. Instead of for example "hello" i hear either "hhheeellooo" or "hello hello", like pausing move with holding "pause" key (stop, go, stop, go in very fast way).


I don't have usb mic. So, this does not work.

Offline

Board footer

Powered by FluxBB