alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Raymond Yau <superquad.vortex2@gmail.com>
To: ALSA Development Mailing List <alsa-devel@alsa-project.org>
Subject: buffer_size return by snd_pcm_hw_params_get_buffer_size_max
Date: Mon, 4 Apr 2011 11:54:45 +0800	[thread overview]
Message-ID: <BANLkTikFON0YKxv5iT6ECX+xMFfRMhYypA@mail.gmail.com> (raw)

it seem that the value return by snd_pcm_hw_params_get_buffer_size_max()
depend on /proc/asound/Intel/pcm0p/sub0/prealloc

Is it a bug in alsa-lib or snd-hda-intel driver

refer to pulseaudio/src/modules/alsa/alsa-util.c

       if ((ret = snd_pcm_hw_params_get_buffer_size_max(hwparams,
&max_frames)) < 0)
            pa_log_warn("snd_pcm_hw_params_get_buffer_size_max() failed:
%s", pa_alsa_strerror(ret));
        else
            pa_log_debug("Maximum hw buffer size is %lu ms", (long unsigned)
(max_frames * PA_MSEC_PER_SEC / _ss.rate));



cat /proc/asound/Intel/pcm0p/sub0/prealloc
64

D: alsa-util.c: Checking for superset analog-stereo (front:%f)
D: alsa-util.c: Trying front:1 with SND_PCM_NO_AUTO_FORMAT ...
D: alsa-util.c: Managed to open front:1
I: alsa-util.c: Trying to disable ALSA period wakeups, using timers only
D: alsa-util.c: Maximum hw buffer size is 371 ms
D: alsa-util.c: Set buffer size first (to 88200 samples), period size second
(to 88200 samples).
I: alsa-util.c: ALSA period wakeups disabled
I: alsa-source.c: Successfully opened device front:1.
I: alsa-source.c: Selected mapping 'Analog Stereo' (analog-stereo).
I: alsa-source.c: Successfully enabled mmap() mode.
I: alsa-source.c: Successfully enabled timer-based scheduling mode.


echo 32768 > /proc/asound/Intel/pcm0p/sub0/prealloc


D: alsa-util.c: Checking for superset analog-stereo (front:%f)
D: alsa-util.c: Trying front:1 with SND_PCM_NO_AUTO_FORMAT ...
D: alsa-util.c: Managed to open front:1
I: alsa-util.c: Trying to disable ALSA period wakeups, using timers only
D: alsa-util.c: Maximum hw buffer size is 190217 ms
D: alsa-util.c: Set buffer size first (to 88200 samples), period size second
(to 88200 samples).
I: alsa-util.c: ALSA period wakeups disabled
I: alsa-sink.c: Successfully opened device front:1.
I: alsa-sink.c: Selected mapping 'Analog Stereo' (analog-stereo).
I: alsa-sink.c: Successfully enabled mmap() mode.
I: alsa-sink.c: Successfully enabled timer-based scheduling mode.

             reply	other threads:[~2011-04-04  3:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-04  3:54 Raymond Yau [this message]
2011-04-04 11:01 ` buffer_size return by snd_pcm_hw_params_get_buffer_size_max Takashi Iwai
2011-05-08 13:49   ` Raymond Yau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTikFON0YKxv5iT6ECX+xMFfRMhYypA@mail.gmail.com \
    --to=superquad.vortex2@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).