Discussion:
Updated PortAudio package for Ubuntu (Need testers!)
(too old to reply)
Albert Santoni
2010-07-29 03:53:13 UTC
Permalink
Hello everyone,

At my request, Luke Yelavich from the Ubuntu team is updating the
PortAudio package in their repositories. From Mixxx's perspective,
this is primarily to get the ALSA deadlock-on-underrun fix out to our
users.

However, one of our Google Summer of Code students, Bill Good, has
told me that since PortAudio r1523, he gets the following ASSERT while
trying to use JACK through PortAudio:

mixxx: src/common/pa_process.c:633:
PaUtil_SetNonInterleavedOutputChannel: Assertion
`!bp->hostOutputIsInterleaved' failed.

He's also reported that JACK works fine in the previous revision, r1522.

Luke has packaged this version up for Ubuntu users, and we'd both like
as many testers as possible to ensure both ALSA and JACK are working
as expected. If anyone could please test this package on Ubuntu (with
Mixxx?) and let us know if it works, it would be greatly appreciated.

The libportaudio2 package for Maverick will be available shortly in
the following PPA:
https://launchpad.net/~ubuntu-audio-dev/+archive/ppa

Thanks to Luke for his speedy response, Bill for reporting this, the
PortAudio team for their cooperation, and our testers in advance for
being our labs rats. :)

Albert
Reid Bishop
2010-07-29 04:30:40 UTC
Permalink
This sounds like something possibly introduced when Dmitry made some changes
in r1523. I suspect this has to do with passing the host buffer pointer
directly to user space. Per the commit comments:

"optimized PA processor for case when host and user buffer match by type and
size, now host buffer pointer will be passed to user space directly,
additional copying of audio input/output data is thus avoided.

asio: apply paNonInterleaved flag on host formats for callback mode
(required for processor compatibility)."

Dmitry- any chance you might take a look at this?

-Reid-
W0CNN
CNNSDR Development

-----Original Message-----
From: portaudio-bounces at music.columbia.edu
[mailto:portaudio-bounces at music.columbia.edu] On Behalf Of Albert Santoni
Sent: Wednesday, July 28, 2010 9:53 PM
To: mixxx-devel; Portaudio Mailing List
Cc: Luke Yelavich; Bill Good
Subject: [Portaudio] Updated PortAudio package for Ubuntu (Need testers!)

Hello everyone,

At my request, Luke Yelavich from the Ubuntu team is updating the
PortAudio package in their repositories. From Mixxx's perspective,
this is primarily to get the ALSA deadlock-on-underrun fix out to our
users.

However, one of our Google Summer of Code students, Bill Good, has
told me that since PortAudio r1523, he gets the following ASSERT while
trying to use JACK through PortAudio:

mixxx: src/common/pa_process.c:633:
PaUtil_SetNonInterleavedOutputChannel: Assertion
`!bp->hostOutputIsInterleaved' failed.

He's also reported that JACK works fine in the previous revision, r1522.

Luke has packaged this version up for Ubuntu users, and we'd both like
as many testers as possible to ensure both ALSA and JACK are working
as expected. If anyone could please test this package on Ubuntu (with
Mixxx?) and let us know if it works, it would be greatly appreciated.

The libportaudio2 package for Maverick will be available shortly in
the following PPA:
https://launchpad.net/~ubuntu-audio-dev/+archive/ppa

Thanks to Luke for his speedy response, Bill for reporting this, the
PortAudio team for their cooperation, and our testers in advance for
being our labs rats. :)

Albert
Ross Bencina
2010-07-29 06:51:03 UTC
Permalink
Post by Reid Bishop
This sounds like something possibly introduced when Dmitry made some changes
in r1523. I suspect this has to do with passing the host buffer pointer
"optimized PA processor for case when host and user buffer match by type and
size, now host buffer pointer will be passed to user space directly,
additional copying of audio input/output data is thus avoided.
asio: apply paNonInterleaved flag on host formats for callback mode
(required for processor compatibility)."
Looks like Dmitry has fixed this now for JACK
http://www.portaudio.com/trac/changeset/1530

Basically we added some sanity checks to the buffer processor which now
require that the caller of PaUtil_InitializeBufferProcessor use the
paNonInterleaved sample format flag if the host buffers are non-interleaved
(previously this was implicit depending on which SetInput/OutputChannel
routine was called.

I'm not sure if this affects the CoreAudio version too

Ross
Dmitry Kostjuchenko
2010-07-29 06:36:27 UTC
Permalink
Hello Albert,

I just commited patch for Jack. The assert in fact was due to Jack working
with non-interlieved data while PA processor is now requiring to be informed
about type of data on its initialization. This is due to recent optimization
which allows some host APIs automatically expose host buffer pointers to a
user space directly thus avoiding additional copying that leads to better
performance.

Best regards,
Dmitry.

----- Original Message -----
From: "Albert Santoni" <alberts at mixxx.org>
To: "mixxx-devel" <mixxx-devel at lists.sourceforge.net>; "Portaudio Mailing
List" <portaudio at music.columbia.edu>
Cc: "Luke Yelavich" <themuso at ubuntu.com>; "Bill Good" <bkgood at gmail.com>
Sent: Thursday, July 29, 2010 6:53 AM
Subject: [Portaudio] Updated PortAudio package for Ubuntu (Need testers!)
Post by Albert Santoni
Hello everyone,
At my request, Luke Yelavich from the Ubuntu team is updating the
PortAudio package in their repositories. From Mixxx's perspective,
this is primarily to get the ALSA deadlock-on-underrun fix out to our
users.
However, one of our Google Summer of Code students, Bill Good, has
told me that since PortAudio r1523, he gets the following ASSERT while
PaUtil_SetNonInterleavedOutputChannel: Assertion
`!bp->hostOutputIsInterleaved' failed.
He's also reported that JACK works fine in the previous revision, r1522.
Luke has packaged this version up for Ubuntu users, and we'd both like
as many testers as possible to ensure both ALSA and JACK are working
as expected. If anyone could please test this package on Ubuntu (with
Mixxx?) and let us know if it works, it would be greatly appreciated.
The libportaudio2 package for Maverick will be available shortly in
https://launchpad.net/~ubuntu-audio-dev/+archive/ppa
Thanks to Luke for his speedy response, Bill for reporting this, the
PortAudio team for their cooperation, and our testers in advance for
being our labs rats. :)
Albert
_______________________________________________
Portaudio mailing list
Portaudio at music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
Albert Santoni
2010-07-29 17:48:33 UTC
Permalink
Update from Bill below:

---------- Forwarded message ----------
From: Bill Good <bkgood at gmail.com>
Date: Thu, Jul 29, 2010 at 6:38 AM
Subject: Re: Fwd: [Portaudio] Updated PortAudio package for Ubuntu
(Need testers!)
To: Albert Santoni <alberts at mixxx.org>
Cc: Luke Yelavich <themuso at ubuntu.com>
Bill, can you please test again with latest PortAudio SVN?
Jack works great, but now I'm getting a segmentation fault, also since 1523.
Relevant log and backtrace (this is 1.8):
Debug: [Main]: SoundDevicePortAudio::open() "0, HDA Intel: CONEXANT Analog
(hw:0,0)"
Debug: [Main]: m_dSampleRate 48000
Debug: [Main]: iLatencyMSec: 46
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: iFramesPerBuffer 4096
Debug: [Main]: iLatencyMSec: 46
Debug: [Main]: Opening stream with id 0
Debug: [Main]: Opened PortAudio stream successfully... starting
Debug: [Main]: Dynamically loaded PortAudio library!
[New Thread 0xa623bb70 (LWP 23858)]
Debug: [Main]: PortAudio: Started stream successfully
Debug: [Main]: iNumDevicesOpenedForOutput: 1
Debug: [Main]: iNumDevicesOpenedForInput: 0
Debug: [Main]: Qt v4.6.0 or higher detected. Using rebootMixxxView()
workaround.
? ?(See bug https://bugs.launchpad.net/mixxx/+bug/521509)
Debug: [Main]: Now in Rebootmixxview...

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xa623bb70 (LWP 23858)]
0x00000000 in ?? ()
(gdb) bt
#0 ?0x00000000 in ?? ()
#1 ?0xb54a2b64 in AdaptingOutputOnlyProcess () from /usr/lib/libportaudio.so.2
#2 ?0xb54a4468 in PaUtil_EndBufferProcessing () from /usr/lib/libportaudio.so.2
#3 ?0xb54ac561 in CallbackThreadFunc () from /usr/lib/libportaudio.so.2
#4 ?0xb53c1e60 in start_thread () from /lib/libpthread.so.0
#5 ?0xb50bf20e in clone () from /lib/libc.so.6
(gdb)

I'm not sure why I haven't run into this before now, I'll poke at it after
class. May be that I'm connecting direct to a sound card instead of default
which has its own fancy ALSA stuff going on behind the scenes.

Bill
Dmitry Kostjuchenko
2010-07-29 18:57:59 UTC
Permalink
Hi Albert,

Seg.fault was caused by the same assert which was failing in Jack case. I
did not notice that ALSA implementation was choosing non-interlieved host
format if user was asking non-interlieved. Now I found it it and applied
necessary fix: http://www.portaudio.com/trac/changeset/1531

Could you please test once again with the same configuration and report if
problem is solved.

I checked all other APIs and seems that the rest is ok with this.

Best regards,
Dmitry.

----- Original Message -----
From: "Albert Santoni" <alberts at mixxx.org>
To: "Portaudio Mailing List" <portaudio at music.columbia.edu>
Sent: Thursday, July 29, 2010 8:48 PM
Subject: [Portaudio] Fwd: Updated PortAudio package for Ubuntu
(Needtesters!)


Update from Bill below:

---------- Forwarded message ----------
From: Bill Good <bkgood at gmail.com>
Date: Thu, Jul 29, 2010 at 6:38 AM
Subject: Re: Fwd: [Portaudio] Updated PortAudio package for Ubuntu
(Need testers!)
To: Albert Santoni <alberts at mixxx.org>
Cc: Luke Yelavich <themuso at ubuntu.com>
Bill, can you please test again with latest PortAudio SVN?
Jack works great, but now I'm getting a segmentation fault, also since 1523.
Relevant log and backtrace (this is 1.8):
Debug: [Main]: SoundDevicePortAudio::open() "0, HDA Intel: CONEXANT Analog
(hw:0,0)"
Debug: [Main]: m_dSampleRate 48000
Debug: [Main]: iLatencyMSec: 46
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: iFramesPerBuffer 4096
Debug: [Main]: iLatencyMSec: 46
Debug: [Main]: Opening stream with id 0
Debug: [Main]: Opened PortAudio stream successfully... starting
Debug: [Main]: Dynamically loaded PortAudio library!
[New Thread 0xa623bb70 (LWP 23858)]
Debug: [Main]: PortAudio: Started stream successfully
Debug: [Main]: iNumDevicesOpenedForOutput: 1
Debug: [Main]: iNumDevicesOpenedForInput: 0
Debug: [Main]: Qt v4.6.0 or higher detected. Using rebootMixxxView()
workaround.
(See bug https://bugs.launchpad.net/mixxx/+bug/521509)
Debug: [Main]: Now in Rebootmixxview...

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xa623bb70 (LWP 23858)]
0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
#1 0xb54a2b64 in AdaptingOutputOnlyProcess () from
/usr/lib/libportaudio.so.2
#2 0xb54a4468 in PaUtil_EndBufferProcessing () from
/usr/lib/libportaudio.so.2
#3 0xb54ac561 in CallbackThreadFunc () from /usr/lib/libportaudio.so.2
#4 0xb53c1e60 in start_thread () from /lib/libpthread.so.0
#5 0xb50bf20e in clone () from /lib/libc.so.6
(gdb)

I'm not sure why I haven't run into this before now, I'll poke at it after
class. May be that I'm connecting direct to a sound card instead of default
which has its own fancy ALSA stuff going on behind the scenes.

Bill
Albert Santoni
2010-07-30 00:56:15 UTC
Permalink
Another update from Bill:

---------- Forwarded message ----------
From: Bill Good <bkgood at gmail.com>
Date: Thu, Jul 29, 2010 at 2:25 PM
Subject: Re: Fwd: [Portaudio] Fwd: Updated PortAudio package for
Ubuntu (Needtesters!)
To: Albert Santoni <alberts at mixxx.org>
Cc: Luke Yelavich <themuso at ubuntu.com>
Everything seems to be working with ALSA and JACK. I did have some weird ALSA
errors at low frames per buffer at 96000 Hz but I'm not sure that they're
really anything to worry about, how many people actually use 96000 Hz with
mixxx? This only happens on my "default" virtual ALSA device (which then maps
to dmix, works fine connecting directly to the audio card), and goes as far
back as I have portaudio builds, r1513 -- maybe it's a dmix problem.

Debug: [Main]: SoundDevicePortAudio::open() "8, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: latency in milliseconds: 21.3333
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 8
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c',
line: 1554
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer( &self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1768
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr, inParams,
outParams, framesPerUserBuffer, hwParamsCapture, hwParamsPlayback,
hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1811
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1929
Debug: [Main]: Error opening stream: Unanticipated host error

Bill
Dmitry Kostjuchenko
2010-07-30 10:51:33 UTC
Permalink
Hello Albert,

Ok, seems 96k sample rate triggered another bug in host buffer
calcultions. I thoroughly rewrote implementation today and hope it
will work as expected now.

To my regret I was doing this work using VirtualBoxed Ubuntu and my
audio device was limited to max. sample rate of 48k. Thus I could not
yet test 96k mode (but I hope very much new changes have fixed the
problem). Would appreciate if you test on your side. If 96k will still
be failing I will get to normal Linux machine then to make
corrections.

Regards,
Dmitry.
Post by Albert Santoni
---------- Forwarded message ----------
From: Bill Good <bkgood at gmail.com>
Date: Thu, Jul 29, 2010 at 2:25 PM
Subject: Re: Fwd: [Portaudio] Fwd: Updated PortAudio package for
Ubuntu (Needtesters!)
To: Albert Santoni <alberts at mixxx.org>
Cc: Luke Yelavich <themuso at ubuntu.com>
Everything seems to be working with ALSA and JACK. I did have some weird ALSA
errors at low frames per buffer at 96000 Hz but I'm not sure that they're
really anything to worry about, how many people actually use 96000 Hz with
mixxx? This only happens on my "default" virtual ALSA device (which then maps
to dmix, works fine connecting directly to the audio card), and goes as far
back as I have portaudio builds, r1513 -- maybe it's a dmix problem.
Debug: [Main]: SoundDevicePortAudio::open() "8, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: latency in milliseconds: 21.3333
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 8
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c',
line: 1554
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer( &self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1768
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr, inParams,
outParams, framesPerUserBuffer, hwParamsCapture, hwParamsPlayback,
hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1811
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1929
Debug: [Main]: Error opening stream: Unanticipated host error
Bill
_______________________________________________
Portaudio mailing list
Portaudio at music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
Dmitry Kostjuchenko
2010-07-30 12:57:28 UTC
Permalink
In addition to my prev. message:

I managed to test my last commit on real Ubuntu x64 and for me all works ok.
I tested sample rates: 44.1k, 48k, 96k and 192k, used different latencies,
managed to go down to 1.15ms. The device was not-mmaped and on Ubuntu x86
(in VirtualBox) mmaped. New changes seem to be working.

Awaiting for your tests to see if this issue could be closed.

Regards,
Dmitry.

----- Original Message -----
From: "Dmitry Kostjuchenko" <dmitrykos at iauxsoft.com>
To: "Portaudio Mailing List" <portaudio at music.columbia.edu>
Sent: Friday, July 30, 2010 1:51 PM
Subject: Re: [Portaudio] Fwd: Fwd: Updated PortAudio package for
Ubuntu(Needtesters!)
Post by Dmitry Kostjuchenko
Hello Albert,
Ok, seems 96k sample rate triggered another bug in host buffer
calcultions. I thoroughly rewrote implementation today and hope it
will work as expected now.
To my regret I was doing this work using VirtualBoxed Ubuntu and my
audio device was limited to max. sample rate of 48k. Thus I could not
yet test 96k mode (but I hope very much new changes have fixed the
problem). Would appreciate if you test on your side. If 96k will still
be failing I will get to normal Linux machine then to make
corrections.
Regards,
Dmitry.
Post by Albert Santoni
---------- Forwarded message ----------
From: Bill Good <bkgood at gmail.com>
Date: Thu, Jul 29, 2010 at 2:25 PM
Subject: Re: Fwd: [Portaudio] Fwd: Updated PortAudio package for
Ubuntu (Needtesters!)
To: Albert Santoni <alberts at mixxx.org>
Cc: Luke Yelavich <themuso at ubuntu.com>
Everything seems to be working with ALSA and JACK. I did have some weird ALSA
errors at low frames per buffer at 96000 Hz but I'm not sure that they're
really anything to worry about, how many people actually use 96000 Hz with
mixxx? This only happens on my "default" virtual ALSA device (which then maps
to dmix, works fine connecting directly to the audio card), and goes as far
back as I have portaudio builds, r1513 -- maybe it's a dmix problem.
Debug: [Main]: SoundDevicePortAudio::open() "8, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: latency in milliseconds: 21.3333
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 8
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in
'src/hostapi/alsa/pa_linux_alsa.c',
line: 1554
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer(
&self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1768
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr, inParams,
outParams, framesPerUserBuffer, hwParamsCapture, hwParamsPlayback,
hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1811
Expression 'PaAlsaStream_Configure( stream, inputParameters,
outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency,
&hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1929
Debug: [Main]: Error opening stream: Unanticipated host error
Bill
_______________________________________________
Portaudio mailing list
Portaudio at music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
Portaudio at music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
Bill Good
2010-08-01 23:53:56 UTC
Permalink
Dmitry Kostjuchenko dmitrykos at iauxsoft.com
Fri Jul 30 08:57:28 EDT 2010
I managed to test my last commit on real Ubuntu x64 and for me all works ok.
I tested sample rates: 44.1k, 48k, 96k and 192k, used different latencies,
managed to go down to 1.15ms. The device was not-mmaped and on Ubuntu x86
(in VirtualBox) mmaped. New changes seem to be working.
Awaiting for your tests to see if this issue could be closed.
Regards,
Dmitry.
Hi Dmitry,
I'm still encountering the error in r1532, here's a log with the errors I'm
getting, it also has the values being passed to Pa_OpenStream. Strangely, I'm
only having issues with the "default" ALSA device (connecting directly to my
sound card works at all settings), and it seems to work at 2048 frames per
buffer (~21 ms latency) 1024 frames/buffer (~10 ms) but not at any of the other
values (higher and lower) I tried.

Also -- sorry for the horrible quoting job, I didn't get this in email so I
had to paste it from the web.

Thanks for looking in to this!
Bill

Log:
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 4096
Debug: [Main]: latency in milliseconds: 42.6667
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer( &self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr, inParams,
outParams, framesPerUserBuffer, hwParamsCapture, hwParamsPlayback,
hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 2048
Debug: [Main]: latency in milliseconds: 21.3333
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Debug: [Main]: Opened PortAudio stream successfully... starting
Debug: [Main]: Dynamically loaded PortAudio library!
Debug: [Main]: PortAudio: Started stream successfully
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 1024
Debug: [Main]: latency in milliseconds: 10.6667
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Debug: [Main]: Opened PortAudio stream successfully... starting
Debug: [Main]: Dynamically loaded PortAudio library!
Debug: [Main]: PortAudio: Started stream successfully
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 512
Debug: [Main]: latency in milliseconds: 5.33333
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer( &self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr, inParams,
outParams, framesPerUserBuffer, hwParamsCapture, hwParamsPlayback,
hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 256
Debug: [Main]: latency in milliseconds: 2.66667
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer( &self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr, inParams,
outParams, framesPerUserBuffer, hwParamsCapture, hwParamsPlayback,
hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 128
Debug: [Main]: latency in milliseconds: 1.33333
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer( &self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr, inParams,
outParams, framesPerUserBuffer, hwParamsCapture, hwParamsPlayback,
hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
Dmitry Kostjuchenko
2010-08-02 06:41:51 UTC
Permalink
Hi Bill,

Ok, let's try to fix it untill we win. Is it possible if you could compile
PA library with debugging output enabled (PA_ENABLE_DEBUG_OUTPUT shall be
defined in makefile manually, or use confgure with
option --enable-debug-output) I added there some useful logging information
which also tells the type of device (mmaped, non-mmaped) and some details on
host buffer calculations. This might help me to reproduce your config. I am
so sad that ALSA is so picky...

Regards,
Dmitry.

----- Original Message -----
From: "Bill Good" <bkgood at gmail.com>
To: <portaudio at music.columbia.edu>
Sent: Monday, August 02, 2010 2:53 AM
Subject: [Portaudio] Fwd: Fwd: Updated PortAudio package
forUbuntu(Needtesters!)
Post by Bill Good
Dmitry Kostjuchenko dmitrykos at iauxsoft.com
Fri Jul 30 08:57:28 EDT 2010
I managed to test my last commit on real Ubuntu x64 and for me all works ok.
I tested sample rates: 44.1k, 48k, 96k and 192k, used different latencies,
managed to go down to 1.15ms. The device was not-mmaped and on Ubuntu x86
(in VirtualBox) mmaped. New changes seem to be working.
Awaiting for your tests to see if this issue could be closed.
Regards,
Dmitry.
Hi Dmitry,
I'm still encountering the error in r1532, here's a log with the errors I'm
getting, it also has the values being passed to Pa_OpenStream. Strangely, I'm
only having issues with the "default" ALSA device (connecting directly to my
sound card works at all settings), and it seems to work at 2048 frames per
buffer (~21 ms latency) 1024 frames/buffer (~10 ms) but not at any of the other
values (higher and lower) I tried.
Also -- sorry for the horrible quoting job, I didn't get this in email so I
had to paste it from the web.
Thanks for looking in to this!
Bill
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 4096
Debug: [Main]: latency in milliseconds: 42.6667
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in
'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer(
&self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr, inParams,
outParams, framesPerUserBuffer, hwParamsCapture, hwParamsPlayback,
hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters,
outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency,
&hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 2048
Debug: [Main]: latency in milliseconds: 21.3333
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Debug: [Main]: Opened PortAudio stream successfully... starting
Debug: [Main]: Dynamically loaded PortAudio library!
Debug: [Main]: PortAudio: Started stream successfully
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 1024
Debug: [Main]: latency in milliseconds: 10.6667
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Debug: [Main]: Opened PortAudio stream successfully... starting
Debug: [Main]: Dynamically loaded PortAudio library!
Debug: [Main]: PortAudio: Started stream successfully
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 512
Debug: [Main]: latency in milliseconds: 5.33333
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in
'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer(
&self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr, inParams,
outParams, framesPerUserBuffer, hwParamsCapture, hwParamsPlayback,
hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters,
outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency,
&hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 256
Debug: [Main]: latency in milliseconds: 2.66667
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in
'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer(
&self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr, inParams,
outParams, framesPerUserBuffer, hwParamsCapture, hwParamsPlayback,
hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters,
outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency,
&hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 128
Debug: [Main]: latency in milliseconds: 1.33333
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in
'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer(
&self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr, inParams,
outParams, framesPerUserBuffer, hwParamsCapture, hwParamsPlayback,
hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters,
outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency,
&hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
_______________________________________________
Portaudio mailing list
Portaudio at music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
Bill Good
2010-08-02 07:24:47 UTC
Permalink
Hi Dmitry,

I've got PortAudio HEAD compiled with debug output and pasted the output.
Indeed, I don't know why ALSA isn't cooperating here. At least it's better
than Linux 8 years ago, with everyone using OSS and the esound daemon :) Let
me know if there's any other way I can be of help (do you need output for more
than one user frames-per-buffer size? Attached is 512/~5ms).

Regards,
Bill

Debug: [Main]: SoundDevicePortAudio::open() "8, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: iLatencyMSec: 5
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: iFramesPerBuffer 512
Debug: [Main]: iLatencyMSec: 5
Debug: [Main]: Opening stream with id 8
Debug: [Main]: m_pStream 0x0
Debug: [Main]: pOutputParams:
Debug: [Main]: device: 8 channelCount: 2 sampleFormat 1 suggestedLatency 0.005
Debug: [Main]: sample rate: 96000
Debug: [Main]: frames per buffer: 512
Debug: [Main]: calback: true
AlsaOpen: Opening device default
PaAlsaStreamComponent_InitialConfigure: device MMAP
SND_PCM_ACCESS_MMAP_INTERLEAVED: YES
PaAlsaStreamComponent_InitialConfigure: device MMAP
SND_PCM_ACCESS_MMAP_NONINTERLEAVED: YES
PaAlsaStreamComponent_InitialConfigure: device can MMAP: YES
PaAlsaStreamComponent_DetermineFramesPerBuffer: user-buffer (frames) =
512
PaAlsaStreamComponent_DetermineFramesPerBuffer: user-buffer (sec) =
0.005333
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested latency (sec)
= 0.005000
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested host buffer (frames) =
1024
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested host buffer (sec) =
0.010667
PaAlsaStreamComponent_DetermineFramesPerBuffer: periods min = 2, max = 8, req =
4
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested host buffer period =
512
PaAlsaStreamComponent_DetermineFramesPerBuffer: The determined period size
(512) is less than minimum (2047)
PaAlsaStreamComponent_DetermineFramesPerBuffer: device period minimum
= 2047
PaAlsaStreamComponent_DetermineFramesPerBuffer: device period maximum
= 2049
PaAlsaStreamComponent_DetermineFramesPerBuffer: host buffer period =
2047
PaAlsaStreamComponent_DetermineFramesPerBuffer: host buffer period latency =
0.021323
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Host error description: Invalid argument
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer( &self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr, inParams,
outParams, framesPerUserBuffer, hwParamsCapture, hwParamsPlayback,
hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
OpenStream: Stream in error, terminating
Debug: [Main]: Error opening stream: Unanticipated host error
Post by Dmitry Kostjuchenko
Hi Bill,
Ok, let's try to fix it untill we win. Is it possible if you could compile
PA library with debugging output enabled (PA_ENABLE_DEBUG_OUTPUT shall be
defined in makefile manually, or use confgure with
option --enable-debug-output) I added there some useful logging information
which also tells the type of device (mmaped, non-mmaped) and some details
on host buffer calculations. This might help me to reproduce your config.
I am so sad that ALSA is so picky...
Regards,
Dmitry.
----- Original Message -----
From: "Bill Good" <bkgood at gmail.com>
To: <portaudio at music.columbia.edu>
Sent: Monday, August 02, 2010 2:53 AM
Subject: [Portaudio] Fwd: Fwd: Updated PortAudio package
forUbuntu(Needtesters!)
Post by Bill Good
Dmitry Kostjuchenko dmitrykos at iauxsoft.com
Fri Jul 30 08:57:28 EDT 2010
I managed to test my last commit on real Ubuntu x64 and for me all works ok.
I tested sample rates: 44.1k, 48k, 96k and 192k, used different latencies,
managed to go down to 1.15ms. The device was not-mmaped and on Ubuntu
x86 (in VirtualBox) mmaped. New changes seem to be working.
Awaiting for your tests to see if this issue could be closed.
Regards,
Dmitry.
Hi Dmitry,
I'm still encountering the error in r1532, here's a log with the errors I'm
getting, it also has the values being passed to Pa_OpenStream. Strangely, I'm
only having issues with the "default" ALSA device (connecting directly to my
sound card works at all settings), and it seems to work at 2048 frames
per buffer (~21 ms latency) 1024 frames/buffer (~10 ms) but not at any
of the other
values (higher and lower) I tried.
Also -- sorry for the horrible quoting job, I didn't get this in email so I
had to paste it from the web.
Thanks for looking in to this!
Bill
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 4096
Debug: [Main]: latency in milliseconds: 42.6667
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in
'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer(
&self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr,
inParams, outParams, framesPerUserBuffer, hwParamsCapture,
hwParamsPlayback, hostBufferSizeMode )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters,
outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency,
&hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 2048
Debug: [Main]: latency in milliseconds: 21.3333
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Debug: [Main]: Opened PortAudio stream successfully... starting
Debug: [Main]: Dynamically loaded PortAudio library!
Debug: [Main]: PortAudio: Started stream successfully
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 1024
Debug: [Main]: latency in milliseconds: 10.6667
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Debug: [Main]: Opened PortAudio stream successfully... starting
Debug: [Main]: Dynamically loaded PortAudio library!
Debug: [Main]: PortAudio: Started stream successfully
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 512
Debug: [Main]: latency in milliseconds: 5.33333
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in
'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer(
&self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr,
inParams, outParams, framesPerUserBuffer, hwParamsCapture,
hwParamsPlayback, hostBufferSizeMode )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters,
outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency,
&hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 256
Debug: [Main]: latency in milliseconds: 2.66667
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in
'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer(
&self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr,
inParams, outParams, framesPerUserBuffer, hwParamsCapture,
hwParamsPlayback, hostBufferSizeMode )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters,
outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency,
&hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 128
Debug: [Main]: latency in milliseconds: 1.33333
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in
'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer(
&self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr,
inParams, outParams, framesPerUserBuffer, hwParamsCapture,
hwParamsPlayback, hostBufferSizeMode )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters,
outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency,
&hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
_______________________________________________
Portaudio mailing list
Portaudio at music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
Portaudio at music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
Dmitry Kostjuchenko
2010-08-02 08:07:54 UTC
Permalink
Hi Bill,

Thanks for a quick log! It helps. These 3 lines are telling us about
this behavior:
PaAlsaStreamComponent_DetermineFramesPerBuffer: The determined period
size (512) is less than minimum (2047)
PaAlsaStreamComponent_DetermineFramesPerBuffer: device period minimum = 2047
PaAlsaStreamComponent_DetermineFramesPerBuffer: device period maximum = 2049

It seems that in your case ALSA has fixed period size of 2048 and it
is really strange that our try to set min. (2047) fails. It looks like
a bug from ALSA side not ours but I will try to do something with
that.

Regards,
Dmitry.
Post by Bill Good
Hi Dmitry,
I've got PortAudio HEAD compiled with debug output and pasted the output.
Indeed, I don't know why ALSA isn't cooperating here. At least it's better
than Linux 8 years ago, with everyone using OSS and the esound daemon :) Let
me know if there's any other way I can be of help (do you need output for more
than one user frames-per-buffer size? Attached is 512/~5ms).
Regards,
Bill
Debug: [Main]: SoundDevicePortAudio::open() "8, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: iLatencyMSec: 5
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: iFramesPerBuffer 512
Debug: [Main]: iLatencyMSec: 5
Debug: [Main]: Opening stream with id 8
Debug: [Main]: m_pStream 0x0
Debug: [Main]: device: 8 channelCount: 2 sampleFormat 1 suggestedLatency 0.005
Debug: [Main]: sample rate: 96000
Debug: [Main]: frames per buffer: 512
Debug: [Main]: calback: true
AlsaOpen: Opening device default
PaAlsaStreamComponent_InitialConfigure: device MMAP
SND_PCM_ACCESS_MMAP_INTERLEAVED: YES
PaAlsaStreamComponent_InitialConfigure: device MMAP
SND_PCM_ACCESS_MMAP_NONINTERLEAVED: YES
PaAlsaStreamComponent_InitialConfigure: device can MMAP: YES
PaAlsaStreamComponent_DetermineFramesPerBuffer: user-buffer (frames) ? ? ? ? ? =
512
PaAlsaStreamComponent_DetermineFramesPerBuffer: user-buffer (sec) ? ? ? ? ? ? ?=
0.005333
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested latency (sec)
= 0.005000
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested host buffer (frames) =
1024
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested host buffer (sec) ? ?=
0.010667
PaAlsaStreamComponent_DetermineFramesPerBuffer: periods min = 2, max = 8, req =
4
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested host buffer period ? =
512
PaAlsaStreamComponent_DetermineFramesPerBuffer: The determined period size
(512) is less than minimum (2047)
PaAlsaStreamComponent_DetermineFramesPerBuffer: device period minimum
= 2047
PaAlsaStreamComponent_DetermineFramesPerBuffer: device period maximum
= 2049
PaAlsaStreamComponent_DetermineFramesPerBuffer: host buffer period ? ? ? ? ? ? =
2047
PaAlsaStreamComponent_DetermineFramesPerBuffer: host buffer period latency ? ? =
0.021323
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Host error description: Invalid argument
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer( &self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr, inParams,
outParams, framesPerUserBuffer, hwParamsCapture, hwParamsPlayback,
hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
OpenStream: Stream in error, terminating
Debug: [Main]: Error opening stream: Unanticipated host error
Post by Dmitry Kostjuchenko
Hi Bill,
Ok, let's try to fix it untill we win. Is it possible if you could compile
PA library with debugging output enabled (PA_ENABLE_DEBUG_OUTPUT shall be
defined in makefile manually, or use confgure with
option --enable-debug-output) I added there some useful logging information
which also tells the type of device (mmaped, non-mmaped) and some details
on host buffer calculations. This might help me to reproduce your config.
I am so sad that ALSA is so picky...
Regards,
Dmitry.
----- Original Message -----
From: "Bill Good" <bkgood at gmail.com>
To: <portaudio at music.columbia.edu>
Sent: Monday, August 02, 2010 2:53 AM
Subject: [Portaudio] Fwd: Fwd: Updated PortAudio package
forUbuntu(Needtesters!)
Post by Bill Good
Dmitry Kostjuchenko dmitrykos at iauxsoft.com
Fri Jul 30 08:57:28 EDT 2010
I managed to test my last commit on real Ubuntu x64 and for me all works ok.
I tested sample rates: 44.1k, 48k, 96k and 192k, used different latencies,
managed to go down to 1.15ms. The device was not-mmaped and on Ubuntu
x86 (in VirtualBox) mmaped. New changes seem to be working.
Awaiting for your tests to see if this issue could be closed.
Regards,
Dmitry.
Hi Dmitry,
I'm still encountering the error in r1532, here's a log with the errors I'm
getting, it also has the values being passed to Pa_OpenStream. Strangely, I'm
only having issues with the "default" ALSA device (connecting directly to my
sound card works at all settings), and it seems to work at 2048 frames
per buffer (~21 ms latency) 1024 frames/buffer (~10 ms) but not at any
of the other
values (higher and lower) I tried.
Also -- sorry for the horrible quoting job, I didn't get this in email so I
had to paste it from the web.
Thanks for looking in to this!
Bill
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 4096
Debug: [Main]: latency in milliseconds: 42.6667
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in
'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer(
&self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr,
inParams, outParams, framesPerUserBuffer, hwParamsCapture,
hwParamsPlayback, hostBufferSizeMode )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency,
&hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 2048
Debug: [Main]: latency in milliseconds: 21.3333
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Debug: [Main]: Opened PortAudio stream successfully... starting
Debug: [Main]: Dynamically loaded PortAudio library!
Debug: [Main]: PortAudio: Started stream successfully
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 1024
Debug: [Main]: latency in milliseconds: 10.6667
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Debug: [Main]: Opened PortAudio stream successfully... starting
Debug: [Main]: Dynamically loaded PortAudio library!
Debug: [Main]: PortAudio: Started stream successfully
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 512
Debug: [Main]: latency in milliseconds: 5.33333
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in
'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer(
&self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr,
inParams, outParams, framesPerUserBuffer, hwParamsCapture,
hwParamsPlayback, hostBufferSizeMode )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency,
&hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 256
Debug: [Main]: latency in milliseconds: 2.66667
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in
'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer(
&self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr,
inParams, outParams, framesPerUserBuffer, hwParamsCapture,
hwParamsPlayback, hostBufferSizeMode )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency,
&hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 128
Debug: [Main]: latency in milliseconds: 1.33333
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in
'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer(
&self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr,
inParams, outParams, framesPerUserBuffer, hwParamsCapture,
hwParamsPlayback, hostBufferSizeMode )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency,
&hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
_______________________________________________
Portaudio mailing list
Portaudio at music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
Portaudio at music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
Portaudio at music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
Dmitry Kostjuchenko
2010-08-02 11:58:37 UTC
Permalink
Bill,

I've just commited a patch which shall fix the problem I guess in such
specific situation you showed. Let me know how it works for you now.

Regards,
Dmitry.
Post by Dmitry Kostjuchenko
Hi Bill,
Thanks for a quick log! It helps. These 3 lines are telling us about
PaAlsaStreamComponent_DetermineFramesPerBuffer: The determined period
size (512) is less than minimum (2047)
PaAlsaStreamComponent_DetermineFramesPerBuffer: device period minimum = 2047
PaAlsaStreamComponent_DetermineFramesPerBuffer: device period maximum = 2049
It seems that in your case ALSA has fixed period size of 2048 and it
is really strange that our try to set min. (2047) fails. It looks like
a bug from ALSA side not ours but I will try to do something with
that.
Regards,
Dmitry.
Post by Bill Good
Hi Dmitry,
I've got PortAudio HEAD compiled with debug output and pasted the output.
Indeed, I don't know why ALSA isn't cooperating here. At least it's better
than Linux 8 years ago, with everyone using OSS and the esound daemon :) Let
me know if there's any other way I can be of help (do you need output for more
than one user frames-per-buffer size? Attached is 512/~5ms).
Regards,
Bill
Debug: [Main]: SoundDevicePortAudio::open() "8, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: iLatencyMSec: 5
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: iFramesPerBuffer 512
Debug: [Main]: iLatencyMSec: 5
Debug: [Main]: Opening stream with id 8
Debug: [Main]: m_pStream 0x0
Debug: [Main]: device: 8 channelCount: 2 sampleFormat 1 suggestedLatency 0.005
Debug: [Main]: sample rate: 96000
Debug: [Main]: frames per buffer: 512
Debug: [Main]: calback: true
AlsaOpen: Opening device default
PaAlsaStreamComponent_InitialConfigure: device MMAP
SND_PCM_ACCESS_MMAP_INTERLEAVED: YES
PaAlsaStreamComponent_InitialConfigure: device MMAP
SND_PCM_ACCESS_MMAP_NONINTERLEAVED: YES
PaAlsaStreamComponent_InitialConfigure: device can MMAP: YES
PaAlsaStreamComponent_DetermineFramesPerBuffer: user-buffer (frames) ? ? ? ? ? =
512
PaAlsaStreamComponent_DetermineFramesPerBuffer: user-buffer (sec) ? ? ? ? ? ? ?=
0.005333
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested latency (sec)
= 0.005000
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested host buffer (frames) =
1024
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested host buffer (sec) ? ?=
0.010667
PaAlsaStreamComponent_DetermineFramesPerBuffer: periods min = 2, max = 8, req =
4
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested host buffer period ? =
512
PaAlsaStreamComponent_DetermineFramesPerBuffer: The determined period size
(512) is less than minimum (2047)
PaAlsaStreamComponent_DetermineFramesPerBuffer: device period minimum = 2047
PaAlsaStreamComponent_DetermineFramesPerBuffer: device period maximum = 2049
PaAlsaStreamComponent_DetermineFramesPerBuffer: host buffer period ? ? ? ? ? ? =
2047
PaAlsaStreamComponent_DetermineFramesPerBuffer: host buffer period latency ? ? =
0.021323
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Host error description: Invalid argument
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer( &self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr, inParams,
outParams, framesPerUserBuffer, hwParamsCapture, hwParamsPlayback,
hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
OpenStream: Stream in error, terminating
Debug: [Main]: Error opening stream: Unanticipated host error
Post by Dmitry Kostjuchenko
Hi Bill,
Ok, let's try to fix it untill we win. Is it possible if you could compile
PA library with debugging output enabled (PA_ENABLE_DEBUG_OUTPUT shall be
defined in makefile manually, or use confgure with
option --enable-debug-output) I added there some useful logging information
which also tells the type of device (mmaped, non-mmaped) and some details
on host buffer calculations. This might help me to reproduce your config.
I am so sad that ALSA is so picky...
Regards,
Dmitry.
----- Original Message -----
From: "Bill Good" <bkgood at gmail.com>
To: <portaudio at music.columbia.edu>
Sent: Monday, August 02, 2010 2:53 AM
Subject: [Portaudio] Fwd: Fwd: Updated PortAudio package
forUbuntu(Needtesters!)
Post by Bill Good
Dmitry Kostjuchenko dmitrykos at iauxsoft.com
Fri Jul 30 08:57:28 EDT 2010
I managed to test my last commit on real Ubuntu x64 and for me all works ok.
I tested sample rates: 44.1k, 48k, 96k and 192k, used different latencies,
managed to go down to 1.15ms. The device was not-mmaped and on Ubuntu
x86 (in VirtualBox) mmaped. New changes seem to be working.
Awaiting for your tests to see if this issue could be closed.
Regards,
Dmitry.
Hi Dmitry,
I'm still encountering the error in r1532, here's a log with the errors I'm
getting, it also has the values being passed to Pa_OpenStream. Strangely, I'm
only having issues with the "default" ALSA device (connecting directly to my
sound card works at all settings), and it seems to work at 2048 frames
per buffer (~21 ms latency) 1024 frames/buffer (~10 ms) but not at any
of the other
values (higher and lower) I tried.
Also -- sorry for the horrible quoting job, I didn't get this in email so I
had to paste it from the web.
Thanks for looking in to this!
Bill
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 4096
Debug: [Main]: latency in milliseconds: 42.6667
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in
'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer( &self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr,
inParams, outParams, framesPerUserBuffer, hwParamsCapture,
hwParamsPlayback, hostBufferSizeMode )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 2048
Debug: [Main]: latency in milliseconds: 21.3333
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Debug: [Main]: Opened PortAudio stream successfully... starting
Debug: [Main]: Dynamically loaded PortAudio library!
Debug: [Main]: PortAudio: Started stream successfully
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 1024
Debug: [Main]: latency in milliseconds: 10.6667
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Debug: [Main]: Opened PortAudio stream successfully... starting
Debug: [Main]: Dynamically loaded PortAudio library!
Debug: [Main]: PortAudio: Started stream successfully
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 512
Debug: [Main]: latency in milliseconds: 5.33333
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in
'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer( &self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr,
inParams, outParams, framesPerUserBuffer, hwParamsCapture,
hwParamsPlayback, hostBufferSizeMode )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 256
Debug: [Main]: latency in milliseconds: 2.66667
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in
'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer( &self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr,
inParams, outParams, framesPerUserBuffer, hwParamsCapture,
hwParamsPlayback, hostBufferSizeMode )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 128
Debug: [Main]: latency in milliseconds: 1.33333
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in
'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer( &self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr,
inParams, outParams, framesPerUserBuffer, hwParamsCapture,
hwParamsPlayback, hostBufferSizeMode )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
_______________________________________________
Portaudio mailing list
Portaudio at music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
Portaudio at music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
Portaudio at music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
Bill Good
2010-08-02 17:43:30 UTC
Permalink
Dmitry,
This is working great on my system. Thanks again!

Regards,
Bill
Post by Dmitry Kostjuchenko
Bill,
I've just commited a patch which shall fix the problem I guess in such
specific situation you showed. Let me know how it works for you now.
Regards,
Dmitry.
Post by Dmitry Kostjuchenko
Hi Bill,
Thanks for a quick log! It helps. These 3 lines are telling us about
PaAlsaStreamComponent_DetermineFramesPerBuffer: The determined period
size (512) is less than minimum (2047)
PaAlsaStreamComponent_DetermineFramesPerBuffer: device period minimum =
2047 PaAlsaStreamComponent_DetermineFramesPerBuffer: device period
maximum = 2049
It seems that in your case ALSA has fixed period size of 2048 and it
is really strange that our try to set min. (2047) fails. It looks like
a bug from ALSA side not ours but I will try to do something with
that.
Regards,
Dmitry.
Post by Bill Good
Hi Dmitry,
I've got PortAudio HEAD compiled with debug output and pasted the
output. Indeed, I don't know why ALSA isn't cooperating here. At least
it's better than Linux 8 years ago, with everyone using OSS and the
esound daemon :) Let me know if there's any other way I can be of help
(do you need output for more than one user frames-per-buffer size?
Attached is 512/~5ms).
Regards,
Bill
Debug: [Main]: SoundDevicePortAudio::open() "8, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: iLatencyMSec: 5
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: iFramesPerBuffer 512
Debug: [Main]: iLatencyMSec: 5
Debug: [Main]: Opening stream with id 8
Debug: [Main]: m_pStream 0x0
Debug: [Main]: device: 8 channelCount: 2 sampleFormat 1 suggestedLatency
0.005 Debug: [Main]: sample rate: 96000
Debug: [Main]: frames per buffer: 512
Debug: [Main]: calback: true
AlsaOpen: Opening device default
PaAlsaStreamComponent_InitialConfigure: device MMAP
SND_PCM_ACCESS_MMAP_INTERLEAVED: YES
PaAlsaStreamComponent_InitialConfigure: device MMAP
SND_PCM_ACCESS_MMAP_NONINTERLEAVED: YES
PaAlsaStreamComponent_InitialConfigure: device can MMAP: YES
PaAlsaStreamComponent_DetermineFramesPerBuffer: user-buffer (frames)
= 512
PaAlsaStreamComponent_DetermineFramesPerBuffer: user-buffer (sec)
= 0.005333
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested latency (sec)
= 0.005000
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested host buffer
(frames) = 1024
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested host buffer
(sec) = 0.010667
PaAlsaStreamComponent_DetermineFramesPerBuffer: periods min = 2, max =
8, req = 4
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested host buffer
period = 512
PaAlsaStreamComponent_DetermineFramesPerBuffer: The determined period
size (512) is less than minimum (2047)
PaAlsaStreamComponent_DetermineFramesPerBuffer: device period minimum = 2047
PaAlsaStreamComponent_DetermineFramesPerBuffer: device period maximum = 2049
PaAlsaStreamComponent_DetermineFramesPerBuffer: host buffer period
= 2047
PaAlsaStreamComponent_DetermineFramesPerBuffer: host buffer period
latency = 0.021323
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1722
Host error description: Invalid argument
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer(
&self->playback, outputParameters, framesPerUserBuffer, sampleRate,
hwParamsPlayback, &accurate )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr,
inParams, outParams, framesPerUserBuffer, hwParamsCapture,
hwParamsPlayback, hostBufferSizeMode )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1979 Expression
'PaAlsaStream_Configure( stream, inputParameters, outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency,
&hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c',
line: 2097
OpenStream: Stream in error, terminating
Debug: [Main]: Error opening stream: Unanticipated host error
Post by Dmitry Kostjuchenko
Hi Bill,
Ok, let's try to fix it untill we win. Is it possible if you could
compile PA library with debugging output enabled
(PA_ENABLE_DEBUG_OUTPUT shall be defined in makefile manually, or use
confgure with
option --enable-debug-output) I added there some useful logging
information which also tells the type of device (mmaped, non-mmaped)
and some details on host buffer calculations. This might help me to
reproduce your config. I am so sad that ALSA is so picky...
Regards,
Dmitry.
----- Original Message -----
From: "Bill Good" <bkgood at gmail.com>
To: <portaudio at music.columbia.edu>
Sent: Monday, August 02, 2010 2:53 AM
Subject: [Portaudio] Fwd: Fwd: Updated PortAudio package
forUbuntu(Needtesters!)
Post by Bill Good
Dmitry Kostjuchenko dmitrykos at iauxsoft.com
Fri Jul 30 08:57:28 EDT 2010
I managed to test my last commit on real Ubuntu x64 and for me all works ok.
I tested sample rates: 44.1k, 48k, 96k and 192k, used different latencies,
managed to go down to 1.15ms. The device was not-mmaped and on
Ubuntu x86 (in VirtualBox) mmaped. New changes seem to be working.
Awaiting for your tests to see if this issue could be closed.
Regards,
Dmitry.
Hi Dmitry,
I'm still encountering the error in r1532, here's a log with the errors I'm
getting, it also has the values being passed to Pa_OpenStream. Strangely, I'm
only having issues with the "default" ALSA device (connecting directly to my
sound card works at all settings), and it seems to work at 2048
frames per buffer (~21 ms latency) 1024 frames/buffer (~10 ms) but
not at any of the other
values (higher and lower) I tried.
Also -- sorry for the horrible quoting job, I didn't get this in email so I
had to paste it from the web.
Thanks for looking in to this!
Bill
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 4096
Debug: [Main]: latency in milliseconds: 42.6667
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm,
hwParams, &framesPerHostBuffer, &dir )' failed in
'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer( &self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr,
inParams, outParams, framesPerUserBuffer, hwParamsCapture,
hwParamsPlayback, hostBufferSizeMode )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 2048
Debug: [Main]: latency in milliseconds: 21.3333
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Debug: [Main]: Opened PortAudio stream successfully... starting
Debug: [Main]: Dynamically loaded PortAudio library!
Debug: [Main]: PortAudio: Started stream successfully
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 1024
Debug: [Main]: latency in milliseconds: 10.6667
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Debug: [Main]: Opened PortAudio stream successfully... starting
Debug: [Main]: Dynamically loaded PortAudio library!
Debug: [Main]: PortAudio: Started stream successfully
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 512
Debug: [Main]: latency in milliseconds: 5.33333
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm,
hwParams, &framesPerHostBuffer, &dir )' failed in
'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer( &self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr,
inParams, outParams, framesPerUserBuffer, hwParamsCapture,
hwParamsPlayback, hostBufferSizeMode )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 256
Debug: [Main]: latency in milliseconds: 2.66667
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm,
hwParams, &framesPerHostBuffer, &dir )' failed in
'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer( &self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr,
inParams, outParams, framesPerUserBuffer, hwParamsCapture,
hwParamsPlayback, hostBufferSizeMode )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 128
Debug: [Main]: latency in milliseconds: 1.33333
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm,
hwParams, &framesPerHostBuffer, &dir )' failed in
'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer( &self->playback,
outputParameters, framesPerUserBuffer, sampleRate, hwParamsPlayback, &accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr,
inParams, outParams, framesPerUserBuffer, hwParamsCapture,
hwParamsPlayback, hostBufferSizeMode )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
_______________________________________________
Portaudio mailing list
Portaudio at music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
Portaudio at music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
Portaudio at music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
Portaudio at music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
Dmitry Kostjuchenko
2010-08-02 17:48:59 UTC
Permalink
Bill,

I am very glad! and thanks for the feedback. I hope we really overcame all
the issues with ALSA. It seems that we met with some specific behavior
because on my Ubuntu x64 I did not have such buffer period limitation and
all what I tested (similar to your parameters) was working.

Best regards,
Dmitry.

----- Original Message -----
From: "Bill Good" <bkgood at gmail.com>
To: "Portaudio Mailing List" <portaudio at music.columbia.edu>
Sent: Monday, August 02, 2010 8:43 PM
Subject: Re: [Portaudio] Fwd: Fwd: Updated PortAudio
packageforUbuntu(Needtesters!)
Post by Bill Good
Dmitry,
This is working great on my system. Thanks again!
Regards,
Bill
Post by Dmitry Kostjuchenko
Bill,
I've just commited a patch which shall fix the problem I guess in such
specific situation you showed. Let me know how it works for you now.
Regards,
Dmitry.
Post by Dmitry Kostjuchenko
Hi Bill,
Thanks for a quick log! It helps. These 3 lines are telling us about
PaAlsaStreamComponent_DetermineFramesPerBuffer: The determined period
size (512) is less than minimum (2047)
PaAlsaStreamComponent_DetermineFramesPerBuffer: device period minimum =
2047 PaAlsaStreamComponent_DetermineFramesPerBuffer: device period
maximum = 2049
It seems that in your case ALSA has fixed period size of 2048 and it
is really strange that our try to set min. (2047) fails. It looks like
a bug from ALSA side not ours but I will try to do something with
that.
Regards,
Dmitry.
Post by Bill Good
Hi Dmitry,
I've got PortAudio HEAD compiled with debug output and pasted the
output. Indeed, I don't know why ALSA isn't cooperating here. At least
it's better than Linux 8 years ago, with everyone using OSS and the
esound daemon :) Let me know if there's any other way I can be of help
(do you need output for more than one user frames-per-buffer size?
Attached is 512/~5ms).
Regards,
Bill
Debug: [Main]: SoundDevicePortAudio::open() "8, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: iLatencyMSec: 5
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: iFramesPerBuffer 512
Debug: [Main]: iLatencyMSec: 5
Debug: [Main]: Opening stream with id 8
Debug: [Main]: m_pStream 0x0
Debug: [Main]: device: 8 channelCount: 2 sampleFormat 1
suggestedLatency
0.005 Debug: [Main]: sample rate: 96000
Debug: [Main]: frames per buffer: 512
Debug: [Main]: calback: true
AlsaOpen: Opening device default
PaAlsaStreamComponent_InitialConfigure: device MMAP
SND_PCM_ACCESS_MMAP_INTERLEAVED: YES
PaAlsaStreamComponent_InitialConfigure: device MMAP
SND_PCM_ACCESS_MMAP_NONINTERLEAVED: YES
PaAlsaStreamComponent_InitialConfigure: device can MMAP: YES
PaAlsaStreamComponent_DetermineFramesPerBuffer: user-buffer (frames)
= 512
PaAlsaStreamComponent_DetermineFramesPerBuffer: user-buffer (sec)
= 0.005333
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested latency (sec)
= 0.005000
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested host buffer
(frames) = 1024
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested host buffer
(sec) = 0.010667
PaAlsaStreamComponent_DetermineFramesPerBuffer: periods min = 2, max =
8, req = 4
PaAlsaStreamComponent_DetermineFramesPerBuffer: suggested host buffer
period = 512
PaAlsaStreamComponent_DetermineFramesPerBuffer: The determined period
size (512) is less than minimum (2047)
PaAlsaStreamComponent_DetermineFramesPerBuffer: device period minimum = 2047
PaAlsaStreamComponent_DetermineFramesPerBuffer: device period maximum = 2049
PaAlsaStreamComponent_DetermineFramesPerBuffer: host buffer period
= 2047
PaAlsaStreamComponent_DetermineFramesPerBuffer: host buffer period
latency = 0.021323
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm, hwParams,
&framesPerHostBuffer, &dir )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1722
Host error description: Invalid argument
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer(
&self->playback, outputParameters, framesPerUserBuffer, sampleRate,
hwParamsPlayback, &accurate )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr,
inParams, outParams, framesPerUserBuffer, hwParamsCapture,
hwParamsPlayback, hostBufferSizeMode )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1979 Expression
'PaAlsaStream_Configure( stream, inputParameters, outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency,
&hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c',
line: 2097
OpenStream: Stream in error, terminating
Debug: [Main]: Error opening stream: Unanticipated host error
Post by Dmitry Kostjuchenko
Hi Bill,
Ok, let's try to fix it untill we win. Is it possible if you could
compile PA library with debugging output enabled
(PA_ENABLE_DEBUG_OUTPUT shall be defined in makefile manually, or use
confgure with
option --enable-debug-output) I added there some useful logging
information which also tells the type of device (mmaped, non-mmaped)
and some details on host buffer calculations. This might help me to
reproduce your config. I am so sad that ALSA is so picky...
Regards,
Dmitry.
----- Original Message -----
From: "Bill Good" <bkgood at gmail.com>
To: <portaudio at music.columbia.edu>
Sent: Monday, August 02, 2010 2:53 AM
Subject: [Portaudio] Fwd: Fwd: Updated PortAudio package
forUbuntu(Needtesters!)
Post by Bill Good
Dmitry Kostjuchenko dmitrykos at iauxsoft.com
Fri Jul 30 08:57:28 EDT 2010
I managed to test my last commit on real Ubuntu x64 and for me all
works ok.
I tested sample rates: 44.1k, 48k, 96k and 192k, used different latencies,
managed to go down to 1.15ms. The device was not-mmaped and on
Ubuntu x86 (in VirtualBox) mmaped. New changes seem to be working.
Awaiting for your tests to see if this issue could be closed.
Regards,
Dmitry.
Hi Dmitry,
I'm still encountering the error in r1532, here's a log with the errors I'm
getting, it also has the values being passed to Pa_OpenStream. Strangely, I'm
only having issues with the "default" ALSA device (connecting directly to my
sound card works at all settings), and it seems to work at 2048
frames per buffer (~21 ms latency) 1024 frames/buffer (~10 ms) but
not at any of the other
values (higher and lower) I tried.
Also -- sorry for the horrible quoting job, I didn't get this in email so I
had to paste it from the web.
Thanks for looking in to this!
Bill
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 4096
Debug: [Main]: latency in milliseconds: 42.6667
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm,
hwParams, &framesPerHostBuffer, &dir )' failed in
'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer( &self->playback,
outputParameters, framesPerUserBuffer, sampleRate,
hwParamsPlayback,
&accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr,
inParams, outParams, framesPerUserBuffer, hwParamsCapture,
hwParamsPlayback, hostBufferSizeMode )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters,
outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency,
&hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 2048
Debug: [Main]: latency in milliseconds: 21.3333
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Debug: [Main]: Opened PortAudio stream successfully... starting
Debug: [Main]: Dynamically loaded PortAudio library!
Debug: [Main]: PortAudio: Started stream successfully
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 1024
Debug: [Main]: latency in milliseconds: 10.6667
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Debug: [Main]: Opened PortAudio stream successfully... starting
Debug: [Main]: Dynamically loaded PortAudio library!
Debug: [Main]: PortAudio: Started stream successfully
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 512
Debug: [Main]: latency in milliseconds: 5.33333
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm,
hwParams, &framesPerHostBuffer, &dir )' failed in
'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer( &self->playback,
outputParameters, framesPerUserBuffer, sampleRate,
hwParamsPlayback,
&accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr,
inParams, outParams, framesPerUserBuffer, hwParamsCapture,
hwParamsPlayback, hostBufferSizeMode )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters,
outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency,
&hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 256
Debug: [Main]: latency in milliseconds: 2.66667
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm,
hwParams, &framesPerHostBuffer, &dir )' failed in
'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer( &self->playback,
outputParameters, framesPerUserBuffer, sampleRate,
hwParamsPlayback,
&accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr,
inParams, outParams, framesPerUserBuffer, hwParamsCapture,
hwParamsPlayback, hostBufferSizeMode )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters,
outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency,
&hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
Debug: [Main]: SoundDevicePortAudio::open() "12, default"
Debug: [Main]: m_dSampleRate 96000
Debug: [Main]: framesPerBuffer 128
Debug: [Main]: latency in milliseconds: 1.33333
Debug: [Main]: output channels: 2 | input channels: 0
Debug: [Main]: Opening stream with id 12
Expression 'snd_pcm_hw_params_set_period_size_near( self->pcm,
hwParams, &framesPerHostBuffer, &dir )' failed in
'src/hostapi/alsa/pa_linux_alsa.c',
line: 1722
Expression 'PaAlsaStreamComponent_DetermineFramesPerBuffer( &self->playback,
outputParameters, framesPerUserBuffer, sampleRate,
hwParamsPlayback,
&accurate
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1936
Expression 'PaAlsaStream_DetermineFramesPerBuffer( self, realSr,
inParams, outParams, framesPerUserBuffer, hwParamsCapture,
hwParamsPlayback, hostBufferSizeMode )' failed in
'src/hostapi/alsa/pa_linux_alsa.c', line: 1979
Expression 'PaAlsaStream_Configure( stream, inputParameters,
outputParameters,
sampleRate, framesPerBuffer, &inputLatency, &outputLatency,
&hostBufferSizeMode
)' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2097
Debug: [Main]: Error opening stream: Unanticipated host error
_______________________________________________
Portaudio mailing list
Portaudio at music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
Portaudio at music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
Portaudio at music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
Portaudio at music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
_______________________________________________
Portaudio mailing list
Portaudio at music.columbia.edu
http://music.columbia.edu/mailman/listinfo/portaudio
Continue reading on narkive:
Loading...