All of lore.kernel.org
 help / color / mirror / Atom feed
* aplay not playing MPEG
@ 2003-07-21 21:42 Eliot Blennerhassett
  2003-07-21 21:55 ` Måns Rullgård
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Eliot Blennerhassett @ 2003-07-21 21:42 UTC (permalink / raw)
  To: alsa-devel

Can aplay/alsa send raw MPEG data to a card?

  aplay -Dhw:0  -v -t raw --channels=2 --format=MPEG --rate=44100 ~/audio/44khz
  Playing raw data '/home/eliot/audio/44khz' : MPEG, Rate 44100 Hz, Stereo
  aplay: set_params:805: Sample format non available

This command works fine if I specify S16_LE, S23, FLOAT, S24, but not MPEG.
Any suggestions as to whe - do I have a hope of making it work?
(My card supports all the above including MPEG in exactly the same way as far as
ALSA driver is concerned)

I have stepped through the code, and got lost in the bit twiddling of masks and
formats.  One thing I notice is that only the linear formats are mentioned in
many of the functions in pcm_misc.c eg  snd_pcm_format_width()

thanks

Eliot

Eliot Blennerhassett
AudioScience Inc.
--
Junk footer beyond this point. Read at your own risk.


-------------------------------------------------------------
Sign up for ICQmail at http://www.icq.com/icqmail/signup.html


-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0

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

* Re: aplay not playing MPEG
  2003-07-21 21:42 aplay not playing MPEG Eliot Blennerhassett
@ 2003-07-21 21:55 ` Måns Rullgård
  2003-07-22  9:00 ` Takashi Iwai
  2003-07-22 17:21 ` Jaroslav Kysela
  2 siblings, 0 replies; 7+ messages in thread
From: Måns Rullgård @ 2003-07-21 21:55 UTC (permalink / raw)
  To: alsa-devel

"Eliot Blennerhassett" <bigblen@icqmail.com> writes:

> Can aplay/alsa send raw MPEG data to a card?
>
>   aplay -Dhw:0  -v -t raw --channels=2 --format=MPEG --rate=44100 ~/audio/44khz
>   Playing raw data '/home/eliot/audio/44khz' : MPEG, Rate 44100 Hz, Stereo
>   aplay: set_params:805: Sample format non available
>
> This command works fine if I specify S16_LE, S23, FLOAT, S24, but
> not MPEG.  Any suggestions as to whe - do I have a hope of making it
> work?  (My card supports all the above including MPEG in exactly the
> same way as far as ALSA driver is concerned)

What model is your card?  Are you sure that it really supports mpeg,
and that it isn't just a windows driver faking it for marketing
reasons?

-- 
Måns Rullgård
mru@users.sf.net



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0

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

* Re: aplay not playing MPEG
  2003-07-21 21:42 aplay not playing MPEG Eliot Blennerhassett
  2003-07-21 21:55 ` Måns Rullgård
@ 2003-07-22  9:00 ` Takashi Iwai
  2003-07-22 17:21 ` Jaroslav Kysela
  2 siblings, 0 replies; 7+ messages in thread
From: Takashi Iwai @ 2003-07-22  9:00 UTC (permalink / raw)
  To: Eliot Blennerhassett; +Cc: alsa-devel

At Mon, 21 Jul 2003 14:42:17 -0700 (PDT),
Eliot Blennerhassett wrote:
> 
> Can aplay/alsa send raw MPEG data to a card?
> 
>   aplay -Dhw:0  -v -t raw --channels=2 --format=MPEG --rate=44100 ~/audio/44khz
>   Playing raw data '/home/eliot/audio/44khz' : MPEG, Rate 44100 Hz, Stereo
>   aplay: set_params:805: Sample format non available
> 
> This command works fine if I specify S16_LE, S23, FLOAT, S24, but not MPEG.
> Any suggestions as to whe - do I have a hope of making it work?
> (My card supports all the above including MPEG in exactly the same way as far as
> ALSA driver is concerned)
> 
> I have stepped through the code, and got lost in the bit twiddling of masks and
> formats.  One thing I notice is that only the linear formats are mentioned in
> many of the functions in pcm_misc.c eg  snd_pcm_format_width()

yes.

the support of MPEG is still incomplete.
the same things are not defined in the kernel side, too.

we have to define the detail of this format.  for example, how the
driver should align the (mpeg-)frame size together with the ALSA frame
size, how can be the variable bitrate handled, etc.

perhaps the first step would be send just it as a byte stream with
the minimum alignment.  then add more restrictions...


Takashi


-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0

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

* Re: aplay not playing MPEG
  2003-07-21 21:42 aplay not playing MPEG Eliot Blennerhassett
  2003-07-21 21:55 ` Måns Rullgård
  2003-07-22  9:00 ` Takashi Iwai
@ 2003-07-22 17:21 ` Jaroslav Kysela
  2 siblings, 0 replies; 7+ messages in thread
From: Jaroslav Kysela @ 2003-07-22 17:21 UTC (permalink / raw)
  To: Eliot Blennerhassett; +Cc: alsa-devel

On Mon, 21 Jul 2003, Eliot Blennerhassett wrote:

> Can aplay/alsa send raw MPEG data to a card?
> 
>   aplay -Dhw:0  -v -t raw --channels=2 --format=MPEG --rate=44100 ~/audio/44khz
>   Playing raw data '/home/eliot/audio/44khz' : MPEG, Rate 44100 Hz, Stereo
>   aplay: set_params:805: Sample format non available
> 
> This command works fine if I specify S16_LE, S23, FLOAT, S24, but not MPEG.
> Any suggestions as to whe - do I have a hope of making it work?
> (My card supports all the above including MPEG in exactly the same way as far as
> ALSA driver is concerned)
> 
> I have stepped through the code, and got lost in the bit twiddling of masks and
> formats.  One thing I notice is that only the linear formats are mentioned in
> many of the functions in pcm_misc.c eg  snd_pcm_format_width()

The handshake between driver and applications is not defined for MPEG and 
other compressed formats.

Can you describe the MPEG stream which your hardware expects? It will help 
us to design the APIs.

					Thanks,
						Jaroslav

-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0

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

* Re: aplay not playing MPEG
@ 2003-08-04 23:32 Eliot Blennerhassett
  0 siblings, 0 replies; 7+ messages in thread
From: Eliot Blennerhassett @ 2003-08-04 23:32 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, perex

I wrote:
>Can aplay/alsa send raw MPEG data to a card?
>> 
>>   aplay -Dhw:0  -v -t raw --channels=2 --format=MPEG --rate=44100
~/audio/44khz
>>   Playing raw data '/home/eliot/audio/44khz' : MPEG, Rate 44100 Hz, Stereo
>>   aplay: set_params:805: Sample format non available
>> 
>> This command works fine if I specify S16_LE, S23, FLOAT, S24, but not MPEG.
>> Any suggestions as to whe - do I have a hope of making it work?
>> (My card supports all the above including MPEG in exactly the same way as far
as
>> ALSA driver is concerned)
>> 
>> I have stepped through the code, and got lost in the bit twiddling of masks
and
>> formats.  One thing I notice is that only the linear formats are mentioned in
>> many of the functions in pcm_misc.c eg  snd_pcm_format_width()

Jaroslav wrote:
The handshake between driver and applications is not defined for MPEG and 
other compressed formats.

Can you describe the MPEG stream which your hardware expects? It will help 
us to design the APIs.

Takashi wrote:
the support of MPEG is still incomplete.
the same things are not defined in the kernel side, too.

we have to define the detail of this format.  for example, how the
driver should align the (mpeg-)frame size together with the ALSA frame
size, how can be the variable bitrate handled, etc.

perhaps the first step would be send just it as a byte stream with
the minimum alignment.  then add more restrictions...

My response:
Our hardware just expects a byte stream, it is not necessary to send whole
frames in a single write to the card.  

It is possible to query the buffer size, and how much data is left to play. 
Also available is the count of decoded PCM samples that have been played. 
Our hardware needs to know which layer MPEG the data belongs to. (for various
reasons we don't have a unified layer2 and layer3 decoder)

The possible difficulty with MPEG, especially VBR, is that the amount of data
played is not related to the samples played.  I am not sure how deeply this
assumption (that they ARE related) is embedded into the architecture.

If it is OK to have a "period" indicate that X bytes of compressed data have
been consumed, then if MPEG data could make it through the middle layers to my
driver, it would work right now.

- Eliot

Eliot Blennerhassett
AudioScience Inc.
--
Junk footer beyond this point. Read at your own risk.


-------------------------------------------------------------
Sign up for ICQmail at http://www.icq.com/icqmail/signup.html


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01

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

* Re: aplay not playing MPEG
  2003-07-22  1:52 Eliot Blennerhassett
@ 2003-07-22  2:53 ` Måns Rullgård
  0 siblings, 0 replies; 7+ messages in thread
From: Måns Rullgård @ 2003-07-22  2:53 UTC (permalink / raw)
  To: alsa-devel

"Eliot Blennerhassett" <bigblen@icqmail.com> writes:

>> What model is your card?  Are you sure that it really supports mpeg,
>> and that it isn't just a windows driver faking it for marketing
>> reasons?
>
> Audioscience ASI6244, definitely has MPEG decode on the card
> (I am one of the cards designers)

Well, I guess you should know.  I've some Soundblaster cards marketed
as MP3, even though they can't do anything of the kind in hardware.

> I am writing the driver for this card, but can't figure out why the
> MPEG doesn't even make it to the driver.  My lack of understanding
> of alsa-lib I expect.

It's nice that someone writes drivers for their own cards, but I'm
afraid I can't help you.

-- 
Måns Rullgård
mru@users.sf.net



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0

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

* Re: aplay not playing MPEG
@ 2003-07-22  1:52 Eliot Blennerhassett
  2003-07-22  2:53 ` Måns Rullgård
  0 siblings, 1 reply; 7+ messages in thread
From: Eliot Blennerhassett @ 2003-07-22  1:52 UTC (permalink / raw)
  To: alsa-devel

> What model is your card?  Are you sure that it really supports mpeg,
> and that it isn't just a windows driver faking it for marketing
> reasons?

Audioscience ASI6244, definitely has MPEG decode on the card
(I am one of the cards designers)

I am writing the driver for this card, but can't figure out why the MPEG doesn't
even make it to the driver.  My lack of understanding of alsa-lib I expect.

Eliot Blennerhassett
AudioScience Inc.
--
Junk footer beyond this point. Read at your own risk.


-------------------------------------------------------------
Sign up for ICQmail at http://www.icq.com/icqmail/signup.html


-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0

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

end of thread, other threads:[~2003-08-04 23:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-21 21:42 aplay not playing MPEG Eliot Blennerhassett
2003-07-21 21:55 ` Måns Rullgård
2003-07-22  9:00 ` Takashi Iwai
2003-07-22 17:21 ` Jaroslav Kysela
2003-07-22  1:52 Eliot Blennerhassett
2003-07-22  2:53 ` Måns Rullgård
2003-08-04 23:32 Eliot Blennerhassett

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.