"Volume element PCM has 6 channels. That's too much!" - PA doesn't support elements with more than two channels

Bug #1390474 reported by Andras Muranyi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PulseAudio
Unknown
Medium
pulseaudio (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

When connecting the Terratec PHASE26 in 16/48 mode (6 channels) I get the error "Volume element PCM has 6 channels. That's too much! I can't handle that!" and the card fails to show up in Sound Settings.
Everything is fine with 24/48 mode (2 channels).

Revision history for this message
In , Bejjamin (bejjamin) wrote :

Pulseaudio doesn't know how to handle soundcards like the RME HDSP 9652 I use (26 channels, 24bit only). I tried to alter the default.pa file since there are some soundcard specific workarounds available* but I had no success. This is pretty frustrating because pulseaudio is the standard soundsystem of most distros nowadays and the only real workaround is to remove it and use plain alsa.

I use Debian testing (Jessie/Sid) with pulseaudio 5.0.

*
http://ccrma-mail.stanford.edu/pipermail/planetccrma/2011-April/017566.html
http://ubuntuforums.org/showthread.php?t=1871685

Thanks,
Benjamin

Revision history for this message
In , Raymond (superquad-vortex2) wrote :
Revision history for this message
In , Raymond (superquad-vortex2) wrote :

you have to post pulseaudio verbose log, output of alsa-info.sh if tje multichannel profile still not work

Revision history for this message
In , Bejjamin (bejjamin) wrote :

Created attachment 107567
Pulseaudio verbose log

Revision history for this message
In , Bejjamin (bejjamin) wrote :

Created attachment 107568
alsa-info.sh output

Revision history for this message
In , Bejjamin (bejjamin) wrote :

Hi,

I only use pulseaudio 5.0 from Debian testing. If the multichannel profile has been added to the 5.0 release then I have it, otherwise I need some help on how to use it. I've attached what you asked for.

I should probably add that pulseaudio itself runs fine, but doesn't give me any audio output at all, I've checked this via hdspmixer.

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

2014-08-23 alsa: Remove four channel input profile

2014-08-01 alsa: Add a multichannel fallback mapping
2014-08-01 alsa: Allow "fallback" configuration for mappings and profiles
2014-08-01 alsa: Add "exact-channels" mapping configurability

those patches were supposed to support firewire audio which don't support mono, stereo surround40,..surround71 playback and mono,stereo4 ch capture

Revision history for this message
In , Raymond (superquad-vortex2) wrote :
Revision history for this message
In , Bejjamin (bejjamin) wrote :

Hey Raymond,

again, is the multichannel profile included in pulseaduio 5.0? It seems to me that these commits are more recent, and I don't build pulseaudio from source.

Revision history for this message
In , Tanu Kaskinen (tanuk) wrote :

Yes, the multichannel fix is newer than 5.0.

If you feel adventurous enough to install pulseaudio from source, here are steps for installing the current git version:

git clone git://anongit.freedesktop.org/pulseaudio/pulseaudio
cd pulseaudio
./bootstrap.sh
make
sudo make install
sudo ldconfig

The bootstrap.sh script will probably give you all kinds of errors, if you don't have the development tools and the headers of various dependecy libraries already installed. I think debian has some tool for installing the build dependencies, which should make it pretty painless to get everything installed, something like "apt-get build-dependencies pulseaudio". I don't know the exact command, google will help you.

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

your driver seem need to set autosync source

 1992.311070] snd_hdsp 0000:04:07.0: No AutoSync source for requested rate
[ 2007.259919] snd_hdsp 0000:04:07.0: No AutoSync source for requested rate
[ 2029.877275] snd_hdsp 0000:04:07.0: No AutoSync source for requested rate
[ 2050.904205] snd_hdsp 0000:04:07.0: No AutoSync source for requested rate
[ 2072.123263] snd_hdsp 0000:04:07.0: No AutoSync source for requested rate

Revision history for this message
In , Bejjamin (bejjamin) wrote :

That's true, I use an external autosync source with 44100hz, so that's the only possible rate. Alsa has no issues with this.

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

seem no active ports/ports

https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1381475/+attachment/4237185/+files/pulseverbose.log

Card #3
 Name: alsa_card.firewire-0x000aac0300592827
 Driver: module-alsa-card.c
 Owner Module: 8
 Properties:
  alsa.card = "0"
  alsa.card_name = "PHASE 88 Rack FW"
  alsa.long_card_name = "TerraTec Electronic Gmb PHASE 88 Rack FW (id:3, rev:1), GUID 000aac0300592827 a"
  alsa.driver_name = "snd_bebob"
  device.bus_path = "pci-0000:01:09.0"
  sysfs.path = "/devices/pci0000:00/0000:00:09.0/0000:01:09.0/fw2/fw2.0/sound/card0"
  udev.id = "firewire-0x000aac0300592827"
  device.bus = "firewire"
  device.vendor.name = "Texas Instruments"
  device.product.name = "TSB43AB22A IEEE-1394a-2000 Controller (PHY/Link) [iOHCI-Lynx]"
  device.string = "0"
  device.description = "TSB43AB22A IEEE-1394a-2000 Controller (PHY/Link) [iOHCI-Lynx]"
  module-udev-detect.discovered = "1"
  device.icon_name = "audio-card-firewire"
 Profiles:
  input:10-channels: 10 Channels Input (sinks: 0, sources: 1, priority. 10)
  output:10-channels: 10 Channels Output (sinks: 1, sources: 0, priority. 1000)
  output:10-channels+input:10-channels: 10 Channels Output + 10 Channels Input (sinks: 1, sources: 1, priority. 1010)
  off: Off (sinks: 0, sources: 0, priority. 0)
 Active Profile: output:10-channels+input:10-channels

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

why did pulseaidio still probe channels higher than channels_max ?

( 2.896| 0.000) I: [pulseaudio] alsa-util.c: Device hw:0 doesn't support sample format s16le, changed to s32le.
( 2.909| 0.012) D: [pulseaudio] alsa-mixer.c: Profile output:10-channels+input:10-channels supported.
( 2.909| 0.000) D: [pulseaudio] alsa-mixer.c: Skipping profile output:10-channels+input:12-channels - will not be able to open input:12-channels
( 2.910| 0.000) D: [pulseaudio] alsa-mixer.c: Skipping profile output:10-channels+input:14-channels - will not be able to open input:14-channels
( 2.910| 0.000) D: [pulseaudio] alsa-mixer.c: Skipping profile output:10-channels+input:16-channels - will not be able to open input:16-channels
( 2.910| 0.000) D: [pulseaudio] alsa-mixer.c: Skipping profile output:10-channels+input:18-channels - will not be able to open input:18-channels
( 2.911| 0.000) D: [pulseaudio] alsa-mixer.c: Looking at profile output:12-channels
( 2.911| 0.000) D: [pulseaudio] alsa-mixer.c: Checking for playback on 12 Channels (12-channels)
( 2.911| 0.000) D: [pulseaudio] alsa-util.c: Trying hw:0 with SND_PCM_NO_AUTO_FORMAT ...

Revision history for this message
In , Bejjamin (bejjamin) wrote :

I finally tried out the multichannel fallback patch (with the help of the Debian pulseaudio maintenance team) but it doesn't solve my problem.

I have no clue why there are no active ports or why pa probes higher channels.

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

http://colin.guthr.ie/2010/09/compiling-and-running-pulseaudio-from-git/

you can try build and run pulseaudio from git without install

and post the verbose log if it still not work

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

post the output of

aplay -v --dump-hw-params -Dhw:0,0 test.wav

arecord -v --dump-hw-params -Dhw:0,0 test.wav

Revision history for this message
In , Bejjamin (bejjamin) wrote :

---
$ arecord -v --dump-hw-params -Dhw:0,0 test.wav
Aufnahme: WAVE 'test.wav' : Unsigned 8 bit, Rate: 8000 Hz, mono
HW Params of device "hw:0,0":
--------------------
ACCESS: MMAP_NONINTERLEAVED RW_NONINTERLEAVED
FORMAT: S32_LE
SUBFORMAT: STD
SAMPLE_BITS: 32
FRAME_BITS: [448 832]
CHANNELS: [14 26]
RATE: [32000 96000]
PERIOD_TIME: (666 256000]
PERIOD_SIZE: [64 8192]
PERIOD_BYTES: [3584 851968]
PERIODS: 2
BUFFER_TIME: (1333 512000]
BUFFER_SIZE: [128 16384]
BUFFER_BYTES: [7168 1703936]
TICK_TIME: ALL
--------------------
arecord: set_params:1228: Zugriffs-Modus nicht unterstützt
--

The last message means "Access-mode not supported"

---

aplay -v --dump-hw-params -Dhw:0,0 music.wav
Wiedergabe: WAVE 'music.wav' : Signed 16 bit Little Endian, Rate: 44100 Hz, stereo
HW Params of device "hw:0,0":
--------------------
ACCESS: MMAP_NONINTERLEAVED RW_NONINTERLEAVED
FORMAT: S32_LE
SUBFORMAT: STD
SAMPLE_BITS: 32
FRAME_BITS: [448 832]
CHANNELS: [14 26]
RATE: [32000 96000]
PERIOD_TIME: (666 256000]
PERIOD_SIZE: [64 8192]
PERIOD_BYTES: [3584 851968]
PERIODS: 2
BUFFER_TIME: (1333 512000]
BUFFER_SIZE: [128 16384]
BUFFER_BYTES: [7168 1703936]
TICK_TIME: ALL
--------------------
aplay: set_params:1228: Zugriffs-Modus nicht unterstützt

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

 those pa_log_debug() should be pa_log_error() to indicate both MMAP_NONINTERLEAVED RW_NONINTERLEAVED are not supported

if (_use_mmap) {

        if (snd_pcm_hw_params_set_access(pcm_handle, hwparams, SND_PCM_ACCESS_MMAP_INTERLEAVED) < 0) {

            /* mmap() didn't work, fall back to interleaved */

            if ((ret = snd_pcm_hw_params_set_access(pcm_handle, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED)) < 0) {
                pa_log_debug("snd_pcm_hw_params_set_access() failed: %s", pa_alsa_strerror(ret));
                goto finish;
            }

            _use_mmap = false;
        }

    } else if ((ret = snd_pcm_hw_params_set_access(pcm_handle, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED)) < 0) {
        pa_log_debug("snd_pcm_hw_params_set_access() failed: %s", pa_alsa_strerror(ret));
        goto finish;
    }

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

need to test whether sound card only support non interleaved mode by using snd_pcm_hw_params_test_access instead of snd_pcm_hw_params_set_access

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=include/pcm.h;hb=HEAD

/** PCM access type */
typedef enum _snd_pcm_access {
 /** mmap access with simple interleaved channels */
 SND_PCM_ACCESS_MMAP_INTERLEAVED = 0,
 /** mmap access with simple non interleaved channels */
 SND_PCM_ACCESS_MMAP_NONINTERLEAVED,
 /** mmap access with complex placement */
 SND_PCM_ACCESS_MMAP_COMPLEX,
 /** snd_pcm_readi/snd_pcm_writei access */
 SND_PCM_ACCESS_RW_INTERLEAVED,
 /** snd_pcm_readn/snd_pcm_writen access */
 SND_PCM_ACCESS_RW_NONINTERLEAVED,
 SND_PCM_ACCESS_LAST = SND_PCM_ACCESS_RW_NONINTERLEAVED
} snd_pcm_access_t;

there are five pcm access type but pulseaudio only support two and does not report any error when the sound card does not support interleaved modes

Revision history for this message
Andras Muranyi (muranyia) wrote :
Revision history for this message
Raymond (superquad-vortex2) wrote :
Revision history for this message
Andras Muranyi (muranyia) wrote : Fwd: [Bug 1390474] Re: "Volume element PCM has 6 channels. That's too much!" with Terratec PHASE26

Kindly forwarding this bug, please express your thoughts on Launchpad.

---------- Forwarded message ----------
From: Raymond <email address hidden>
Date: Sat, Nov 8, 2014 at 4:06 PM
Subject: [Bug 1390474] Re: "Volume element PCM has 6 channels. That's too
much!" with Terratec PHASE26
To: <email address hidden>

http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/modules/alsa
/alsa-mixer.c?id=527078523815587bfd021bc1d10782403e9b3e84

send email to the author of the patch

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/1390474

Title:
  "Volume element PCM has 6 channels. That's too much!" with Terratec
  PHASE26

Status in “pulseaudio” package in Ubuntu:
  New

Bug description:
  When connecting the Terratec PHASE26 in 16/48 mode (6 channels) I get the
error "Volume element PCM has 6 channels. That's too much! I can't handle
that!" and the card fails to show up in Sound Settings.
  Everything is fine with 24/48 mode (2 channels).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1390474/+subscriptions

Revision history for this message
Raymond (superquad-vortex2) wrote : Re: "Volume element PCM has 6 channels. That's too much!" with Terratec PHASE26

this mean your usb audio have a 6 channel playbacck volume control similar to

https://bugs.freedesktop.org/show_bug.cgi?id=84983#c5

Revision history for this message
Tanu Kaskinen (tanuk) wrote :

"Kindly forwarding this bug, please express your thoughts on Launchpad."

I believe that was a direct request for me. My thoughts: it's unfortunate that PulseAudio doesn't support mixer elements with more than 2 volume channels. It would be nice if someone would fix that. Due to lack of time, I won't be that someone, at least in the short (or even medium) term.

Revision history for this message
In , pmeerw (pmeerw) wrote :

Created attachment 109516
logging when only non-interleaved PCM available

patch which adds logging if no suitable access format found; non-interleaved PCM is still unsupported

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

(In reply to Peter Meerwald from comment #21)
> Created attachment 109516 [details] [review]
> logging when only non-interleaved PCM available
>
> patch which adds logging if no suitable access format found; non-interleaved
> PCM is still unsupported

did your patch really works ?

if you want to test different accesses, you need to use test_access to find out whether the access is support before you use set_access which is destructive when error ocurrs

Revision history for this message
In , Raymond (superquad-vortex2) wrote :
Revision history for this message
In , Raymond (superquad-vortex2) wrote :

(In reply to Peter Meerwald from comment #21)
> Created attachment 109516 [details] [review]
> logging when only non-interleaved PCM available
>
> patch which adds logging if no suitable access format found; non-interleaved
> PCM is still unsupported

this is a fatal error when the interleaced access is not supported by the alsa driver the card is unusable by pulseaudio

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

Read / Write transfer

There are two versions of read / write routines. The first expects the interleaved samples at input (SND_PCM_ACCESS_RW_INTERLEAVED access method), and the second one expects non-interleaved (samples in separated buffers - SND_PCM_ACCESS_RW_NONINTERLEAVED access method) at input. There are these functions for interleaved transfers: snd_pcm_writei() snd_pcm_readi(). For non-interleaved transfers, there are these functions: snd_pcm_writen() and snd_pcm_readn().

this mean pulseaudio still need snd_pcm_writen() and snd_pcm_readn() to support SND_PCM_ACCESS_RW_NONINTERLEAVED access method

Revision history for this message
Andras Muranyi (muranyia) wrote :

> this mean your usb audio have a 6 channel playbacck volume control similar to
> https://bugs.freedesktop.org/show_bug.cgi?id=84983#c5

Does this mean that bug #936539 (Freedesktop bug 84983 on Launchpad) involves all devices with more than 2 volume channels?
In that case, shall I suggest to change the description of #936539 to something more general and mark this one as a duplicate?

Revision history for this message
Raymond (superquad-vortex2) wrote :

https://bugs.freedesktop.org/show_bug.cgi?id=84983

bug#96539

both are related to xonar sound card which have a multi channl volume control which is not supported by pulseaudio

Revision history for this message
Andras Muranyi (muranyia) wrote :

Is any sound card with multi channel volume control supported by pulseaudio?

Changed in pulseaudio (Ubuntu):
status: New → Incomplete
Revision history for this message
Andras Muranyi (muranyia) wrote :

Please tell me what to send in order to triage this bug, thanks

Revision history for this message
Raymond (superquad-vortex2) wrote :

https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1402052

seem usb audio devices build the multi volume control in the same way

so you should file an up stream pulseaudio bug report for usb audio device

have you ask Arun how to revert his patch ?

https://bugs.freedesktop.org/enter_bug.cgi?product=PulseAudio

Simple mixer control 'Speaker',0
   Capabilities: pvolume pswitch pswitch-joined penum
   Playback channels: Front Left - Front Right - Rear Left - Rear Right - Front Center - Woofer - Side Left - Side Right
   Limits: Playback 0 - 197
   Mono:
   Front Left: Playback 90 [46%] [-20.06dB] [on]
   Front Right: Playback 90 [46%] [-20.06dB] [on]
   Rear Left: Playback 90 [46%] [-20.06dB] [on]
   Rear Right: Playback 90 [46%] [-20.06dB] [on]
   Front Center: Playback 90 [46%] [-20.06dB] [on]
   Woofer: Playback 90 [46%] [-20.06dB] [on]
   Side Left: Playback 90 [46%] [-20.06dB] [on]
   Side Right: Playback 90 [46%] [-20.06dB] [on]

Revision history for this message
Andras Muranyi (muranyia) wrote :

> have you ask Arun how to revert his patch ?

No, I am just an end user so I don't feel I shall ask someone to revert their patch.
However... Arun? The patch was registered by Tanu Kaskinen and Colin Guthrie. I have forwarded this bug to them. Colin did not reply, Tanu's reply is above. https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1390474/comments/5

I would appreciate if, in case you think that is the best solution for the moment, you proposed reverting the patch to the appropriate personnel. Thanks.

Anyway, shall we triage this bug, shan't we? Otherwise it will just expire.

summary: - "Volume element PCM has 6 channels. That's too much!" with Terratec
- PHASE26
+ "Volume element PCM has 6 channels. That's too much!" - PA doesn't
+ support elements with more than two channels
Revision history for this message
Raymond (superquad-vortex2) wrote :

+ if (e->n_channels > 2) {
+ /* FIXME: In some places code like this is used:
+ *
+ * e->masks[alsa_channel_ids[p]][e->n_channels-1]
+ *
+ * The definition of e->masks is
+ *
+ * pa_channel_position_mask_t masks[SND_MIXER_SCHN_LAST][2];
+ *
+ * Since the array size is fixed at 2, we obviously
+ * don't support elements with more than two
+ * channels... */
+ pa_log_warn("Volume element %s has %u channels. That's too much! I can't handle that!", e->alsa_name, e->n_channels);
+ return -1;
+ }
+

http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/modules/alsa/alsa-mixer.c?id=527078523815587bfd021bc1d10782403e9b3e84

the answer was aleady stated in the patch

you need to change alsa-mixer.h

-pa_channel_position_mask_t masks[SND_MIXER_SCHN_LAST][2];
+pa_channel_position_mask_t masks[SND_MIXER_SCHN_LAST][8];

and

- if (e->n_channels > 2) {
+ if (e->n_channels > 8) {

Revision history for this message
Andras Muranyi (muranyia) wrote :

Thanks Raymond for the info.
I would like to get this bug ironed out in Pulseaudio not only locally.
Can we go on with triaging? Right the the bug is New. Could we eventually change to Conformed?

Revision history for this message
Andras Muranyi (muranyia) wrote :

According to comment 5

Changed in pulseaudio (Ubuntu):
status: Incomplete → Confirmed
Changed in pulseaudio:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
In , David Henningsson (diwic) wrote :

Hi benjamin,

PulseAudio 6.0 has now been released and it includes the multichannel fallback, which should have solved your issue, but apparently it has not.

Could you submit a new PulseAudio verbose log with PA 6.0? Thanks.

Revision history for this message
In , David Henningsson (diwic) wrote :

Comment on attachment 109516
logging when only non-interleaved PCM available

Review of attachment 109516:
-----------------------------------------------------------------

Well, that is a truth with modification, I believe - PulseAudio as a last resort tries to open plug:hw:* and that should auto-convert from noninterleaved to interleaved. So this should not be an issue.

Revision history for this message
In , David Henningsson (diwic) wrote :

Peter, forget the last comment. I read your patch again and it looks good, so I've pushed it now.

(This does not change the fact that we still need a new verbose log from Benjamin with PA 6.0.)

Revision history for this message
In , Bejjamin (bejjamin) wrote :

Hi,

I built PA 6 from git and got the exact same verbose output of aplay and arecord than I posted on 2014-10-27.

The apps are working though - partly. Browsers and music apps like aqualung play sounds now, but there are a lot of dropouts in the sound. Sometimes, it even plays back at the wrong speed.

I started PA, fired up a browser, played back the beginning of a youtube video and closed everything again:
http://pastebin.com/HbRc2yQF

Changed in pulseaudio:
status: Confirmed → Incomplete
Revision history for this message
In , David Henningsson (diwic) wrote :

Thanks, so in fact the card is detected now.

The crackling looks like a driver problem but I'm not sure. You could try to change this line in default.pa:

load-module module-udev-detect

to this:

load-module module-udev-detect tsched=0

...and try again.

Revision history for this message
In , Bejjamin (bejjamin) wrote :

tsched=0 !!!
That seems to do the trick! Pulseaudio 6.0 is running with every app simultaneously without a glitch! I will do more testing, but it looks perfect right now!

Thank you all!

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

refer rme9652_hw_pointer() to rme9652.c

if (!rme9652->precise_ptr)
  return (status & RME9652_buffer_id) ? period_size : 0;

if precise_ptr is not enabled by module parameter, it just return pointer value as period_size or zero, this mean time scheduling should be disabled since driver can only use two periods (impossible to rewind)

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

Created attachment 113564
add SNDRV_PCM_INFO_BATCH when precise_ptr is not enabled

rme9652 driver need to specify SNDRV_PCM_INFO_BATCH when precise_ptr is not enabled

Revision history for this message
In , David Henningsson (diwic) wrote :

Ok. So the "high channel count" part is fixed with 6.0.

The "non interleaved access" was never a problem (emulated by alsa plug layer).

Tsched=0 workarounds...should in general be fixed in ALSA rather than PulseAudio. Raymond's patch is probably correct but I'm not qualified to review it. Raymond, could you turn the patch into a proper commit (git commit -s ) and then send it upstream on the alsa-devel mailinglist (using git send-email or git format-patch)? Thanks.

Changed in pulseaudio:
status: Incomplete → Fix Released
Revision history for this message
Raymond (superquad-vortex2) wrote :
Revision history for this message
In , Bejjamin (bejjamin) wrote :

Hi,

I'm not sure if this is 100% the same issue, but my problems started again when Debian upgraded from pulseaudio 8 to 9 recently.

Even though I still use tsched=0, I hear huge amounts of clicks and pops while playing back (everything sounds like a very old vinyl recording now...). Enabling tsched makes no difference, in fact I think that it is still of even though I tried tsched=1.

I'll attach the verbose log.

Revision history for this message
In , Bejjamin (bejjamin) wrote :
Revision history for this message
In , Raymond (superquad-vortex2) wrote :

https://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=55a25246ee80aa950bf27f811c0cc176d0821a4e

pulseaudio does not support non-interlaved mode

static void check_access(snd_pcm_t *pcm_handle, snd_pcm_hw_params_t *hwparams, bool use_mmap) {
    if ((use_mmap && !snd_pcm_hw_params_test_access(pcm_handle, hwparams, SND_PCM_ACCESS_MMAP_INTERLEAVED)) ||
        !snd_pcm_hw_params_test_access(pcm_handle, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED))
        pa_log_error("Weird, PCM claims to support interleaved access, but snd_pcm_hw_params_set_access() failed.");
+

Revision history for this message
In , Bejjamin (bejjamin) wrote :

Created attachment 125150
attachment-5407-0.html

Meaning what exactly?

It worked with previous versions. And even if it doesn't work - what is the recommended step here? Remove pulseaudio?

Thanks & best regards
Benjamin

Am 19. Juli 2016 16:09:10 MESZ, schrieb <email address hidden>:
>https://bugs.freedesktop.org/show_bug.cgi?id=84804
>
>--- Comment #37 from Raymond <email address hidden> ---
>https://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=55a25246ee80aa950bf27f811c0cc176d0821a4e
>
>
>pulseaudio does not support non-interlaved mode
>
>
>static void check_access(snd_pcm_t *pcm_handle, snd_pcm_hw_params_t
>*hwparams,
>bool use_mmap) {
> if ((use_mmap && !snd_pcm_hw_params_test_access(pcm_handle, hwparams,
>SND_PCM_ACCESS_MMAP_INTERLEAVED)) ||
> !snd_pcm_hw_params_test_access(pcm_handle, hwparams,
>SND_PCM_ACCESS_RW_INTERLEAVED))
> pa_log_error("Weird, PCM claims to support interleaved access, but
>snd_pcm_hw_params_set_access() failed.");
>+
>
>--
>You are receiving this mail because:
>You reported the bug.

Revision history for this message
In , Tanu Kaskinen (tanuk) wrote :

The log shows that you're not using module-udev-detect. I don't know if that's why things stopped working, but that would anyway be the first thing to fix. Debian changed the packaging so that "pulseaudio-module-udev" is now a separate package. You have probably disabled automatic installation of recommended packages, because by default that package should get installed automatically.

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/sound/pci/rme9652/hdsp.c

static struct snd_pcm_hardware snd_hdsp_capture_subinfo =
{
 .info = (SNDRV_PCM_INFO_MMAP |
     SNDRV_PCM_INFO_MMAP_VALID |
     SNDRV_PCM_INFO_NONINTERLEAVED |
     SNDRV_PCM_INFO_SYNC_START),
#ifdef SNDRV_BIG_ENDIAN
 .formats = SNDRV_PCM_FMTBIT_S32_BE,
#else
 .formats = SNDRV_PCM_FMTBIT_S32_LE,
#endif
 .rates = (SNDRV_PCM_RATE_32000 |
     SNDRV_PCM_RATE_44100 |
     SNDRV_PCM_RATE_48000 |
     SNDRV_PCM_RATE_64000 |
     SNDRV_PCM_RATE_88200 |
     SNDRV_PCM_RATE_96000),
 .rate_min = 32000,
 .rate_max = 96000,
 .channels_min = 5,
 .channels_max = HDSP_MAX_CHANNELS,
 .buffer_bytes_max = HDSP_CHANNEL_BUFFER_BYTES * HDSP_MAX_CHANNELS,
 .period_bytes_min = (64 * 4) * 10,
 .period_bytes_max = (8192 * 4) * HDSP_MAX_CHANNELS,
 .periods_min = 2,
 .periods_max = 2,
 .fifo_size = 0
};

only support 2 periods and non-interleaved access mode

pulseaudio cannot use 4 fragments

this mean one period of channel 1 , follow by one period of channel 2 ,..., one period of channel n

seem has flag to control the precision of hw pointer

static snd_pcm_uframes_t hdsp_hw_pointer(struct hdsp *hdsp)
{
 int position;

 position = hdsp_read(hdsp, HDSP_statusRegister);

 if (!hdsp->precise_ptr)
  return (position & HDSP_BufferID) ? (hdsp->period_bytes / 4) : 0;

 position &= HDSP_BufferPositionMask;
 position /= 4;
 position &= (hdsp->period_bytes/2) - 1;
 return position;
}

Revision history for this message
In , Bejjamin (bejjamin) wrote :

(In reply to Tanu Kaskinen from comment #39)
> The log shows that you're not using module-udev-detect. I don't know if
> that's why things stopped working, but that would anyway be the first thing
> to fix. Debian changed the packaging so that "pulseaudio-module-udev" is now
> a separate package. You have probably disabled automatic installation of
> recommended packages, because by default that package should get installed
> automatically.

Thanks a lot! My system really didn't install module-udev-detect (package pulseaudio-module-udev in debian stretch/testing). Now it works again!

Changed in pulseaudio (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
In , Gitlab-migration (gitlab-migration) wrote :

-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/457.

Changed in pulseaudio:
status: Fix Released → Unknown
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.