Re: [Alsa-user] a mono phone interface
Ladies and Gentlemen, A few month ago I wrote about my problem with a rather old USB phone device. The device works fine on my older systems but fails on my relatively new desktop. I am doing my tests with aplay like this: aplay -v -D usb-phone -t wav /usr/share/sounds/alsa/Front_Center.wav with the attached /etc/asound.conf file. I am using CentOS systems, by now version 8 (version 7 and some earlier in qemu-kvm VM's), but the original use of the phone device is on a real centos-6 system. I originally assumed my problem was caused by the newer version of the software or by the change from i686 to x86_64 hardware. However, I now know that the device works just fine under Centos-8 and on x86_64 hardware. The problem arises in the USB hardware and the USB drivers for it. On the systems where the device works as expected the hardware driver used is uhci_hcd (which I think is actually an ehci_hcd companion), on the system where the phone device doesn't work the USB driver is xhci_hcd. On the system with xhci_hcd driver there are no other drivers available (I have not made any experiments at the UEFI level). In a VM which provides a uhci_hcd driver on the host with the xhci_hcd driver the test also fails. The centos kernel's are always relatively "old", the current centos-8 version is 4.18.0-147.5.1.el8_1. I now assume that the problem lies somewhere between the snd-usb-audio module and the uhci_hcd emulation of the xhci_hcd driver. So my question now is, what can be done to make my old, slow USB phone device work with the xhci_hcd driver? I will gladly provide more details but would need to know what could help in this case. Any advice would be appreciated. Thanks, AG -- -- Alfred Ganz alfred-ganz:at:agci.com AG Consulting(203) 624-9667 440 Prospect Street # 11 New Haven, CT 06511 -- # # Place your global alsa-lib configuration here... # @hooks [ { func load files [ "/etc/alsa/pulse-default.conf" ] errors false } ] # This is an alias for the phone pcm.usb-audio { type hw card 1 device 0 } # This creates a converting alias for the phone pcm_slave.myslave { pcm "hw:1,0" format S16_LE channels 1 rate 8000 } pcm.usb-convert { type plug slave myslave } # The short version of the same thing pcm.usb-phone { type plug slave { pcm "hw:1,0" format S16_LE channels 1 rate 8000 } } ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] a mono phone interface
Clemens, Ladies and Gentlemen, After some difficulties with the old Centos-6 system I have had a chance to play around some more with the Skype phone both under Centos-6 and under Centos-8. Here are a couple of Observations: First when I try the phone under Centos-6, where it works fine with the plugin, when I run aplay with plain -D hw:1,0 instead, I get a similar low noise output on the phone (and of similar duration as I always get under Centos-8, about 10 seconds), where the intended output is about 2 sec (voice output "Front Center"). This is not surprising, and aplay complains with: Warning: rate is not accurate (requested = 48000Hz, got = 8000Hz) which means that the 48000 sample .wav file was played without the proper conversion to 8000. However, this output seems similar to what I get *with* the plugin under Centos-8, and where aplay reports: Plug PCM: Rate conversion PCM (8000, sformat=S16_LE) It seems that under Centos-8 aplay reports that the rate conversion takes place, but in reality this may not be the case. Second observation, Centos-6 is an i686 system, Centos-8 is an x86_64 system, is it possible that that makes a difference. Note that the Centos-7 system, which I ran for only a short time, which had the same problems as Centos-8, was also an x86_64 system. So my questions after the above, how can I further investigate what happens with the requested (via the plugin) rate conversion under Centos-8, which by now I suspect doesn't take place? And, do the kernel modules snd_usb_audio and its cohorts need special parameter settings under the x86_64 Centos-8? I haven't seen anything in that respect under Centos-6. I would much appreciate some hints on what to check next. Thanks, AG -- -- Alfred Ganz alfred-ganz:at:agci.com AG Consulting(203) 624-9667 440 Prospect Street # 11 New Haven, CT 06511 -- ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] a mono phone interface
Clemens, Ladies and Gentlemen, Date: Mon, 16 Dec 2019 16:41:02 +0100 From: Clemens Ladisch via Alsa-user Subject: Re: [Alsa-user] a mono phone interface What is the output when you add -v to the aplay command line? If you still have the old Centos, is there any difference between the working and broken -v outputs? I got back to the old system and compared the -v output from Centos-6 with the one from Centos-8. A diff shows only the "boundary:" values differ: 26c26 < boundary : 6755399441055744000 --- > boundary : 1572864000 49c49 < boundary : 9007199254740992000 --- > boundary : 2097152000 with the larger values being from Centos-8. I attach the output from centos-8. Hope that helps, AG -- -- Alfred Ganz alfred-ganz:at:agci.com AG Consulting(203) 624-9667 440 Prospect Street # 11 New Haven, CT 06511 -- Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono Plug PCM: Rate conversion PCM (8000, sformat=S16_LE) Converter: linear-interpolation Protocol version: 10002 Its setup is: stream : PLAYBACK access : RW_INTERLEAVED format : S16_LE subformat: STD channels : 1 rate : 48000 exact rate : 48000 (48000/1) msbits : 16 buffer_size : 24000 period_size : 6000 period_time : 125000 tstamp_mode : NONE tstamp_type : MONOTONIC period_step : 1 avail_min: 6000 period_event : 0 start_threshold : 24000 stop_threshold : 24000 silence_threshold: 0 silence_size : 0 boundary : 6755399441055744000 Slave: Hardware PCM card 1 'USB Device 0x4b4:0x303' device 0 subdevice 0 Its setup is: stream : PLAYBACK access : MMAP_INTERLEAVED format : S16_LE subformat: STD channels : 1 rate : 8000 exact rate : 8000 (8000/1) msbits : 16 buffer_size : 4000 period_size : 1000 period_time : 125000 tstamp_mode : NONE tstamp_type : MONOTONIC period_step : 1 avail_min: 1000 period_event : 0 start_threshold : 4000 stop_threshold : 4000 silence_threshold: 0 silence_size : 0 boundary : 9007199254740992000 appl_ptr : 0 hw_ptr : 0 ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] a mono phone interface
Alfred Ganz wrote: > I have an old Skype phone that I have used under Centos-6 that I have not > been able to get to work under Centos-7 and Centos-8. I have tested it > under Centos-6 (2.6.32-754.6.3.el6.i686 #1 SMP) with: > aplay -D usb-phone -t wav /usr/share/sounds/alsa/Front_Center.wav > and it works with voice output saying "Front Center". > > When I try the same under Centos-7 (3.10.0-1062.9.1.el7.x86_64 #1 SMP) > and Centos-8 (4.18.0-80.11.2.el8_0.x86_64 #1 SMP), I get two short > rumbling segments of noise (That I suspect being the not properly > processed words from the sound file). What is the output when you add -v to the aplay command line? If you still have the old Centos, is there any difference between the working and broken -v outputs? Regards, Clemens ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] a mono phone interface
Clemens, Ladies and Gentlemen, Date: Mon, 16 Dec 2019 11:28:31 +0100 From: Clemens Ladisch via Alsa-user Subject: Re: [Alsa-user] a mono phone interface What are the capabilities of the actual hardware ("hw:1")? This is basically an old VOIP phone: Name: PhoneSkype SK-04 (still shows up on Google) Year: probably 2005 USB: 04b4:0303 Cypress Semiconductor Corp. HID interface, Audio OUT interface, Audio IN interface the Audio interfcaes use a smpling rate of 8,000 For complete information I attach the lsusb output for the device. Hope this helps, AG -- -- Alfred Ganz alfred-ganz:at:agci.com AG Consulting(203) 624-9667 440 Prospect Street # 11 New Haven, CT 06511 -- Bus 001 Device 015: ID 04b4:0303 Cypress Semiconductor Corp. Device Descriptor: bLength18 bDescriptorType 1 bcdUSB 1.00 bDeviceClass0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize064 idVendor 0x04b4 Cypress Semiconductor Corp. idProduct 0x0303 bcdDevice0.00 iManufacturer 1 (error) iProduct2 (error) iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x00cc bNumInterfaces 4 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 100mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber0 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 1 Audio bInterfaceSubClass 1 Control Device bInterfaceProtocol 0 iInterface 0 AudioControl Interface Descriptor: bLength10 bDescriptorType36 bDescriptorSubtype 1 (HEADER) bcdADC 1.00 wTotalLength 0x0034 bInCollection 2 baInterfaceNr(0)1 baInterfaceNr(1)2 AudioControl Interface Descriptor: bLength12 bDescriptorType36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 1 wTerminalType 0x0101 USB Streaming bAssocTerminal 4 bNrChannels 1 wChannelConfig 0x iChannelNames 0 iTerminal 0 AudioControl Interface Descriptor: bLength12 bDescriptorType36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 2 wTerminalType 0x0201 Microphone bAssocTerminal 3 bNrChannels 1 wChannelConfig 0x iChannelNames 0 iTerminal 0 AudioControl Interface Descriptor: bLength 9 bDescriptorType36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 3 wTerminalType 0x0301 Speaker bAssocTerminal 2 bSourceID 1 iTerminal 0 AudioControl Interface Descriptor: bLength 9 bDescriptorType36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 4 wTerminalType 0x0101 USB Streaming bAssocTerminal 1 bSourceID 2 iTerminal 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber1 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 0 iInterface 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber1 bAlternateSetting 1 bNumEndpoints 1 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 0 iInterface 0 AudioStreaming Interface Descriptor: bLength 7 bDescriptorType36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 1 bDelay 0 frames wFormatTag 0x0001 PCM AudioStreaming Interface Descriptor: bLength11 bDescriptorType
Re: [Alsa-user] a mono phone interface
Alfred Ganz wrote: > HW Params of device "usb-phone": What are the capabilities of the actual hardware ("hw:1")? Regards, Clemens ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user