All of lore.kernel.org
 help / color / mirror / Atom feed
* Detecting the sample format in the driver
@ 2006-03-19 23:20 Adrian McMenamin
  2006-03-20  0:32 ` Lee Revell
  2006-03-20  8:00 ` Clemens Ladisch
  0 siblings, 2 replies; 4+ messages in thread
From: Adrian McMenamin @ 2006-03-19 23:20 UTC (permalink / raw)
  To: alsa-devel

for some reason this isn't working for me - and I need to set hardware
channel parameters on the basis of the sample.

My hardware plays signed 8 bit, signed 16 bit little endian and 8 bit
adaptive differential PCM and I have this set...



.formats =
	    (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE |
	     SNDRV_PCM_FMTBIT_IMA_ADPCM),



But when I try to detect the format...

	if ((substream->runtime)->format == SNDRV_PCM_FMTBIT_S16_LE)
		channel->sfmt = SM_16BIT;


It doesn't seem to work.

I am assuming the alsa subsystem ought to process the stream for me - ie
any 16 bit stream will turn up as SNDRV_PCM_FMTBIT_S16_LE - is that
right? And if it is, why isn't it working?



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Detecting the sample format in the driver
  2006-03-19 23:20 Detecting the sample format in the driver Adrian McMenamin
@ 2006-03-20  0:32 ` Lee Revell
  2006-03-20  8:00 ` Clemens Ladisch
  1 sibling, 0 replies; 4+ messages in thread
From: Lee Revell @ 2006-03-20  0:32 UTC (permalink / raw)
  To: Adrian McMenamin; +Cc: alsa-devel

On Sun, 2006-03-19 at 23:20 +0000, Adrian McMenamin wrote:
> for some reason this isn't working for me - and I need to set hardware
> channel parameters on the basis of the sample.
> 
> My hardware plays signed 8 bit, signed 16 bit little endian and 8 bit
> adaptive differential PCM and I have this set...
> 
> 
> 
> .formats =
> 	    (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE |
> 	     SNDRV_PCM_FMTBIT_IMA_ADPCM),
> 
> 
> 
> But when I try to detect the format...
> 
> 	if ((substream->runtime)->format == SNDRV_PCM_FMTBIT_S16_LE)
> 		channel->sfmt = SM_16BIT;
> 
> 
> It doesn't seem to work.
> 
> I am assuming the alsa subsystem ought to process the stream for me - ie
> any 16 bit stream will turn up as SNDRV_PCM_FMTBIT_S16_LE - is that
> right? And if it is, why isn't it working?
> 

What does snd_pcm_format_width(runtime->format) return (check emupcm.c
for examples)?

Lee



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Detecting the sample format in the driver
  2006-03-19 23:20 Detecting the sample format in the driver Adrian McMenamin
  2006-03-20  0:32 ` Lee Revell
@ 2006-03-20  8:00 ` Clemens Ladisch
  2006-03-20  8:06   ` Adrian McMenamin
  1 sibling, 1 reply; 4+ messages in thread
From: Clemens Ladisch @ 2006-03-20  8:00 UTC (permalink / raw)
  To: Adrian McMenamin; +Cc: alsa-devel

Adrian McMenamin wrote:
> 	if ((substream->runtime)->format == SNDRV_PCM_FMTBIT_S16_LE)

This should be SNDRV_PCM_FORMAT_S16_LE.


HTH
Clemens


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Detecting the sample format in the driver
  2006-03-20  8:00 ` Clemens Ladisch
@ 2006-03-20  8:06   ` Adrian McMenamin
  0 siblings, 0 replies; 4+ messages in thread
From: Adrian McMenamin @ 2006-03-20  8:06 UTC (permalink / raw)
  To: Clemens Ladisch; +Cc: alsa-devel

On Mon, 2006-03-20 at 09:00 +0100, Clemens Ladisch wrote:
> Adrian McMenamin wrote:
> > 	if ((substream->runtime)->format == SNDRV_PCM_FMTBIT_S16_LE)
> 
> This should be SNDRV_PCM_FORMAT_S16_LE.
> 
> 
Which works! Thanks.



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-03-20  8:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-19 23:20 Detecting the sample format in the driver Adrian McMenamin
2006-03-20  0:32 ` Lee Revell
2006-03-20  8:00 ` Clemens Ladisch
2006-03-20  8:06   ` Adrian McMenamin

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.