All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Jaroslav Kysela <perex@suse.cz>
Cc: alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.de>
Subject: Re: pcm parameters, digital output ...
Date: Thu, 30 Mar 2006 17:06:05 +0200	[thread overview]
Message-ID: <1143731165.4617.0.camel@localhost> (raw)
In-Reply-To: <Pine.LNX.4.61.0603301642170.11712@tm8103.perex-int.cz>

[-- Attachment #1: Type: text/plain, Size: 2135 bytes --]

On Thu, 2006-03-30 at 16:51 +0200, Jaroslav Kysela wrote:

> The mask is R/O variable and the bit definitions are different for 
> consumer and pro modes, so the driver can describe exactly which bits are 
> supported for these two different modes.

Yes, I know, I just don't see why there are different modes. If the chip
has different modes, shouldn't the driver be able to switch between them
based on the consumer bit in the actual iec958 values it gets from
userspace?

> AC97 code is probably not a good example. The "shift" to specific PCM 
> device is not implemented there. Look to snd_ice1712_spdif_build_controls
> in ice1712.c . This code is good.

Hmm, ok. Did you read my earlier discussion about why I do *not* want a
shift to a specific pcm device?

> I'm not sure, if we need a new format when we have information from the 
> control elements, that the stream is not PCM encoded. But on other hand, 
> these formats can be used with some conversion layers in alsa-lib 
> for handling of these streams and prevent extra things like resampling, 
> volume processing etc.

Aha, good point, I could use the iec958 bits to determine the mode. But
that's out-of-band information, so it is not too nice to rely on it
imho.
And exactly like you say, resampling etc. cannot be done on compressed
information.

> Also, there is a possibility to use subformat value (which is not used 
> so far for S16_LE/BE formats) for the non-pcm stream specification.

I'm not too familiar with these internals :)

What I'm currently doing is defining for each codec what kind of
transfer formats it supports, see 
http://johannes.sipsolutions.net/gitweb.cgi?p=snd-aoa.git;a=blob;h=e3ca7a269906ceb41b411afcad14c54f4a181588;hb=4e1bc0b35020b3b1cac87f60cb67671e2c9a801e;f=aoa/codecs/onyx/snd-aoa-codec-onyx.c#l430

Then the generic framework cuts that down to whatever is usable() at the
moment depending on the selection of the iec958 and analog mute mixer
elements. Hence there you can see what I'd like to do with a new format
(which I called SNDRV_PCM_FMTBIT_COMPRESSED_16BE for now).

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 793 bytes --]

  reply	other threads:[~2006-03-30 15:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-29 11:34 pcm parameters, digital output Johannes Berg
2006-03-30 14:51 ` Jaroslav Kysela
2006-03-30 15:06   ` Johannes Berg [this message]
2006-03-31 10:47     ` Jaroslav Kysela
2006-03-31 10:55       ` Johannes Berg
2006-03-31 11:38         ` Jaroslav Kysela
2006-03-31 11:45           ` Johannes Berg

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=1143731165.4617.0.camel@localhost \
    --to=johannes@sipsolutions.net \
    --cc=alsa-devel@alsa-project.org \
    --cc=perex@suse.cz \
    --cc=tiwai@suse.de \
    /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.