Hlavní navigace

Vlákno názorů k článku PipeWire: nástupce PulseAudio se postará i o video od xolo - Pulseaudio praská při změně hlasitosti a občas nehraje...

  • Článek je starý, nové názory již nelze přidávat.
  • 22. 9. 2017 14:03

    xolo (neregistrovaný)

    Pulseaudio praská při změně hlasitosti a občas nehraje po probuzení z hibernace. K tomu navíc mplayer píše do konzole "Audio device got stuck!". Alsa to nedělala, ale firefox ani chrome už alsu nepodporuje. Děkujeme Lennartovi za vytváření problémů, kde žádné nebyly, a očekávejme nové problémy s PipeWire :-(

  • 22. 9. 2017 16:19

    dustin (neregistrovaný)

    ====
    Pulseaudio praská při změně hlasitosti...
    ====

    Zajímavé, máš k tomu nějaké bližší diagnostické podklady? Máš vyzkoušené, že na stejné verzi jádra (tedy driverů pro tvou zvukovku) to alsa nedělá? PA hýbe ovládacími prvky alsy.

    Rovněž to zaseklé audio zařízení - není to náhodou tenhle bug v pulse modulu mplayeru? http://mplayerhq.hu/pipermail/mplayer-users/2012-February/084181.html

  • 24. 9. 2017 10:29

    xolo (neregistrovaný)

    Na Debianu Jessie pulseaudio praskalo hrozně, po upgradu na Debian Stretch praská míň, ale praská. Jádrem to nebude, na obou používám větev 4.4.

    Mám USB zvukovou kartu, co vůbec nemá hardwarové ovládání hlasitosti, takže hardwarem to být nemůže.

    Na Alse bylo možné pomocí .asoundrc zapnout softwarové nastavování hlasitosti přes plugin "softvol", to nepraskalo. Případně, když se tam nenastavilo nic, tak si každý program řešil hlasitost po svém a taky to nepraskalo.

  • 24. 9. 2017 19:41

    ByCzech

    Myslím, že jste si perfektně odpověděl, kde je problém (pokud tedy umíte vyvodit závěr z podaných informací). PA je v tom (tentokrát) nevinně. :-)

  • 25. 9. 2017 9:12

    xolo (neregistrovaný)

    To jako chceš říct, že když autoři pulseaudia špatně implementují softwarové nastavení hlasitosti, tak je to chyba uživatele, protože uživatel si má koupit zvukovku s hardwarovým nastavením hlasitosti?

  • 25. 9. 2017 9:58

    ByCzech

    To jako chci říct, že nesouhlasím s tvrzením, že "když neumím nastavit softwarové ovládání hlasitosti v pulseaudio, ale v Alse jo = PA je špatný". :)

  • 24. 9. 2017 19:58

    dustin (neregistrovaný)

    Na netu jsem žádné stížnosti na praskání PA při změně hlasitosti nenašel. Lidi si stěžují na nějaké zvukové efekty při změně volume https://askubuntu.com/questions/61878/how-can-i-disable-the-popping-sound-when-adjusting-the-volume , ale to je jen hloupá funkce gnome.

    Chtělo by to trochu diagnostiky. Opravdu nemá zvukovka volume control? I USB zvukovky ji běžně mají. V amixer -c XX či alsamixer -c XX se nic takového nevypisuje?

  • 25. 9. 2017 9:10

    xolo (neregistrovaný)

    V těch USB deskriptorech je jenom input terminal a output terminal, není tam žádný feature unit na nastavení hlasitosti. Alsa nějaké mixery zobrazuje, ale změna těch mixerů nemá na hlasitost žádný vliv (vliv to začne mít pouze pokud se zapne softvol v .asoundrc).

  • 25. 9. 2017 10:31

    dustin (neregistrovaný)

    OK. Jaké konkrétní čudlíky tam ta alsa zobrazuje? Vrtá mi hlavou, kde by je vzala, pokud zařízení žádné feature units nenabízí. O jaký HW se jedná (USB ids)?

    Zkusil bych natvrdo zvednout latenci PA proměnnou PULSE_LATENCY_MSEC - viz https://forums.linuxmint.com/viewtopic.php?p=843277&sid=6e533ae4c6f9f678e57b2815e9f6af23#p843277 , https://bbs.archlinux.org/viewtopic.php?pid=1288881 (implementace https://github.com/pulseaudio/pulseaudio/blob/master/src/pulse/stream.c#L989 ) .

    Jde o to, že PA funguje tak, že zvukovku nastaví na maximální period size (tj. co nejméně interruptů) a nechá ji běžet. Data přepisuje přímo v bufferu alsího zařízení (např. u PCI zvukovky již přímo DMA buffer, pokud se používá rovnou alsí hw:XX bez nějakého pluginu). PA počítá/odhaduje aktuální pozici DMA reading pointeru voláním API alsy + používáním high-precision časovačů. Když dostane požadavek na změnu hlasitosti, přepíše ještě "nespotřebované" vzorky v bufferu, aby se změna projevila ihned. Stejným způsobem řeší požadavky na různé latence klientů - audio data z přehrávače s požadavkem latence 500ms hrne do toho bufferu, zatímco data z mplayeru s požadavkem na minimální latenci k nim dodatečně přimixovává na začátek nepřehrané části bufferu, aby to časově sedělo a mplayer měl tu minimální latenci. Není žádná sranda tohle udělat správně a včas. Musí mu sedět výpočty aktuální pozice reading pointeru, jinak to přepisuje zvukovce pod rukama a samozřejmě z toho pak leze bordel. Proto tolik závisí na alsím driveru, aby správně hlásil svou latenci/pozici reading pointeru.

    Tipuju si, že mplayer žádá o příliš malou latenci a PA na tvé zvukovce (tj. v pomocném bufferu driveru snd-usb-audio) při změně hlasitosti sahá na data audio streamu, která se už driverem v jádře kopírují do bufferu, kde modul usb-core skládá USB rámce se všemi aktuálními USB streamy pro DMA od USB kontroléru.

    Nebo je problém jinde, to by se muselo koukat do verbose logů PA.

  • 25. 9. 2017 10:59

    dustin (neregistrovaný)

    Mplayer zdá se specifickou latenci nepožaduje https://github.com/sherpya/MPlayer/blob/master/libao2/ao_pulse.c#L243 , tak to může být příliš nízký default pro daný HW. Nevím, chce to logy.

  • 25. 9. 2017 16:22

    xolo (neregistrovaný)

    To PULSE_LATENCY_MSEC na to nemá vliv, ale když jsem si s tím hrál, zjistil jsem, že to praskání při změně hlasitosti se projevuje pouze, pokud pulseaudio dělá resampling.

    Když se resampling dělá v mplayeru a do pulseaudia to jde už ve formátu shodném s formátem zvukovky, tak to nepraská. Typ resampleru na to nemá vliv, prská to při jakémkoli typu.

    Kde se v Alse vzaly ty neexistující mixery nevím, vím, že původně tam žádné nebyly, po nějakém upgradu nevím čeho se objevily (tahání s těmi mixery hlasitost nijak neměni). amixer -c0:
    Simple mixer control 'Master',0
    Capabilities: volume
    Playback channels: Front Left - Front Right
    Capture channels: Front Left - Front Right
    Limits: 0 - 255
    Front Left: 53 [21%]
    Front Right: 53 [21%]
    Simple mixer control 'PCM',0
    Capabilities: volume
    Playback channels: Front Left - Front Right
    Capture channels: Front Left - Front Right
    Limits: 0 - 255
    Front Left: 207 [81%]
    Front Right: 207 [81%]
    Simple mixer control 'Power LED',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [on]

    Karta je Creative X-Fi 041e:3042, tady je celý její popis:

    ID 041e:3042 Creative Technology, Ltd
    Device Descriptor:
    bLength 18
    bDescriptorType 1
    bcdUSB 1.10
    bDeviceClass 0 (Defined at Interface level)
    bDeviceSubClass 0
    bDeviceProtocol 0
    bMaxPacketSize0 64
    idVendor 0x041e Creative Technology, Ltd
    idProduct 0x3042
    bcdDevice 1.00
    iManufacturer 1
    iProduct 2
    iSerial 3
    bNumConfigurations 1
    Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 694
    bNumInterfaces 3
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0x80
    (Bus Powered)
    MaxPower 400mA
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 0
    bAlternateSetting 0
    bNumEndpoints 1
    bInterfaceClass 1 Audio
    bInterfaceSubClass 1 Control Device
    bInterfaceProtocol 0
    iInterface 0
    AudioControl Interface Descriptor:
    bLength 10
    bDescriptorType 36
    bDescriptorSubtype 1 (HEADER)
    bcdADC 1.00
    wTotalLength 61
    bInCollection 2
    baInterfaceNr( 0) 1
    baInterfaceNr( 1) 2
    AudioControl Interface Descriptor:
    bLength 12
    bDescriptorType 36
    bDescriptorSubtype 2 (INPUT_TERMINAL)
    bTerminalID 1
    wTerminalType 0x0101 USB Streaming
    bAssocTerminal 0
    bNrChannels 6
    wChannelConfig 0x003f
    Left Front (L)
    Right Front (R)
    Center Front (C)
    Low Freqency Enhancement (LFE)
    Left Surround (LS)
    Right Surround (RS)
    iChannelNames 0
    iTerminal 0
    AudioControl Interface Descriptor:
    bLength 9
    bDescriptorType 36
    bDescriptorSubtype 3 (OUTPUT_TERMINAL)
    bTerminalID 3
    wTerminalType 0x0301 Speaker
    bAssocTerminal 0
    bSourceID 1
    iTerminal 0
    AudioControl Interface Descriptor:
    bLength 12
    bDescriptorType 36
    bDescriptorSubtype 2 (INPUT_TERMINAL)
    bTerminalID 4
    wTerminalType 0x0603 Line Connector
    bAssocTerminal 0
    bNrChannels 2
    wChannelConfig 0x0003
    Left Front (L)
    Right Front (R)
    iChannelNames 0
    iTerminal 0
    AudioControl Interface Descriptor:
    bLength 9
    bDescriptorType 36
    bDescriptorSubtype 3 (OUTPUT_TERMINAL)
    bTerminalID 6
    wTerminalType 0x0101 USB Streaming
    bAssocTerminal 0
    bSourceID 4
    iTerminal 0
    AudioControl Interface Descriptor:
    bLength 9
    bDescriptorType 36
    bDescriptorSubtype 3 (OUTPUT_TERMINAL)
    bTerminalID 8
    wTerminalType 0x0602 Digital Audio Interface
    bAssocTerminal 0
    bSourceID 1
    iTerminal 0
    Endpoint Descriptor:
    bLength 9
    bDescriptorType 5
    bEndpointAddress 0x83 EP 3 IN
    bmAttributes 3
    Transfer Type Interrupt
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0002 1x 2 bytes
    bInterval 10
    bRefresh 0
    bSynchAddress 0
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 1
    bAlternateSetting 0
    bNumEndpoints 0
    bInterfaceClass 1 Audio
    bInterfaceSubClass 2 Streaming
    bInterfaceProtocol 0
    iInterface 0
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 1
    bAlternateSetting 1
    bNumEndpoints 2
    bInterfaceClass 1 Audio
    bInterfaceSubClass 2 Streaming
    bInterfaceProtocol 0
    iInterface 0
    AudioStreaming Interface Descriptor:
    bLength 7
    bDescriptorType 36
    bDescriptorSubtype 1 (AS_GENERAL)
    bTerminalLink 1
    bDelay 0 frames
    wFormatTag 1 PCM
    AudioStreaming Interface Descriptor:
    bLength 11
    bDescriptorType 36
    bDescriptorSubtype 2 (FORMAT_TYPE)
    bFormatType 1 (FORMAT_TYPE_I)
    bNrChannels 2
    bSubframeSize 2
    bBitResolution 16
    bSamFreqType 1 Discrete
    tSamFreq[ 0] 48000
    Endpoint Descriptor:
    bLength 9
    bDescriptorType 5
    bEndpointAddress 0x01 EP 1 OUT
    bmAttributes 5
    Transfer Type Isochronous
    Synch Type Asynchronous
    Usage Type Data
    wMaxPacketSize 0x00c4 1x 196 bytes
    bInterval 1
    bRefresh 0
    bSynchAddress 1
    AudioControl Endpoint Descriptor:
    bLength 7
    bDescriptorType 37
    bDescriptorSubtype 1 (EP_GENERAL)
    bmAttributes 0x00
    bLockDelayUnits 0 Undefined
    wLockDelay 0 Undefined
    Endpoint Descriptor:
    bLength 9
    bDescriptorType 5
    bEndpointAddress 0x81 EP 1 IN
    bmAttributes 17
    Transfer Type Isochronous
    Synch Type None
    Usage Type Feedback
    wMaxPacketSize 0x0003 1x 3 bytes
    bInterval 1
    bRefresh 5
    bSynchAddress 0
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 1
    bAlternateSetting 2
    bNumEndpoints 2
    bInterfaceClass 1 Audio
    bInterfaceSubClass 2 Streaming
    bInterfaceProtocol 0
    iInterface 0
    AudioStreaming Interface Descriptor:
    bLength 7
    bDescriptorType 36
    bDescriptorSubtype 1 (AS_GENERAL)
    bTerminalLink 1
    bDelay 0 frames
    wFormatTag 1 PCM
    AudioStreaming Interface Descriptor:
    bLength 11
    bDescriptorType 36
    bDescriptorSubtype 2 (FORMAT_TYPE)
    bFormatType 1 (FORMAT_TYPE_I)
    bNrChannels 2
    bSubframeSize 3
    bBitResolution 24
    bSamFreqType 1 Discrete
    tSamFreq[ 0] 48000
    Endpoint Descriptor:
    bLength 9
    bDescriptorType 5
    bEndpointAddress 0x01 EP 1 OUT
    bmAttributes 5
    Transfer Type Isochronous
    Synch Type Asynchronous
    Usage Type Data
    wMaxPacketSize 0x0126 1x 294 bytes
    bInterval 1
    bRefresh 0
    bSynchAddress 1
    AudioControl Endpoint Descriptor:
    bLength 7
    bDescriptorType 37
    bDescriptorSubtype 1 (EP_GENERAL)
    bmAttributes 0x00
    bLockDelayUnits 0 Undefined
    wLockDelay 0 Undefined
    Endpoint Descriptor:
    bLength 9
    bDescriptorType 5
    bEndpointAddress 0x81 EP 1 IN
    bmAttributes 17
    Transfer Type Isochronous
    Synch Type None
    Usage Type Feedback
    wMaxPacketSize 0x0003 1x 3 bytes
    bInterval 1
    bRefresh 5
    bSynchAddress 0
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 1
    bAlternateSetting 3
    bNumEndpoints 2
    bInterfaceClass 1 Audio
    bInterfaceSubClass 2 Streaming
    bInterfaceProtocol 0
    iInterface 0
    AudioStreaming Interface Descriptor:
    bLength 7
    bDescriptorType 36
    bDescriptorSubtype 1 (AS_GENERAL)
    bTerminalLink 1
    bDelay 0 frames
    wFormatTag 1 PCM
    AudioStreaming Interface Descriptor:
    bLength 11
    bDescriptorType 36
    bDescriptorSubtype 2 (FORMAT_TYPE)
    bFormatType 1 (FORMAT_TYPE_I)
    bNrChannels 6
    bSubframeSize 2
    bBitResolution 16
    bSamFreqType 1 Discrete
    tSamFreq[ 0] 48000
    Endpoint Descriptor:
    bLength 9
    bDescriptorType 5
    bEndpointAddress 0x01 EP 1 OUT
    bmAttributes 5
    Transfer Type Isochronous
    Synch Type Asynchronous
    Usage Type Data
    wMaxPacketSize 0x024c 1x 588 bytes
    bInterval 1
    bRefresh 0
    bSynchAddress 1
    AudioControl Endpoint Descriptor:
    bLength 7
    bDescriptorType 37
    bDescriptorSubtype 1 (EP_GENERAL)
    bmAttributes 0x00
    bLockDelayUnits 0 Undefined
    wLockDelay 0 Undefined
    Endpoint Descriptor:
    bLength 9
    bDescriptorType 5
    bEndpointAddress 0x81 EP 1 IN
    bmAttributes 17
    Transfer Type Isochronous
    Synch Type None
    Usage Type Feedback
    wMaxPacketSize 0x0003 1x 3 bytes
    bInterval 1
    bRefresh 5
    bSynchAddress 0
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 1
    bAlternateSetting 4
    bNumEndpoints 2
    bInterfaceClass 1 Audio
    bInterfaceSubClass 2 Streaming
    bInterfaceProtocol 0
    iInterface 0
    AudioStreaming Interface Descriptor:
    bLength 7
    bDescriptorType 36
    bDescriptorSubtype 1 (AS_GENERAL)
    bTerminalLink 1
    bDelay 0 frames
    wFormatTag 1 PCM
    AudioStreaming Interface Descriptor:
    bLength 11
    bDescriptorType 36
    bDescriptorSubtype 2 (FORMAT_TYPE)
    bFormatType 1 (FORMAT_TYPE_I)
    bNrChannels 6
    bSubframeSize 3
    bBitResolution 24
    bSamFreqType 1 Discrete
    tSamFreq[ 0] 48000
    Endpoint Descriptor:
    bLength 9
    bDescriptorType 5
    bEndpointAddress 0x01 EP 1 OUT
    bmAttributes 5
    Transfer Type Isochronous
    Synch Type Asynchronous
    Usage Type Data
    wMaxPacketSize 0x0372 1x 882 bytes
    bInterval 1
    bRefresh 0
    bSynchAddress 1
    AudioControl Endpoint Descriptor:
    bLength 7
    bDescriptorType 37
    bDescriptorSubtype 1 (EP_GENERAL)
    bmAttributes 0x00
    bLockDelayUnits 0 Undefined
    wLockDelay 0 Undefined
    Endpoint Descriptor:
    bLength 9
    bDescriptorType 5
    bEndpointAddress 0x81 EP 1 IN
    bmAttributes 17
    Transfer Type Isochronous
    Synch Type None
    Usage Type Feedback
    wMaxPacketSize 0x0003 1x 3 bytes
    bInterval 1
    bRefresh 5
    bSynchAddress 0
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 1
    bAlternateSetting 5
    bNumEndpoints 2
    bInterfaceClass 1 Audio
    bInterfaceSubClass 2 Streaming
    bInterfaceProtocol 0
    iInterface 0
    AudioStreaming Interface Descriptor:
    bLength 7
    bDescriptorType 36
    bDescriptorSubtype 1 (AS_GENERAL)
    bTerminalLink 1
    bDelay 0 frames
    wFormatTag 1 PCM
    AudioStreaming Interface Descriptor:
    bLength 11
    bDescriptorType 36
    bDescriptorSubtype 2 (FORMAT_TYPE)
    bFormatType 1 (FORMAT_TYPE_I)
    bNrChannels 2
    bSubframeSize 2
    bBitResolution 16
    bSamFreqType 1 Discrete
    tSamFreq[ 0] 96000
    Endpoint Descriptor:
    bLength 9
    bDescriptorType 5
    bEndpointAddress 0x01 EP 1 OUT
    bmAttributes 5
    Transfer Type Isochronous
    Synch Type Asynchronous
    Usage Type Data
    wMaxPacketSize 0x0184 1x 388 bytes
    bInterval 1
    bRefresh 0
    bSynchAddress 1
    AudioControl Endpoint Descriptor:
    bLength 7
    bDescriptorType 37
    bDescriptorSubtype 1 (EP_GENERAL)
    bmAttributes 0x00
    bLockDelayUnits 0 Undefined
    wLockDelay 0 Undefined
    Endpoint Descriptor:
    bLength 9
    bDescriptorType 5
    bEndpointAddress 0x81 EP 1 IN
    bmAttributes 17
    Transfer Type Isochronous
    Synch Type None
    Usage Type Feedback
    wMaxPacketSize 0x0003 1x 3 bytes
    bInterval 1
    bRefresh 5
    bSynchAddress 0
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 1
    bAlternateSetting 6
    bNumEndpoints 2
    bInterfaceClass 1 Audio
    bInterfaceSubClass 2 Streaming
    bInterfaceProtocol 0
    iInterface 0
    AudioStreaming Interface Descriptor:
    bLength 7
    bDescriptorType 36
    bDescriptorSubtype 1 (AS_GENERAL)
    bTerminalLink 1
    bDelay 0 frames
    wFormatTag 1 PCM
    AudioStreaming Interface Descriptor:
    bLength 11
    bDescriptorType 36
    bDescriptorSubtype 2 (FORMAT_TYPE)
    bFormatType 1 (FORMAT_TYPE_I)
    bNrChannels 2
    bSubframeSize 3
    bBitResolution 24
    bSamFreqType 1 Discrete
    tSamFreq[ 0] 96000
    Endpoint Descriptor:
    bLength 9
    bDescriptorType 5
    bEndpointAddress 0x01 EP 1 OUT
    bmAttributes 5
    Transfer Type Isochronous
    Synch Type Asynchronous
    Usage Type Data
    wMaxPacketSize 0x0246 1x 582 bytes
    bInterval 1
    bRefresh 0
    bSynchAddress 1
    AudioControl Endpoint Descriptor:
    bLength 7
    bDescriptorType 37
    bDescriptorSubtype 1 (EP_GENERAL)
    bmAttributes 0x00
    bLockDelayUnits 0 Undefined
    wLockDelay 0 Undefined
    Endpoint Descriptor:
    bLength 9
    bDescriptorType 5
    bEndpointAddress 0x81 EP 1 IN
    bmAttributes 17
    Transfer Type Isochronous
    Synch Type None
    Usage Type Feedback
    wMaxPacketSize 0x0003 1x 3 bytes
    bInterval 1
    bRefresh 5
    bSynchAddress 0
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 1
    bAlternateSetting 7
    bNumEndpoints 2
    bInterfaceClass 1 Audio
    bInterfaceSubClass 2 Streaming
    bInterfaceProtocol 0
    iInterface 0
    AudioStreaming Interface Descriptor:
    bLength 7
    bDescriptorType 36
    bDescriptorSubtype 1 (AS_GENERAL)
    bTerminalLink 1
    bDelay 0 frames
    wFormatTag 8193 IEC1937_AC-3
    AudioStreaming Interface Descriptor:
    bLength 11
    bDescriptorType 36
    bDescriptorSubtype 2 (FORMAT_TYPE)
    bFormatType 3 (FORMAT_TYPE_III)
    bNrChannels 2
    bSubframeSize 2
    bBitResolution 16
    bSamFreqType 1 Discrete
    tSamFreq[ 0] 44100
    Endpoint Descriptor:
    bLength 9
    bDescriptorType 5
    bEndpointAddress 0x01 EP 1 OUT
    bmAttributes 5
    Transfer Type Isochronous
    Synch Type Asynchronous
    Usage Type Data
    wMaxPacketSize 0x00b4 1x 180 bytes
    bInterval 1
    bRefresh 0
    bSynchAddress 1
    AudioControl Endpoint Descriptor:
    bLength 7
    bDescriptorType 37
    bDescriptorSubtype 1 (EP_GENERAL)
    bmAttributes 0x00
    bLockDelayUnits 0 Undefined
    wLockDelay 0 Undefined
    Endpoint Descriptor:
    bLength 9
    bDescriptorType 5
    bEndpointAddress 0x81 EP 1 IN
    bmAttributes 17
    Transfer Type Isochronous
    Synch Type None
    Usage Type Feedback
    wMaxPacketSize 0x0003 1x 3 bytes
    bInterval 1
    bRefresh 5
    bSynchAddress 0
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 1
    bAlternateSetting 8
    bNumEndpoints 2
    bInterfaceClass 1 Audio
    bInterfaceSubClass 2 Streaming
    bInterfaceProtocol 0
    iInterface 0
    AudioStreaming Interface Descriptor:
    bLength 7
    bDescriptorType 36
    bDescriptorSubtype 1 (AS_GENERAL)
    bTerminalLink 1
    bDelay 0 frames
    wFormatTag 8193 IEC1937_AC-3
    AudioStreaming Interface Descriptor:
    bLength 11
    bDescriptorType 36
    bDescriptorSubtype 2 (FORMAT_TYPE)
    bFormatType 3 (FORMAT_TYPE_III)
    bNrChannels 2
    bSubframeSize 2
    bBitResolution 16
    bSamFreqType 1 Discrete
    tSamFreq[ 0] 48000
    Endpoint Descriptor:
    bLength 9
    bDescriptorType 5
    bEndpointAddress 0x01 EP 1 OUT
    bmAttributes 5
    Transfer Type Isochronous
    Synch Type Asynchronous
    Usage Type Data
    wMaxPacketSize 0x00c4 1x 196 bytes
    bInterval 1
    bRefresh 0
    bSynchAddress 1
    AudioControl Endpoint Descriptor:
    bLength 7
    bDescriptorType 37
    bDescriptorSubtype 1 (EP_GENERAL)
    bmAttributes 0x00
    bLockDelayUnits 0 Undefined
    wLockDelay 0 Undefined
    Endpoint Descriptor:
    bLength 9
    bDescriptorType 5
    bEndpointAddress 0x81 EP 1 IN
    bmAttributes 17
    Transfer Type Isochronous
    Synch Type None
    Usage Type Feedback
    wMaxPacketSize 0x0003 1x 3 bytes
    bInterval 1
    bRefresh 5
    bSynchAddress 0
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 2
    bAlternateSetting 0
    bNumEndpoints 0
    bInterfaceClass 1 Audio
    bInterfaceSubClass 2 Streaming
    bInterfaceProtocol 0
    iInterface 0
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 2
    bAlternateSetting 1
    bNumEndpoints 1
    bInterfaceClass 1 Audio
    bInterfaceSubClass 2 Streaming
    bInterfaceProtocol 0
    iInterface 0
    AudioStreaming Interface Descriptor:
    bLength 7
    bDescriptorType 36
    bDescriptorSubtype 1 (AS_GENERAL)
    bTerminalLink 6
    bDelay 0 frames
    wFormatTag 1 PCM
    AudioStreaming Interface Descriptor:
    bLength 11
    bDescriptorType 36
    bDescriptorSubtype 2 (FORMAT_TYPE)
    bFormatType 1 (FORMAT_TYPE_I)
    bNrChannels 2
    bSubframeSize 2
    bBitResolution 16
    bSamFreqType 1 Discrete
    tSamFreq[ 0] 48000
    Endpoint Descriptor:
    bLength 9
    bDescriptorType 5
    bEndpointAddress 0x82 EP 2 IN
    bmAttributes 37
    Transfer Type Isochronous
    Synch Type Asynchronous
    Usage Type Implicit feedback Data
    wMaxPacketSize 0x00c4 1x 196 bytes
    bInterval 1
    bRefresh 0
    bSynchAddress 0
    AudioControl Endpoint Descriptor:
    bLength 7
    bDescriptorType 37
    bDescriptorSubtype 1 (EP_GENERAL)
    bmAttributes 0x00
    bLockDelayUnits 0 Undefined
    wLockDelay 0 Undefined
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 2
    bAlternateSetting 2
    bNumEndpoints 1
    bInterfaceClass 1 Audio
    bInterfaceSubClass 2 Streaming
    bInterfaceProtocol 0
    iInterface 0
    AudioStreaming Interface Descriptor:
    bLength 7
    bDescriptorType 36
    bDescriptorSubtype 1 (AS_GENERAL)
    bTerminalLink 6
    bDelay 0 frames
    wFormatTag 1 PCM
    AudioStreaming Interface Descriptor:
    bLength 11
    bDescriptorType 36
    bDescriptorSubtype 2 (FORMAT_TYPE)
    bFormatType 1 (FORMAT_TYPE_I)
    bNrChannels 2
    bSubframeSize 3
    bBitResolution 24
    bSamFreqType 1 Discrete
    tSamFreq[ 0] 48000
    Endpoint Descriptor:
    bLength 9
    bDescriptorType 5
    bEndpointAddress 0x82 EP 2 IN
    bmAttributes 37
    Transfer Type Isochronous
    Synch Type Asynchronous
    Usage Type Implicit feedback Data
    wMaxPacketSize 0x0126 1x 294 bytes
    bInterval 1
    bRefresh 0
    bSynchAddress 0
    AudioControl Endpoint Descriptor:
    bLength 7
    bDescriptorType 37
    bDescriptorSubtype 1 (EP_GENERAL)
    bmAttributes 0x00
    bLockDelayUnits 0 Undefined
    wLockDelay 0 Undefined
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 2
    bAlternateSetting 3
    bNumEndpoints 1
    bInterfaceClass 1 Audio
    bInterfaceSubClass 2 Streaming
    bInterfaceProtocol 0
    iInterface 0
    AudioStreaming Interface Descriptor:
    bLength 7
    bDescriptorType 36
    bDescriptorSubtype 1 (AS_GENERAL)
    bTerminalLink 6
    bDelay 0 frames
    wFormatTag 1 PCM
    AudioStreaming Interface Descriptor:
    bLength 11
    bDescriptorType 36
    bDescriptorSubtype 2 (FORMAT_TYPE)
    bFormatType 1 (FORMAT_TYPE_I)
    bNrChannels 2
    bSubframeSize 2
    bBitResolution 16
    bSamFreqType 1 Discrete
    tSamFreq[ 0] 96000
    Endpoint Descriptor:
    bLength 9
    bDescriptorType 5
    bEndpointAddress 0x82 EP 2 IN
    bmAttributes 37
    Transfer Type Isochronous
    Synch Type Asynchronous
    Usage Type Implicit feedback Data
    wMaxPacketSize 0x0184 1x 388 bytes
    bInterval 1
    bRefresh 0
    bSynchAddress 0
    AudioControl Endpoint Descriptor:
    bLength 7
    bDescriptorType 37
    bDescriptorSubtype 1 (EP_GENERAL)
    bmAttributes 0x00
    bLockDelayUnits 0 Undefined
    wLockDelay 0 Undefined
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 2
    bAlternateSetting 4
    bNumEndpoints 1
    bInterfaceClass 1 Audio
    bInterfaceSubClass 2 Streaming
    bInterfaceProtocol 0
    iInterface 0
    AudioStreaming Interface Descriptor:
    bLength 7
    bDescriptorType 36
    bDescriptorSubtype 1 (AS_GENERAL)
    bTerminalLink 6
    bDelay 0 frames
    wFormatTag 1 PCM
    AudioStreaming Interface Descriptor:
    bLength 11
    bDescriptorType 36
    bDescriptorSubtype 2 (FORMAT_TYPE)
    bFormatType 1 (FORMAT_TYPE_I)
    bNrChannels 2
    bSubframeSize 3
    bBitResolution 24
    bSamFreqType 1 Discrete
    tSamFreq[ 0] 96000
    Endpoint Descriptor:
    bLength 9
    bDescriptorType 5
    bEndpointAddress 0x82 EP 2 IN
    bmAttributes 37
    Transfer Type Isochronous
    Synch Type Asynchronous
    Usage Type Implicit feedback Data
    wMaxPacketSize 0x0246 1x 582 bytes
    bInterval 1
    bRefresh 0
    bSynchAddress 0
    AudioControl Endpoint Descriptor:
    bLength 7
    bDescriptorType 37
    bDescriptorSubtype 1 (EP_GENERAL)
    bmAttributes 0x00
    bLockDelayUnits 0 Undefined
    wLockDelay 0 Undefined

  • 26. 9. 2017 9:11

    dustin (neregistrovaný)

    Ty LEDky jsou tady https://github.com/torvalds/linux/blob/master/sound/usb/mixer_quirks.c#L378 . Volume si tipuji na softvol, který bývá pro karty bez master volume definovaný automaticky pro device default (ale v /usr/share/alsa jsem to nenašel). Když něco otevře default, pro zvukovku se vyrobí softvol control Master Volume. Ovšem když použiješ přímé zařízení "hw:0" (což zřejmě otevírá pulseaudio), softvol v řetězci není a nemá na to žádný vliv. To bude ono.

    Ohledně toho praskání - zkoušel jsi vypnout to časované scheduling přes tsched=0 https://askubuntu.com/a/329336 ? Pořád si myslím, že je problém v časování. Vypnutí by mohlo pomoci. Chtělo by to zapnout xrun_debug a podívat se, zda k nim nedochází https://www.kernel.org/doc/html/v4.11/sound/designs/procfile.html

  • 26. 9. 2017 18:02

    xolo (neregistrovaný)

    "load-module module-udev-detect tsched=0" nepomůže, praská to stejně. Zkusil jsem zapsat "5" do těch souborů xrun_debug v /proc, ale nic to při tom prskání nevypisuje.

    Ty mixery v alse nedělají nic ani když pulseaudio odinstaluju a hraju mplayerem na alsu. Zkoušel jsem přímo specifikovat různá zařízení (např. dmix) a stejně ty mixery nic nedělají. Něco začnou dělat až když nastavím softvol v .asoundrc.

  • 26. 9. 2017 19:56

    dustin (neregistrovaný)

    A hraješ mplayerem na zařízení "default" nebo na "hw:0"? Defaultní softvol by byl v řetězci defaultu.

    To praskání už nevím, zkus reportovat na mailinglist PA. Co si pamatuju, X-Fi (PCI i USB) bylo v alse vždycky podporované napůl, nebyla pořádná dokumentace. Ale když to v alse jede OK, poslal bych to do PA.

  • 22. 9. 2017 18:31

    niekto (neregistrovaný)

    Pouzivam uz dva-tri roky pulseaudio ako s internymi zvukovymi kartami (intel hd), tak i s usb (napr. focusrite 2i4). To vsetko aj na (casom roznych) laptopoch ktore maju v pohode aj 100d uptime (cize suspend/resume kazdy den). A vsetko funguje bez praskania, bez problemov. Radim ta teda do kategorie "PEBKAC".

  • 23. 9. 2017 15:49

    Trident (neregistrovaný)

    Takze bezny programatorsky pristup - "it works on my computer" na ktery jsem z duvodu pracovnich zkusenosti velmi alergicky.
    Pokud napisu ze neco funguje tak tim myslim full duplex audio, nahravani,preh­ravani, 24bit sampling, hw mixing pokud je, kdyz prehravam film tak muzu dat v prubehu prehrava suspend a zvuk se vzpamatuje. Je kompatibilni s power scalingem a zminede delaye. Funguje kompatibilita na oss a alsa rozhrani... Je toho hodne. A vazne pochybuji o tom ze jsi takto komplexne testoval kazdy notebook. Tohle snad delal akorat tak hw compatibility lab v SuSE nebo RH (a ten desktopy moc neresi).
    Pokud ne, tak bych urcite nenapsal "funguje".
    Minimalne intel hd zvukovky jsou v mnoha modifikacich a konfiguracich a nemuzu dat ruku do ohne za to ze jsem nemusel "ohybat" nastaveni. Z podstaty funkce by pulseaudio nemel zajimat konkretni hw protoze je mezitim alsa.

  • 23. 9. 2017 17:27

    dustin (neregistrovaný)

    ===
    Z podstaty funkce by pulseaudio nemel zajimat konkretni hw protoze je mezitim alsa.
    ===

    To by byla pravda, kdyby alsa měla veškerá API standardizované. Bohužel to ani náhodou neplatí zrovna v oblasti ovládacích prvků a specifických nastavení, na kterých PA klíčově závisí. PA je tím, kdo bez ohledu na zvukovku nabízí uživateli standardizovanou sadu ovládacích prvků - min. řízení hlasitosti, přepínání vstupů, přepínání výstupů. Jenže v alse má každá druhá zvukovka controls jinak a PA na to musí mít vlastní mapovací konfigurace https://github.com/pulseaudio/pulseaudio/tree/master/src/modules/alsa/mixer/paths https://github.com/pulseaudio/pulseaudio/tree/master/src/modules/alsa/mixer/profile-sets . Právě díky PA se v této oblasti udělalo v alse kus práce, stejně jako v opravách metod API na reportování časů, které byly v alse v tristním stavu. Teprve až se tohle v alse po pár letech bugreportů trochu vyčistilo, mělo PA šanci začít nad alsou trochu fungovat. PA používá alsu jinak než standardní alsí aplikace a příslušné funkce API sice v alse byly, ale v půlce driverů nic nedělaly nebo vracely kraviny.

  • 25. 9. 2017 11:22

    niekto (neregistrovaný)

    Ohoho, to ani nahodou nie je bezny programatorsky pristup, teda, ako pre koho ;-)

    Pointa je v tom ze ako truhlik predomnou generalizoval ze to nefunguje, ja som za seba zgeneralizoval ze to funguje. Nase prispevky maju teda zhodnu vypovednu hodnotu. Mimo ine, ako uz poznamenal dalsi komentujuci, hw ma riesit nizsia vrstva - na urovni jadra (alsa/oss) nie userspace utilita ktora ma akurat tak zjednotit API.

    Tzn. ani sa necudujem ze problemy maju hlavne pouzivatelia ktori nevedia kam co patri a teda co maju od coho cakat.

    Mimo ine, aktualny stav celkom pekne odzrkadluje steam, ktory si so sebou nosi vlastnu sadu kniznic a donedavna oficialne podporoval az jednu distribuciu. Nechut dookola opravovat rozbite koleso prejavila aj Mozilla, ktora podporu ALSA vyradila uz par verzii vzad.