Re: [Alsa-user] Re-opening an ALSA connection
On Monday 26 September 2016 10:05:04 Clemens Ladisch wrote: > > * Do you need to init the hardware parameters again? > > No. When you get -ESTRPIPE, the stream was suspended, and all you have > to do is to reinitialize it with snd_pcm_prepare() or snd_pcm_recover(). Thanks, snd_pcm_recover() worked well after s2ram. -- Bitte beachten: Diese E-Mail-Adresse wird bald auslaufen. Bitte verwenden Sie stattdessen: johan...@lorenz-ho.me . -- ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
[Alsa-user] snd_pcm_hw_params_set_buffer_size returns -EINVAL
Hello, this happens in [1]. You can also call snd_pcm_hw_params_set_buffer_size() before snd_pcm_hw_params() (that's probably better?), it always results in (- EINVAL). The google-answers did not help. Any idea? In my case, the buffer size is 256, but it also fails is I use 32768. Thanks on advance! - Johannes [1] https://github.com/zynaddsubfx/zynaddsubfx/blob/master/src/Nio/AlsaEngine.cpp#L331-L335 -- ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] TEAC CR H101DAB receiver not seen as a sound device
Bob and list; On Mon, Sep 26, 2016 at 10:03 AM, Bob Williamswrote: > On Mon, 26 Sep 2016 09:35:53 +0100 > Bob Williams wrote: > > > On Mon, 26 Sep 2016 09:16:07 +0100 > > Bob Williams wrote: > > > > > Hello, > > > > > > I have recently purchased a TEAC CR H101DAB receiver which can > > > receive USB input from my computer. My operating system is openSUSE > > > Leap 42.1 with kernel 4.1.31-30-default. I am using pulseaudio. > > > > > > YaST does not see the H101 at all, but alsamixer does. It reports > > > itself as TEAC USB AUDIO DEVICE. > > > > > [snip lsusb output] > > > > Sorry, forgot to say that alsamixer just shows a single playback > > control called 'Digital In', but the control is unresponsive. > > > > Bob > > > > Well, after fiddling around in KDE System Settings, I seem to have got > it working. :-) However, it is using Analog Stereo output. As the TEAC > device contains a DAC, I would imagine it would give better quality if > it received digital data? The other output option is Digital Stereo > (IEC958) but when I select that there is only silence. > > I am aware that there are many layers involved, eg. alsa -> pulseaudio > -> mpd, but if anyone has any suggestions, I'd be grateful. > > Bob, what connects your computer to your TEAC? A USB cable? What music player do you use? What is the output of "aplay -L" in a terminal window? -- Chris Hermansen · clhermansen "at" gmail "dot" com C'est ma façon de parler. -- ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] General question about capabilities for switches
Clemens Ladisch wrote: >In the "simple" mixer API, controls are either playback or capture. >Having both would imply that there were two independent switches. If that is the case then I do not understand the documentation which states: This document describes standard names of mixer controls. 3 Syntax: [LOCATION] SOURCE [CHANNEL] [DIRECTION] FUNCTION 4 5 DIRECTION: 6(both directions) 7 Playback 8 Capture 9 Bypass Playback 10 Bypass Capture I feel like I am missing something here. Best Regards, Ulrich Sørensen Fra: Clemens Ladisch [cladi...@googlemail.com] Sendt: 23. september 2016 15:45 Til: alsa-user@lists.sourceforge.net Emne: Re: [Alsa-user] General question about capabilities for switches Ulrich Sørensen wrote: > SOC_DOUBLE_EXT("ALC Switch", DA7213_ALC_CTRL1, DA7213_ALC_L_EN_SHIFT, >DA7213_ALC_R_EN_SHIFT, DA7213_ALC_EN_MAX, >DA7213_NO_INVERT, snd_soc_get_volsw, da7213_put_alc_sw), > > In amixer the capabilities are show as: > > Simple mixer control 'ALC',0 > Capabilities: pswitch > Playback channels: Front Left - Front Right > Mono: > Front Left: Playback [off] > Front Right: Playback [off] > > I had expected the switch to both playback and capture capabilities for > the ALC switch since it is defined as "ALC Switch" and not "ALC Playback > Switch" in the driver. In the "simple" mixer API, controls are either playback or capture. Having both would imply that there were two independent switches. Regards, Clemens -- ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user -- ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] TEAC CR H101DAB receiver not seen as a sound device
On Mon, 26 Sep 2016 09:16:07 +0100 Bob Williamswrote: > Hello, > > I have recently purchased a TEAC CR H101DAB receiver which can receive > USB input from my computer. My operating system is openSUSE Leap 42.1 > with kernel 4.1.31-30-default. I am using pulseaudio. > > YaST does not see the H101 at all, but alsamixer does. It reports > itself as TEAC USB AUDIO DEVICE. > [snip lsusb output] Sorry, forgot to say that alsamixer just shows a single playback control called 'Digital In', but the control is unresponsive. Bob -- Bob Williams System: Linux 4.1.20-11-default Distro: openSUSE 42.1 (x86_64) Desktop: KDE Frameworks: 5.21.0, Qt: 5.5.1 and Plasma: pgpFYb60X3Xmq.pgp Description: OpenPGP digital signature -- ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] General question about capabilities for switches
Ulrich Sørensen wrote: > Clemens Ladisch wrote: >> In the "simple" mixer API, controls are either playback or capture. >> Having both would imply that there were two independent switches. > > If that is the case then I do not understand the documentation That documentation describes the names of mixer controls in the kernel, which corresponds to the control interface. The simpler mixer interface is an abstraction layer on top of that. Use "amixer contents" instead of "amixer scontents" to use the control interface. Regards, Clemens -- ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] TEAC CR H101DAB receiver not seen as a sound device
Bob and list; On Mon, Sep 26, 2016 at 3:04 PM, Bob Williamswrote: > On Mon, 26 Sep 2016 11:12:32 -0700 > chris hermansen wrote: > > > Bob, what connects your computer to your TEAC? A USB cable? > > > Yes, a USB cable. I also have a sound card, but want to use the TEAC > DAC. > > > What music player do you use? > > > MPD > > > What is the output of "aplay -L" in a terminal window? > > bob@hexagon:~> aplay -L > null > Discard all samples (playback) or generate zero samples (capture) > default > Default ALSA Output (currently PulseAudio Sound Server) > sysdefault:CARD=D1 > Xonar D1, Multichannel > Default Audio Device > front:CARD=D1,DEV=0 > Xonar D1, Multichannel > Front speakers > surround21:CARD=D1,DEV=0 > Xonar D1, Multichannel > 2.1 Surround output to Front and Subwoofer speakers > surround40:CARD=D1,DEV=0 > Xonar D1, Multichannel > 4.0 Surround output to Front and Rear speakers > surround41:CARD=D1,DEV=0 > Xonar D1, Multichannel > 4.1 Surround output to Front, Rear and Subwoofer speakers > surround50:CARD=D1,DEV=0 > Xonar D1, Multichannel > 5.0 Surround output to Front, Center and Rear speakers > surround51:CARD=D1,DEV=0 > Xonar D1, Multichannel > 5.1 Surround output to Front, Center, Rear and Subwoofer speakers > surround71:CARD=D1,DEV=0 > Xonar D1, Multichannel > 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers > iec958:CARD=D1,DEV=0 > Xonar D1, Multichannel > IEC958 (S/PDIF) Digital Audio Output > sysdefault:CARD=DEVICE > TEAC USB AUDIO DEVICE, USB Audio > Default Audio Device > front:CARD=DEVICE,DEV=0 > TEAC USB AUDIO DEVICE, USB Audio > Front speakers > surround21:CARD=DEVICE,DEV=0 > TEAC USB AUDIO DEVICE, USB Audio > 2.1 Surround output to Front and Subwoofer speakers > surround40:CARD=DEVICE,DEV=0 > TEAC USB AUDIO DEVICE, USB Audio > 4.0 Surround output to Front and Rear speakers > surround41:CARD=DEVICE,DEV=0 > TEAC USB AUDIO DEVICE, USB Audio > 4.1 Surround output to Front, Rear and Subwoofer speakers > surround50:CARD=DEVICE,DEV=0 > TEAC USB AUDIO DEVICE, USB Audio > 5.0 Surround output to Front, Center and Rear speakers > surround51:CARD=DEVICE,DEV=0 > TEAC USB AUDIO DEVICE, USB Audio > 5.1 Surround output to Front, Center, Rear and Subwoofer speakers > surround71:CARD=DEVICE,DEV=0 > TEAC USB AUDIO DEVICE, USB Audio > 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers > iec958:CARD=DEVICE,DEV=0 > TEAC USB AUDIO DEVICE, USB Audio > IEC958 (S/PDIF) Digital Audio Output > > I would take this step by step. First you should use aplay to find out what works and what doesn't. Find a .wav file of representative music somewhere or create one (use soundconverter for instance). Run "aplay -l" to make sure that your TEAC card is card 1 (it looks as though it is but check) Then try playing the resulting .wav file with aplay through the TEAC, like this: aplay -D hw:1,0 mysong.wav (this will play at full volume if it works so make sure you have your volume turned way down) If that doesn't work, try aplay -D plughw:1,0 mysong.wav Assuming one or the other of those works... Second, is the TEAC dedicated to MPD's use, or will you want other programs to use it (like VLC)? Assuming it's dedicated, then I would configure MPD to talk directly to the TEAC through ALSA, especially if you have music at varying bit rates and you want to pass them through untouched. I run two music servers in my house, both with MPD and dedicated DACs. My audio output stanza in my /etc/mpd.conf looks like this: audio_output { enabled "yes" type"alsa" name"Schiit Bifrost" device "hw:2,0" mixer_type "disabled" auto_resample "no" auto_channels "no" auto_format "no" dop "no" } You would have to change the name and the device. If the aplay experiments didn't work or you don't want to dedicate, then get back to the list. -- Chris Hermansen · clhermansen "at" gmail "dot" com C'est ma façon de parler. -- ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
[Alsa-user] TEAC CR H101DAB receiver not seen as a sound device
Hello, I have recently purchased a TEAC CR H101DAB receiver which can receive USB input from my computer. My operating system is openSUSE Leap 42.1 with kernel 4.1.31-30-default. I am using pulseaudio. YaST does not see the H101 at all, but alsamixer does. It reports itself as TEAC USB AUDIO DEVICE. The output of sudo lsusb -v is: Bus 001 Device 016: ID 0644:8054 TEAC Corp. Device Descriptor: bLength18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 ? bDeviceProtocol 1 Interface Association bMaxPacketSize064 idVendor 0x0644 TEAC Corp. idProduct 0x8054 bcdDevice1.00 iManufacturer 1 TEAC iProduct2 TEAC USB AUDIO DEVICE iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 291 bNumInterfaces 3 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xc0 Self Powered MaxPower2mA Interface Association: bLength 8 bDescriptorType11 bFirstInterface 0 bInterfaceCount 2 bFunctionClass 1 Audio bFunctionSubClass 0 bFunctionProtocol 32 iFunction 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber0 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 1 Audio bInterfaceSubClass 1 Control Device bInterfaceProtocol 32 iInterface 4 TEAC USB AUDIO DEVICE AudioControl Interface Descriptor: bLength 9 bDescriptorType36 bDescriptorSubtype 1 (HEADER) bcdADC 2.00 bCategory 8 wTotalLength 72 bmControl0x00 AudioControl Interface Descriptor: bLength 8 bDescriptorType36 bDescriptorSubtype 10 (CLOCK_SOURCE) bClockID 41 bmAttributes 0x03 Internal programmable Clock bmControls 0x07 Clock Frequency Control (read/write) Clock Validity Control (read-only) bAssocTerminal 0 iClockSource0 AudioControl Interface Descriptor: bLength 8 bDescriptorType36 bDescriptorSubtype 11 (CLOCK_SELECTOR) bUnitID40 bNrInPins 1 baCSourceID( 0)41 bmControls 0x03 Clock Selector Control (read/write) iClockSelector 0 AudioControl Interface Descriptor: bLength17 bDescriptorType36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 2 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bCSourceID 40 bNrChannels 2 bmChannelConfig 0x bmControls0x iChannelNames 0 iTerminal 0 AudioControl Interface Descriptor: bLength18 bDescriptorType36 bDescriptorSubtype 6 (FEATURE_UNIT) bUnitID10 bSourceID 2 bmaControls( 0) 0x bmaControls( 1) 0x000c Volume Control (read/write) bmaControls( 2) 0x000c Volume Control (read/write) iFeature0 AudioControl Interface Descriptor: bLength12 bDescriptorType36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID20 wTerminalType 0x0602 Digital Audio Interface bAssocTerminal 0 bSourceID 10 bCSourceID 40 bmControls 0x iTerminal 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber1 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 32 iInterface 5 TEAC USB AUDIO DEVICE Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber1 bAlternateSetting 1 bNumEndpoints 2 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 32 iInterface 5 TEAC USB AUDIO
Re: [Alsa-user] arecord -d option
arecord -f dat -d 2 -D default test.wav is ok El jue, 08-09-2016 a las 18:45 -0300, José Luis Artuch escribió: > On Debian 8 I run > arecord -f dat -d 2 -D hw:0,0 test.wav > but this command never stops. > It does not work the "-d" option ?. > José Luis -- ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] Re-opening an ALSA connection
Johannes Lorenz wrote: > the C++ app I am working on uses ALSA and usually works. However, when I s2ram > my computer while an ALSA connection is active, and the computer starts again, > the connection is broken (snd_pcm_writei returns < 0). In that case, I'd like > to reopen the connection. This raises up questions: > > * Do the calls of snd_pcm_... have to match per thread? I.e. can you call > snd_pcm_open() with one thread and then call snd_pcm_close() with another > one? Is there a portable answer, i.e. one that's true for all systems? You can use one device from multiple threads, but all function calls must be serialized. > * Do you need to init the hardware parameters again? No. When you get -ESTRPIPE, the stream was suspended, and all you have to do is to reinitialize it with snd_pcm_prepare() or snd_pcm_recover(). Regards, Clemens -- ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] TEAC CR H101DAB receiver not seen as a sound device
On Mon, 26 Sep 2016 11:12:32 -0700 chris hermansenwrote: > Bob, what connects your computer to your TEAC? A USB cable? > Yes, a USB cable. I also have a sound card, but want to use the TEAC DAC. > What music player do you use? > MPD > What is the output of "aplay -L" in a terminal window? bob@hexagon:~> aplay -L null Discard all samples (playback) or generate zero samples (capture) default Default ALSA Output (currently PulseAudio Sound Server) sysdefault:CARD=D1 Xonar D1, Multichannel Default Audio Device front:CARD=D1,DEV=0 Xonar D1, Multichannel Front speakers surround21:CARD=D1,DEV=0 Xonar D1, Multichannel 2.1 Surround output to Front and Subwoofer speakers surround40:CARD=D1,DEV=0 Xonar D1, Multichannel 4.0 Surround output to Front and Rear speakers surround41:CARD=D1,DEV=0 Xonar D1, Multichannel 4.1 Surround output to Front, Rear and Subwoofer speakers surround50:CARD=D1,DEV=0 Xonar D1, Multichannel 5.0 Surround output to Front, Center and Rear speakers surround51:CARD=D1,DEV=0 Xonar D1, Multichannel 5.1 Surround output to Front, Center, Rear and Subwoofer speakers surround71:CARD=D1,DEV=0 Xonar D1, Multichannel 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers iec958:CARD=D1,DEV=0 Xonar D1, Multichannel IEC958 (S/PDIF) Digital Audio Output sysdefault:CARD=DEVICE TEAC USB AUDIO DEVICE, USB Audio Default Audio Device front:CARD=DEVICE,DEV=0 TEAC USB AUDIO DEVICE, USB Audio Front speakers surround21:CARD=DEVICE,DEV=0 TEAC USB AUDIO DEVICE, USB Audio 2.1 Surround output to Front and Subwoofer speakers surround40:CARD=DEVICE,DEV=0 TEAC USB AUDIO DEVICE, USB Audio 4.0 Surround output to Front and Rear speakers surround41:CARD=DEVICE,DEV=0 TEAC USB AUDIO DEVICE, USB Audio 4.1 Surround output to Front, Rear and Subwoofer speakers surround50:CARD=DEVICE,DEV=0 TEAC USB AUDIO DEVICE, USB Audio 5.0 Surround output to Front, Center and Rear speakers surround51:CARD=DEVICE,DEV=0 TEAC USB AUDIO DEVICE, USB Audio 5.1 Surround output to Front, Center, Rear and Subwoofer speakers surround71:CARD=DEVICE,DEV=0 TEAC USB AUDIO DEVICE, USB Audio 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers iec958:CARD=DEVICE,DEV=0 TEAC USB AUDIO DEVICE, USB Audio IEC958 (S/PDIF) Digital Audio Output -- Bob Williams System: Linux 4.1.20-11-default Distro: openSUSE 42.1 (x86_64) Desktop: KDE Frameworks: 5.21.0, Qt: 5.5.1 and Plasma: pgp83ciHUsmT6.pgp Description: OpenPGP digital signature -- ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user