* couple of questions...
@ 1998-03-20 18:39 Nick Verhaegen
0 siblings, 0 replies; 23+ messages in thread
From: Nick Verhaegen @ 1998-03-20 18:39 UTC (permalink / raw)
To: linux
Hi,
I've been skimming to the archives, but haven't been able to read
everything yet, so maybe this has been asked/said...
1. I got an Indy at work (R4600 I believe) about which I'm nagging my boss
to install Linux. Is there a list of supported hardware anywhere,
because the webpages seem quite out of date...
2. Is it still a netboot manual install, or has there been some
development on a redhat-like installation system...
Thanks for the info, if you need help with the documentation of your
project, I'm willing to help (I've only started programming in C about two
weeks ago, so I won't be much help on that terrain, althoug pointers to
useful info are always welcome). The info on the webpages seems really
outdated...
Have fun and keep up the good work,
------------------------------------------------------------------------------
Nick "gatzby" Verhaegen e-mail : gatzby@ulyssis.student.kuleuven.ac.be
pgp-key : finger me http://hal.ulyssis.student.kuleuven.ac.be/~gatzby/
Sysadmin hal.ulyssis.student.kuleuven.ac.be, Ulyssis treasurer
------------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 23+ messages in thread
* Couple of questions
@ 2006-03-16 0:01 Adrian McMenamin
2006-03-16 10:42 ` Takashi Iwai
0 siblings, 1 reply; 23+ messages in thread
From: Adrian McMenamin @ 2006-03-16 0:01 UTC (permalink / raw)
To: alsa-devel
If my driver declares this:
.info = (SNDRV_PCM_INFO_NONINTERLEAVED),
Can I expect samples to come in all left followed by all right, or how?
And will cat somefile.wav > /dev/dsp using oss emulation respect that?
And what default frequency can I expect cat to use in the above?
Thanks
Adrian
-------------------------------------------------------
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] 23+ messages in thread
* Re: Couple of questions
2006-03-16 0:01 Couple of questions Adrian McMenamin
@ 2006-03-16 10:42 ` Takashi Iwai
2006-03-16 21:08 ` Adrian McMenamin
` (2 more replies)
0 siblings, 3 replies; 23+ messages in thread
From: Takashi Iwai @ 2006-03-16 10:42 UTC (permalink / raw)
To: Adrian McMenamin; +Cc: alsa-devel
At Thu, 16 Mar 2006 00:01:11 +0000,
Adrian McMenamin wrote:
>
> If my driver declares this:
>
> .info = (SNDRV_PCM_INFO_NONINTERLEAVED),
>
> Can I expect samples to come in all left followed by all right, or how?
Yes. It's the non-interleaved format (LLLLLLLL....RRRRRR.....).
> And will cat somefile.wav > /dev/dsp using oss emulation respect that?
Yes.
> And what default frequency can I expect cat to use in the above?
ALSA has no default frequency. OSS assumes 8kHz for /dev/audio.
/dev/dsp has no default, IIRC, but practically 44.1kHz.
So "cat some > /dev/dsp" is not a good way for testing at all...
It's usable for checking that "something" works at least, but not for
checking the detailed functionality.
Takashi
-------------------------------------------------------
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] 23+ messages in thread
* Re: Couple of questions
2006-03-16 10:42 ` Takashi Iwai
@ 2006-03-16 21:08 ` Adrian McMenamin
2006-03-17 0:10 ` Carlos Munoz
2006-03-17 0:20 ` Lee Revell
2006-03-16 23:34 ` Adrian McMenamin
2006-03-18 11:08 ` Adrian McMenamin
2 siblings, 2 replies; 23+ messages in thread
From: Adrian McMenamin @ 2006-03-16 21:08 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
On Thu, 2006-03-16 at 11:42 +0100, Takashi Iwai wrote:
> At Thu, 16 Mar 2006 00:01:11 +0000,
> Adrian McMenamin wrote:
> >
> > If my driver declares this:
> >
> > .info = (SNDRV_PCM_INFO_NONINTERLEAVED),
> >
> > Can I expect samples to come in all left followed by all right, or how?
>
> Yes. It's the non-interleaved format (LLLLLLLL....RRRRRR.....).
>
> > And will cat somefile.wav > /dev/dsp using oss emulation respect that?
>
> Yes.
>
> > And what default frequency can I expect cat to use in the above?
>
> ALSA has no default frequency. OSS assumes 8kHz for /dev/audio.
> /dev/dsp has no default, IIRC, but practically 44.1kHz.
>
> So "cat some > /dev/dsp" is not a good way for testing at all...
> It's usable for checking that "something" works at least, but not for
> checking the detailed functionality.
Thanks. My problem is I cannot get the alsa utilities to compile/work
(they compile but seg fault on use). Is there a good OSS only app I can
use to test the basic play stuff?
-------------------------------------------------------
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] 23+ messages in thread
* Re: Couple of questions
2006-03-16 10:42 ` Takashi Iwai
2006-03-16 21:08 ` Adrian McMenamin
@ 2006-03-16 23:34 ` Adrian McMenamin
2006-03-17 0:16 ` Lee Revell
2006-03-18 11:08 ` Adrian McMenamin
2 siblings, 1 reply; 23+ messages in thread
From: Adrian McMenamin @ 2006-03-16 23:34 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
On Thu, 2006-03-16 at 11:42 +0100, Takashi Iwai wrote:
> At Thu, 16 Mar 2006 00:01:11 +0000,
> Adrian McMenamin wrote:
> >
> > If my driver declares this:
> >
> > .info = (SNDRV_PCM_INFO_NONINTERLEAVED),
> >
> > Can I expect samples to come in all left followed by all right, or how?
>
> Yes. It's the non-interleaved format (LLLLLLLL....RRRRRR.....).
>
Will the middle layer still copy over data in the same period size as
for mono in this case? Or does it double - ie one period's worth of left
and one of right?
-------------------------------------------------------
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] 23+ messages in thread
* Re: Couple of questions
2006-03-16 21:08 ` Adrian McMenamin
@ 2006-03-17 0:10 ` Carlos Munoz
2006-03-17 0:20 ` Lee Revell
1 sibling, 0 replies; 23+ messages in thread
From: Carlos Munoz @ 2006-03-17 0:10 UTC (permalink / raw)
To: Adrian McMenamin; +Cc: Takashi Iwai, alsa-devel
Adrian McMenamin wrote:
>On Thu, 2006-03-16 at 11:42 +0100, Takashi Iwai wrote:
>
>
>>At Thu, 16 Mar 2006 00:01:11 +0000,
>>Adrian McMenamin wrote:
>>
>>
>>>If my driver declares this:
>>>
>>> .info = (SNDRV_PCM_INFO_NONINTERLEAVED),
>>>
>>>Can I expect samples to come in all left followed by all right, or how?
>>>
>>>
>>Yes. It's the non-interleaved format (LLLLLLLL....RRRRRR.....).
>>
>>
>>
>>>And will cat somefile.wav > /dev/dsp using oss emulation respect that?
>>>
>>>
>>Yes.
>>
>>
>>
>>>And what default frequency can I expect cat to use in the above?
>>>
>>>
>>ALSA has no default frequency. OSS assumes 8kHz for /dev/audio.
>>/dev/dsp has no default, IIRC, but practically 44.1kHz.
>>
>>So "cat some > /dev/dsp" is not a good way for testing at all...
>>It's usable for checking that "something" works at least, but not for
>>checking the detailed functionality.
>>
>>
>
>
>Thanks. My problem is I cannot get the alsa utilities to compile/work
>(they compile but seg fault on use). Is there a good OSS only app I can
>use to test the basic play stuff?
>
>
>
>
Hi Adrian,
Unfortunately, I can't offer any help. I am doing exactly what you are
doing to test my alsa driver. I'm also using /dev/dsp. However, what I
noticed when cat'ing a wav file to /dev/dsp is that the
snd_xxx_playback_pointer() function only gets called for a short while
and then it's no called any more. The dma buffer is only partially
filled. The driver is not aware of this and just wraps around the buffer
repeating the sound data over and over. I compiled aplay with no X
support (command line only) but can't get it to work. So now I'm in the
middle of writing a light alsa application to test the driver. I hope to
have something by tomorrow at the latest. If I ever get it to work I can
send it to you if you are interested.
Thanks,
Carlos
-------------------------------------------------------
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] 23+ messages in thread
* Re: Couple of questions
2006-03-16 23:34 ` Adrian McMenamin
@ 2006-03-17 0:16 ` Lee Revell
2006-03-17 10:13 ` Takashi Iwai
0 siblings, 1 reply; 23+ messages in thread
From: Lee Revell @ 2006-03-17 0:16 UTC (permalink / raw)
To: Adrian McMenamin; +Cc: Takashi Iwai, alsa-devel
On Thu, 2006-03-16 at 23:34 +0000, Adrian McMenamin wrote:
> On Thu, 2006-03-16 at 11:42 +0100, Takashi Iwai wrote:
> > At Thu, 16 Mar 2006 00:01:11 +0000,
> > Adrian McMenamin wrote:
> > >
> > > If my driver declares this:
> > >
> > > .info = (SNDRV_PCM_INFO_NONINTERLEAVED),
> > >
> > > Can I expect samples to come in all left followed by all right, or how?
> >
> > Yes. It's the non-interleaved format (LLLLLLLL....RRRRRR.....).
> >
> Will the middle layer still copy over data in the same period size as
> for mono in this case?
Yes. One 4 frame period interleaved is LRLRLRLR, non-interleaved
LLLLRRRR.
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] 23+ messages in thread
* Re: Couple of questions
2006-03-16 21:08 ` Adrian McMenamin
2006-03-17 0:10 ` Carlos Munoz
@ 2006-03-17 0:20 ` Lee Revell
1 sibling, 0 replies; 23+ messages in thread
From: Lee Revell @ 2006-03-17 0:20 UTC (permalink / raw)
To: Adrian McMenamin; +Cc: Takashi Iwai, alsa-devel
On Thu, 2006-03-16 at 21:08 +0000, Adrian McMenamin wrote:
> Thanks. My problem is I cannot get the alsa utilities to compile/work
> (they compile but seg fault on use).
It would be useful to debug this now that your driver works...
> Is there a good OSS only app I can
> use to test the basic play stuff?
>
/usr/bin/play. I thought it used to be an independent app but the one I
have seems to be part of sox.
Or just write one in C, it will take you 5 minutes. It's basically cat
file.wav > /dev/dsp and just add ioctls to set the format, sample rate,
etc.
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] 23+ messages in thread
* Re: Couple of questions
2006-03-17 0:16 ` Lee Revell
@ 2006-03-17 10:13 ` Takashi Iwai
2006-03-17 20:27 ` Adrian McMenamin
0 siblings, 1 reply; 23+ messages in thread
From: Takashi Iwai @ 2006-03-17 10:13 UTC (permalink / raw)
To: Lee Revell; +Cc: Adrian McMenamin, alsa-devel
At Thu, 16 Mar 2006 19:16:36 -0500,
Lee Revell wrote:
>
> On Thu, 2006-03-16 at 23:34 +0000, Adrian McMenamin wrote:
> > On Thu, 2006-03-16 at 11:42 +0100, Takashi Iwai wrote:
> > > At Thu, 16 Mar 2006 00:01:11 +0000,
> > > Adrian McMenamin wrote:
> > > >
> > > > If my driver declares this:
> > > >
> > > > .info = (SNDRV_PCM_INFO_NONINTERLEAVED),
> > > >
> > > > Can I expect samples to come in all left followed by all right, or how?
> > >
> > > Yes. It's the non-interleaved format (LLLLLLLL....RRRRRR.....).
> > >
> > Will the middle layer still copy over data in the same period size as
> > for mono in this case?
>
> Yes. One 4 frame period interleaved is LRLRLRLR, non-interleaved
> LLLLRRRR.
The period size is same, but the copy is not done like LLLLRRRR.
As default, the whole buffer is divided to number of channels. For
example, using two channels,
|LLLLLLL..|RRRRRRR....|
|<--- buffer_size --->|
and using six channels,
|1111....|2222....|.....|6666....|
|<-------- buffer_size --------->|
where each channel has a length of (period_size * periods) samples.
Unless the buffer size is changed, this assignment of each channel
also isn't changed.
The above is the default behavior. You can change the assignment as
you like by defining proper copy and silence callback, too. For
mmap, you need to define CHANNEL_INFO ioctl, too.
Takashi
-------------------------------------------------------
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] 23+ messages in thread
* Re: Couple of questions
2006-03-17 10:13 ` Takashi Iwai
@ 2006-03-17 20:27 ` Adrian McMenamin
2006-03-17 20:29 ` Takashi Iwai
0 siblings, 1 reply; 23+ messages in thread
From: Adrian McMenamin @ 2006-03-17 20:27 UTC (permalink / raw)
To: Takashi Iwai; +Cc: Lee Revell, alsa-devel
On Fri, 2006-03-17 at 11:13 +0100, Takashi Iwai wrote:
>
> The period size is same, but the copy is not done like LLLLRRRR.
>
> As default, the whole buffer is divided to number of channels. For
> example, using two channels,
>
> |LLLLLLL..|RRRRRRR....|
> |<--- buffer_size --->|
>
> and using six channels,
>
> |1111....|2222....|.....|6666....|
> |<-------- buffer_size --------->|
>
> where each channel has a length of (period_size * periods) samples.
> Unless the buffer size is changed, this assignment of each channel
> also isn't changed.
>
> The above is the default behavior. You can change the assignment as
> you like by defining proper copy and silence callback, too. For
> mmap, you need to define CHANNEL_INFO ioctl, too.
>
Presumably this is what happens at the start, but when doing a single
period update presumably it is split LLLLRRRR on non interleaved
-------------------------------------------------------
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] 23+ messages in thread
* Re: Couple of questions
2006-03-17 20:27 ` Adrian McMenamin
@ 2006-03-17 20:29 ` Takashi Iwai
2006-03-17 23:29 ` Adrian McMenamin
0 siblings, 1 reply; 23+ messages in thread
From: Takashi Iwai @ 2006-03-17 20:29 UTC (permalink / raw)
To: Adrian McMenamin; +Cc: Lee Revell, alsa-devel
At Fri, 17 Mar 2006 20:27:32 +0000,
Adrian McMenamin wrote:
>
> On Fri, 2006-03-17 at 11:13 +0100, Takashi Iwai wrote:
>
> >
> > The period size is same, but the copy is not done like LLLLRRRR.
> >
> > As default, the whole buffer is divided to number of channels. For
> > example, using two channels,
> >
> > |LLLLLLL..|RRRRRRR....|
> > |<--- buffer_size --->|
> >
> > and using six channels,
> >
> > |1111....|2222....|.....|6666....|
> > |<-------- buffer_size --------->|
> >
> > where each channel has a length of (period_size * periods) samples.
> > Unless the buffer size is changed, this assignment of each channel
> > also isn't changed.
> >
> > The above is the default behavior. You can change the assignment as
> > you like by defining proper copy and silence callback, too. For
> > mmap, you need to define CHANNEL_INFO ioctl, too.
> >
>
> Presumably this is what happens at the start, but when doing a single
> period update presumably it is split LLLLRRRR on non interleaved
No, as I wrote in the above, the assignment of each channel isn't
changed, i.e. the buffer position of each channel remains.
The middle layer handles the whole buffer simply as a bundle of
multiple mono streams.
Takashi
-------------------------------------------------------
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] 23+ messages in thread
* Re: Couple of questions
2006-03-17 20:29 ` Takashi Iwai
@ 2006-03-17 23:29 ` Adrian McMenamin
2006-03-17 23:46 ` Lee Revell
0 siblings, 1 reply; 23+ messages in thread
From: Adrian McMenamin @ 2006-03-17 23:29 UTC (permalink / raw)
To: Takashi Iwai; +Cc: Lee Revell, alsa-devel
On Fri, 2006-03-17 at 21:29 +0100, Takashi Iwai wrote:
> At Fri, 17 Mar 2006 20:27:32 +0000,
> Adrian McMenamin wrote:
> >
> > On Fri, 2006-03-17 at 11:13 +0100, Takashi Iwai wrote:
> >
> > >
> > > The period size is same, but the copy is not done like LLLLRRRR.
> > >
> > > As default, the whole buffer is divided to number of channels. For
> > > example, using two channels,
> > >
> > > |LLLLLLL..|RRRRRRR....|
> > > |<--- buffer_size --->|
> > >
> > > and using six channels,
> > >
> > > |1111....|2222....|.....|6666....|
> > > |<-------- buffer_size --------->|
> > >
> > > where each channel has a length of (period_size * periods) samples.
> > > Unless the buffer size is changed, this assignment of each channel
> > > also isn't changed.
> > >
> > > The above is the default behavior. You can change the assignment as
> > > you like by defining proper copy and silence callback, too. For
> > > mmap, you need to define CHANNEL_INFO ioctl, too.
> > >
> >
> > Presumably this is what happens at the start, but when doing a single
> > period update presumably it is split LLLLRRRR on non interleaved
>
> No, as I wrote in the above, the assignment of each channel isn't
> changed, i.e. the buffer position of each channel remains.
>
> The middle layer handles the whole buffer simply as a bundle of
> multiple mono streams.
>
So, just to be clear. When I am transferring a "period" I should
actually stream half a period's worth of bytes into the channel playing
the left and half a period into the right - and can advance each dma
transfer through the buffer by half a period length on both the left and
the right side of the buffer
-------------------------------------------------------
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] 23+ messages in thread
* Re: Couple of questions
2006-03-17 23:29 ` Adrian McMenamin
@ 2006-03-17 23:46 ` Lee Revell
2006-03-17 23:51 ` Adrian McMenamin
0 siblings, 1 reply; 23+ messages in thread
From: Lee Revell @ 2006-03-17 23:46 UTC (permalink / raw)
To: Adrian McMenamin; +Cc: Takashi Iwai, alsa-devel
On Fri, 2006-03-17 at 23:29 +0000, Adrian McMenamin wrote:
>
> So, just to be clear. When I am transferring a "period" I should
> actually stream half a period's worth of bytes into the channel
> playing
> the left and half a period into the right - and can advance each dma
> transfer through the buffer by half a period length on both the left
> and
> the right side of the buffer
No, one period.
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] 23+ messages in thread
* Re: Couple of questions
2006-03-17 23:46 ` Lee Revell
@ 2006-03-17 23:51 ` Adrian McMenamin
2006-03-17 23:58 ` Lee Revell
0 siblings, 1 reply; 23+ messages in thread
From: Adrian McMenamin @ 2006-03-17 23:51 UTC (permalink / raw)
To: Lee Revell; +Cc: Takashi Iwai, alsa-devel
On Fri, 2006-03-17 at 18:46 -0500, Lee Revell wrote:
> On Fri, 2006-03-17 at 23:29 +0000, Adrian McMenamin wrote:
> >
> > So, just to be clear. When I am transferring a "period" I should
> > actually stream half a period's worth of bytes into the channel
> > playing
> > the left and half a period into the right - and can advance each dma
> > transfer through the buffer by half a period length on both the left
> > and
> > the right side of the buffer
>
> No, one period.
>
How does that work? That would imply that there were half as many
periods in the DMA buffer as specified here...
static snd_pcm_hardware_t snd_pcm_aica_playback_hw = {
.info = (SNDRV_PCM_INFO_NONINTERLEAVED),
.formats =
(SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE |
SNDRV_PCM_FMTBIT_IMA_ADPCM),
.rates = SNDRV_PCM_RATE_8000_48000,
.rate_min = 8000,
.rate_max = 48000,
.channels_min = 2,
.channels_max = 2,
.buffer_bytes_max = AICA_BUFFER_SIZE,
.period_bytes_min = AICA_PERIOD_SIZE,
.period_bytes_max = AICA_PERIOD_SIZE,
.periods_min = AICA_PERIOD_NUMBER,
.periods_max = AICA_PERIOD_NUMBER,
};
As the buffer and period (in bytes) size is constant.
-------------------------------------------------------
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] 23+ messages in thread
* Re: Couple of questions
2006-03-17 23:51 ` Adrian McMenamin
@ 2006-03-17 23:58 ` Lee Revell
2006-03-18 0:08 ` Adrian McMenamin
0 siblings, 1 reply; 23+ messages in thread
From: Lee Revell @ 2006-03-17 23:58 UTC (permalink / raw)
To: Adrian McMenamin; +Cc: Takashi Iwai, alsa-devel
On Fri, 2006-03-17 at 23:51 +0000, Adrian McMenamin wrote:
> On Fri, 2006-03-17 at 18:46 -0500, Lee Revell wrote:
> > On Fri, 2006-03-17 at 23:29 +0000, Adrian McMenamin wrote:
> > >
> > > So, just to be clear. When I am transferring a "period" I should
> > > actually stream half a period's worth of bytes into the channel
> > > playing
> > > the left and half a period into the right - and can advance each dma
> > > transfer through the buffer by half a period length on both the left
> > > and
> > > the right side of the buffer
> >
> > No, one period.
> >
>
>
> How does that work? That would imply that there were half as many
> periods in the DMA buffer as specified here...
>
> static snd_pcm_hardware_t snd_pcm_aica_playback_hw = {
>
> .info = (SNDRV_PCM_INFO_NONINTERLEAVED),
> .formats =
> (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE |
> SNDRV_PCM_FMTBIT_IMA_ADPCM),
> .rates = SNDRV_PCM_RATE_8000_48000,
> .rate_min = 8000,
> .rate_max = 48000,
> .channels_min = 2,
> .channels_max = 2,
> .buffer_bytes_max = AICA_BUFFER_SIZE,
> .period_bytes_min = AICA_PERIOD_SIZE,
> .period_bytes_max = AICA_PERIOD_SIZE,
> .periods_min = AICA_PERIOD_NUMBER,
> .periods_max = AICA_PERIOD_NUMBER,
> };
>
>
> As the buffer and period (in bytes) size is constant.
>
>
That's why the maximum buffer and period is in bytes not frames. Stereo
has twice as many bytes per frame than mono.
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] 23+ messages in thread
* Re: Couple of questions
2006-03-17 23:58 ` Lee Revell
@ 2006-03-18 0:08 ` Adrian McMenamin
2006-03-18 0:17 ` Lee Revell
0 siblings, 1 reply; 23+ messages in thread
From: Adrian McMenamin @ 2006-03-18 0:08 UTC (permalink / raw)
To: Lee Revell; +Cc: Takashi Iwai, alsa-devel
On Fri, 2006-03-17 at 18:58 -0500, Lee Revell wrote:
> On Fri, 2006-03-17 at 23:51 +0000, Adrian McMenamin wrote:
> > On Fri, 2006-03-17 at 18:46 -0500, Lee Revell wrote:
> > > On Fri, 2006-03-17 at 23:29 +0000, Adrian McMenamin wrote:
> > > >
> > > > So, just to be clear. When I am transferring a "period" I should
> > > > actually stream half a period's worth of bytes into the channel
> > > > playing
> > > > the left and half a period into the right - and can advance each dma
> > > > transfer through the buffer by half a period length on both the left
> > > > and
> > > > the right side of the buffer
> > >
> > > No, one period.
> > >
> >
> >
> > How does that work? That would imply that there were half as many
> > periods in the DMA buffer as specified here...
> >
> > static snd_pcm_hardware_t snd_pcm_aica_playback_hw = {
> >
> > .info = (SNDRV_PCM_INFO_NONINTERLEAVED),
> > .formats =
> > (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE |
> > SNDRV_PCM_FMTBIT_IMA_ADPCM),
> > .rates = SNDRV_PCM_RATE_8000_48000,
> > .rate_min = 8000,
> > .rate_max = 48000,
> > .channels_min = 2,
> > .channels_max = 2,
> > .buffer_bytes_max = AICA_BUFFER_SIZE,
> > .period_bytes_min = AICA_PERIOD_SIZE,
> > .period_bytes_max = AICA_PERIOD_SIZE,
> > .periods_min = AICA_PERIOD_NUMBER,
> > .periods_max = AICA_PERIOD_NUMBER,
> > };
> >
> >
> > As the buffer and period (in bytes) size is constant.
> >
> >
>
> That's why the maximum buffer and period is in bytes not frames. Stereo
> has twice as many bytes per frame than mono.
Err...yes :)
I am still confused though. In mono, every time a period is played a new
period is loaded into the DMA buffer and then transferred into the
hardware's buffer.
How does this work now - wait for one period to play on the left (or
right) channel and then transfer one period's worth on the left and
right channel (ie ALSA fills the buffer up with 2 periods at a go in
stereo) or transfer half a period's worth on each channel but move the
copy pointer on a full period (ie ALSA transfers just one period's worth
which translates as half a period in either channel)
-------------------------------------------------------
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] 23+ messages in thread
* Re: Couple of questions
2006-03-18 0:08 ` Adrian McMenamin
@ 2006-03-18 0:17 ` Lee Revell
2006-03-18 0:22 ` Adrian McMenamin
0 siblings, 1 reply; 23+ messages in thread
From: Lee Revell @ 2006-03-18 0:17 UTC (permalink / raw)
To: Adrian McMenamin; +Cc: Takashi Iwai, alsa-devel
On Sat, 2006-03-18 at 00:08 +0000, Adrian McMenamin wrote:
> On Fri, 2006-03-17 at 18:58 -0500, Lee Revell wrote:
> > On Fri, 2006-03-17 at 23:51 +0000, Adrian McMenamin wrote:
> > > On Fri, 2006-03-17 at 18:46 -0500, Lee Revell wrote:
> > > > On Fri, 2006-03-17 at 23:29 +0000, Adrian McMenamin wrote:
> > > > >
> > > > > So, just to be clear. When I am transferring a "period" I should
> > > > > actually stream half a period's worth of bytes into the channel
> > > > > playing
> > > > > the left and half a period into the right - and can advance each dma
> > > > > transfer through the buffer by half a period length on both the left
> > > > > and
> > > > > the right side of the buffer
> > > >
> > > > No, one period.
> > > >
> > >
> > >
> > > How does that work? That would imply that there were half as many
> > > periods in the DMA buffer as specified here...
> > >
> > > static snd_pcm_hardware_t snd_pcm_aica_playback_hw = {
> > >
> > > .info = (SNDRV_PCM_INFO_NONINTERLEAVED),
> > > .formats =
> > > (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE |
> > > SNDRV_PCM_FMTBIT_IMA_ADPCM),
> > > .rates = SNDRV_PCM_RATE_8000_48000,
> > > .rate_min = 8000,
> > > .rate_max = 48000,
> > > .channels_min = 2,
> > > .channels_max = 2,
> > > .buffer_bytes_max = AICA_BUFFER_SIZE,
> > > .period_bytes_min = AICA_PERIOD_SIZE,
> > > .period_bytes_max = AICA_PERIOD_SIZE,
> > > .periods_min = AICA_PERIOD_NUMBER,
> > > .periods_max = AICA_PERIOD_NUMBER,
> > > };
> > >
> > >
> > > As the buffer and period (in bytes) size is constant.
> > >
> > >
> >
> > That's why the maximum buffer and period is in bytes not frames. Stereo
> > has twice as many bytes per frame than mono.
>
>
>
> Err...yes :)
>
> I am still confused though. In mono, every time a period is played a new
> period is loaded into the DMA buffer and then transferred into the
> hardware's buffer.
>
> How does this work now - wait for one period to play on the left (or
> right) channel and then transfer one period's worth on the left and
> right channel (ie ALSA fills the buffer up with 2 periods at a go in
> stereo) or transfer half a period's worth on each channel but move the
> copy pointer on a full period (ie ALSA transfers just one period's worth
> which translates as half a period in either channel)
>
>
Maybe I'm misunderstanding but...
You wait for one period to play in both channels then transfer one
period for the left channel and one period for the right. So each DMA
transfer moves twice as much data as the mono case.
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] 23+ messages in thread
* Re: Couple of questions
2006-03-18 0:17 ` Lee Revell
@ 2006-03-18 0:22 ` Adrian McMenamin
0 siblings, 0 replies; 23+ messages in thread
From: Adrian McMenamin @ 2006-03-18 0:22 UTC (permalink / raw)
To: Lee Revell; +Cc: Takashi Iwai, alsa-devel
On Fri, 2006-03-17 at 19:17 -0500, Lee Revell wrote:
> Maybe I'm misunderstanding but...
>
> You wait for one period to play in both channels then transfer one
> period for the left channel and one period for the right. So each DMA
> transfer moves twice as much data as the mono case.
>
> Lee
Ah, much clearer now. 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] 23+ messages in thread
* Re: Couple of questions
2006-03-16 10:42 ` Takashi Iwai
2006-03-16 21:08 ` Adrian McMenamin
2006-03-16 23:34 ` Adrian McMenamin
@ 2006-03-18 11:08 ` Adrian McMenamin
2006-03-20 18:11 ` Carlos Munoz
2 siblings, 1 reply; 23+ messages in thread
From: Adrian McMenamin @ 2006-03-18 11:08 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
On Thu, 2006-03-16 at 11:42 +0100, Takashi Iwai wrote:
> At Thu, 16 Mar 2006 00:01:11 +0000,
> Adrian McMenamin wrote:
> >
> > If my driver declares this:
> >
> > .info = (SNDRV_PCM_INFO_NONINTERLEAVED),
> >
> > Can I expect samples to come in all left followed by all right, or how?
>
> Yes. It's the non-interleaved format (LLLLLLLL....RRRRRR.....).
>
> > And will cat somefile.wav > /dev/dsp using oss emulation respect that?
>
> Yes.
Are you sure about this bit? Either my code is extremely broken or cat
isn't doing anything other than pump the bytes in as a simple stream
-------------------------------------------------------
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] 23+ messages in thread
* Re: Couple of questions
2006-03-18 11:08 ` Adrian McMenamin
@ 2006-03-20 18:11 ` Carlos Munoz
0 siblings, 0 replies; 23+ messages in thread
From: Carlos Munoz @ 2006-03-20 18:11 UTC (permalink / raw)
To: Adrian McMenamin; +Cc: Takashi Iwai, alsa-devel
Adrian McMenamin wrote:
>On Thu, 2006-03-16 at 11:42 +0100, Takashi Iwai wrote:
>
>
>>At Thu, 16 Mar 2006 00:01:11 +0000,
>>Adrian McMenamin wrote:
>>
>>
>>>If my driver declares this:
>>>
>>> .info = (SNDRV_PCM_INFO_NONINTERLEAVED),
>>>
>>>Can I expect samples to come in all left followed by all right, or how?
>>>
>>>
>>Yes. It's the non-interleaved format (LLLLLLLL....RRRRRR.....).
>>
>>
>>
>>>And will cat somefile.wav > /dev/dsp using oss emulation respect that?
>>>
>>>
>>Yes.
>>
>>
>
>
>Are you sure about this bit? Either my code is extremely broken or cat
>isn't doing anything other than pump the bytes in as a simple stream
>
>
Hi Adrian,
If I cat a wav file to /dev/dsp I just hear noise. However, if the
driver opens/reads the same wav file (bypassing the alsa layer) and
feeds it to the hardware I get perfect sound. Your may want to try that
to validate your driver and hardware. You might need to parse the file
into RL buffers as you read it.
Carlos
-------------------------------------------------------
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] 23+ messages in thread
* Couple of questions.
@ 2011-04-09 16:14 Brad Campbell
2011-04-09 23:17 ` Roman Mamedov
2011-04-10 8:02 ` NeilBrown
0 siblings, 2 replies; 23+ messages in thread
From: Brad Campbell @ 2011-04-09 16:14 UTC (permalink / raw)
To: linux-raid
1 - When adding 2 missing disks to a RAID-6 (let's say a 4 drive RAID-6
that was created with only 2 disks initally) why does it sync the first,
then sync the second rather than doing both together?
ie mdadm --add /dev/md0 /dev/sd[ab]
2 - If a drive disappears how do I remove it from an array.
Let's say I have a 10 drive RAID-6 that has an odd error on a disk.
The disk goes away (sdl), the disk comes back as sdq as md is still
hanging on to the name sdl. I add sdq to the array, but I can't remove
sdl as it physically no longer exists. udev has removed the device node
and mdadm can't remove it from the array as it can't tell what it was.
Like this :
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
md0 : active raid6 sdq[10] sdc[0] sdd[6] sdl[1](F) sdh[9] sda[8] sde[7]
sdg[5] sdb[4] sdf[3] sdm[2]
7814078464 blocks super 1.2 level 6, 64k chunk, algorithm 2
[10/10] [UUUUUUUUUU]
Nothing urgent, just musings after the last weeks oddities.
Regards,
Brad
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Couple of questions.
2011-04-09 16:14 Brad Campbell
@ 2011-04-09 23:17 ` Roman Mamedov
2011-04-10 8:02 ` NeilBrown
1 sibling, 0 replies; 23+ messages in thread
From: Roman Mamedov @ 2011-04-09 23:17 UTC (permalink / raw)
To: Brad Campbell; +Cc: linux-raid
[-- Attachment #1: Type: text/plain, Size: 664 bytes --]
On Sun, 10 Apr 2011 00:14:56 +0800
Brad Campbell <lists2009@fnarfbargle.com> wrote:
> 2 - If a drive disappears how do I remove it from an array.
> Let's say I have a 10 drive RAID-6 that has an odd error on a disk.
> The disk goes away (sdl), the disk comes back as sdq as md is still
> hanging on to the name sdl. I add sdq to the array, but I can't remove
> sdl as it physically no longer exists. udev has removed the device node
> and mdadm can't remove it from the array as it can't tell what it was.
Hello,
See man mdadm and search for "detached". Just noticed that today while looking
for something else.
--
With respect,
Roman
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Couple of questions.
2011-04-09 16:14 Brad Campbell
2011-04-09 23:17 ` Roman Mamedov
@ 2011-04-10 8:02 ` NeilBrown
1 sibling, 0 replies; 23+ messages in thread
From: NeilBrown @ 2011-04-10 8:02 UTC (permalink / raw)
To: Brad Campbell; +Cc: linux-raid
On Sun, 10 Apr 2011 00:14:56 +0800 Brad Campbell <lists2009@fnarfbargle.com>
wrote:
> 1 - When adding 2 missing disks to a RAID-6 (let's say a 4 drive RAID-6
> that was created with only 2 disks initally) why does it sync the first,
> then sync the second rather than doing both together?
> ie mdadm --add /dev/md0 /dev/sd[ab]
Because the devices are added one at a time and between the moment when sda
is added and when sdb is added a recovery starts.
mdadm should write 'frozen' the 'sync_action' before adding the devices, and
then 'idle' after adding them both. But it doesn't yet.
You could...
echo frozen > /sys/block/md0/md/sync_action
mdadm /dev/md0 --add /dev/sd[ab]
echo idle > /sys/block/md0/md/sync_action
NeilBrown
>
> 2 - If a drive disappears how do I remove it from an array.
> Let's say I have a 10 drive RAID-6 that has an odd error on a disk.
> The disk goes away (sdl), the disk comes back as sdq as md is still
> hanging on to the name sdl. I add sdq to the array, but I can't remove
> sdl as it physically no longer exists. udev has removed the device node
> and mdadm can't remove it from the array as it can't tell what it was.
>
> Like this :
> Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
> md0 : active raid6 sdq[10] sdc[0] sdd[6] sdl[1](F) sdh[9] sda[8] sde[7]
> sdg[5] sdb[4] sdf[3] sdm[2]
> 7814078464 blocks super 1.2 level 6, 64k chunk, algorithm 2
> [10/10] [UUUUUUUUUU]
>
> Nothing urgent, just musings after the last weeks oddities.
>
> Regards,
> Brad
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2011-04-10 8:02 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-16 0:01 Couple of questions Adrian McMenamin
2006-03-16 10:42 ` Takashi Iwai
2006-03-16 21:08 ` Adrian McMenamin
2006-03-17 0:10 ` Carlos Munoz
2006-03-17 0:20 ` Lee Revell
2006-03-16 23:34 ` Adrian McMenamin
2006-03-17 0:16 ` Lee Revell
2006-03-17 10:13 ` Takashi Iwai
2006-03-17 20:27 ` Adrian McMenamin
2006-03-17 20:29 ` Takashi Iwai
2006-03-17 23:29 ` Adrian McMenamin
2006-03-17 23:46 ` Lee Revell
2006-03-17 23:51 ` Adrian McMenamin
2006-03-17 23:58 ` Lee Revell
2006-03-18 0:08 ` Adrian McMenamin
2006-03-18 0:17 ` Lee Revell
2006-03-18 0:22 ` Adrian McMenamin
2006-03-18 11:08 ` Adrian McMenamin
2006-03-20 18:11 ` Carlos Munoz
-- strict thread matches above, loose matches on Subject: below --
2011-04-09 16:14 Brad Campbell
2011-04-09 23:17 ` Roman Mamedov
2011-04-10 8:02 ` NeilBrown
1998-03-20 18:39 couple " Nick Verhaegen
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.