All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lennart Poettering <mznyfn@0pointer.de>
To: James Courtier-Dutton <James@superbug.co.uk>
Cc: ALSA Development Mailing List <alsa-devel@alsa-project.org>
Subject: Re: Disabling buffer fill level preprocessing by ALSA
Date: Tue, 8 Jan 2008 01:03:02 +0100	[thread overview]
Message-ID: <20080108000302.GA19547@tango.0pointer.de> (raw)
In-Reply-To: <4782A8F8.8080609@superbug.co.uk>

On Mon, 07.01.08 22:34, James Courtier-Dutton (James@superbug.co.uk) wrote:

> Are you going to be at FOMS. It might be easier to explain to you there.
> You are making assumptions about sound cards that might be wrong. E.g. 
> 2secs hw buffer for instance.

Yes, I will be at FOMS.

I ask for 2s of hw buffer, I take whatever ALSA gives me. If ALSA
cannot fulfil this request I am happy and take whatever I get. 

Also, if clock_getres() tells me that hrtimers are not available, or
when I cannot enable mmap mode for a device, I don't do
system-timer-based scheduling at all, instead I fall back to use a fixed
period size, the way ALSA suggests it.

I am not aware that I make any assumptions of the ALSA API that are not documented, besides:

- That I can fully (as in "what is in the hw buf and still unplayed")
  rewind a playback buffer from the front:0,
  surround40:, surround50:, surround41:, surround51: and surround71:
  devices when I managed to open them in mmap mode.

- That snd_pcm_sw_params_set_stop_threshold(.. , (snd_pcm_uframes_t) -1))
  disables automatic starting of the device.

- That snd_pcm_sw_params_set_start_threshold(.. , (snd_pcm_uframes_t) -1))
  disables automatic stopping on underrun.

- That snd_pcm_sw_params_set_avail_min(.. , INT_MAX) will never mark
  the PCM fd as ready in poll().

- That the mixer device for a device surround51:0 is called hw:0 

Which seem all pretty reasonable to me, and based on comments from
Takashi or Jaroslav on the ML, or by looking into the source code.

What other assumptions do you believe I am making that might be invalid?

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4

      reply	other threads:[~2008-01-08  0:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-31 17:12 Disabling buffer fill level preprocessing by ALSA Lennart Poettering
2008-01-07 11:07 ` Takashi Iwai
2008-01-07 16:07   ` Lennart Poettering
2008-01-07 18:33     ` Jaroslav Kysela
2008-01-07 22:38       ` Lennart Poettering
2008-01-08  8:00         ` Jaroslav Kysela
2008-01-12 18:06           ` Lennart Poettering
2008-01-07 18:55 ` James Courtier-Dutton
2008-01-07 20:21   ` Lennart Poettering
2008-01-07 22:34     ` James Courtier-Dutton
2008-01-08  0:03       ` Lennart Poettering [this message]

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=20080108000302.GA19547@tango.0pointer.de \
    --to=mznyfn@0pointer.de \
    --cc=James@superbug.co.uk \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.