* Best way of adding temporary limits to capture or playback
@ 2006-05-15 8:38 Hans-Christian Egtvedt
0 siblings, 0 replies; 6+ messages in thread
From: Hans-Christian Egtvedt @ 2006-05-15 8:38 UTC (permalink / raw)
To: alsa-devel; +Cc: Hans-Christian Egtvedt
Hello
My AC97 controller has a limit when doing capture/playback in full
duplex, the bitrate and endianess has to be the same for both streams
(playback/capture). Is there a nice and easy way to set this limit?
My current plan is to change the hardware parameters in the playback
open and capture open callbacks if there is an active playback or
capture already present. And then reset this hardware limit when the
close callback is called.
I would of course enjoy just setting a flag in the driver telling it
that capture and playback rates/endianess is related, and is locked if
one of the streams is opened.
PS! I'm having some sort of problems getting my emails from this lists,
seems like I don't get a copy anymore :/ I've checked the settings in
mailman, and they seem good.
--
With kind regards,
Med vennlig hilsen,
Hans-Christian Egtvedt
Applications Engineer - AVR Applications Lab
Atmel Norway
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
^ permalink raw reply [flat|nested] 6+ messages in thread
* Best way of adding temporary limits to capture or playback
@ 2006-05-15 12:51 Hans-Christian Egtvedt
0 siblings, 0 replies; 6+ messages in thread
From: Hans-Christian Egtvedt @ 2006-05-15 12:51 UTC (permalink / raw)
To: alsa-devel; +Cc: Hans-Christian Egtvedt
Hello
My AC97 controller has a limit when doing capture/playback in full
duplex, the bitrate and endianess has to be the same for both streams
(playback/capture). Is there a nice and easy way to set this limit?
My current plan is to change the hardware parameters in the playback
open and capture open callbacks if there is an active playback or
capture already present. And then reset this hardware limit when the
close callback is called.
I would of course enjoy just setting a flag in the driver telling it
that capture and playback rates/endianess is related, and is locked if
one of the streams is opened.
PS! I'm having some sort of problems getting my emails from this lists,
seems like I don't get a copy anymore :/ I've checked the settings in
mailman, and they seem good.
PPS! Sorry if this is received twice, but I didn't receive a copy or
find a copy in an online repository.
--
With kind regards,
Med vennlig hilsen,
Hans-Christian Egtvedt
Applications Engineer - AVR Applications Lab
Atmel Norway
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
^ permalink raw reply [flat|nested] 6+ messages in thread
* Best way of adding temporary limits to capture or playback
@ 2006-05-16 5:54 Hans-Christian Egtvedt
2006-05-16 10:31 ` Takashi Iwai
0 siblings, 1 reply; 6+ messages in thread
From: Hans-Christian Egtvedt @ 2006-05-16 5:54 UTC (permalink / raw)
To: alsa-devel; +Cc: Hans-Christian Egtvedt
Hello
My AC97 controller has a limit when doing capture/playback in full
duplex, the bitrate and endianess has to be the same for both streams
(playback/capture). Is there a nice and easy way to set this limit?
My current plan is to change the hardware parameters in the playback
open and capture open callbacks if there is an active playback or
capture already present. And then reset this hardware limit when the
close callback is called.
I would of course enjoy just setting a flag in the driver telling it
that capture and playback rates/endianess is related, and is locked if
one of the streams is opened.
PS! I'm having some sort of problems getting my emails from this lists,
seems like I don't get a copy anymore :/ I've checked the settings in
mailman, and they seem good.
PPS! Sorry if this is received twice, but I didn't receive a copy or
find a copy in an online repository (twice).
--
With kind regards,
Med vennlig hilsen,
Hans-Christian Egtvedt
Applications Engineer - AVR Applications Lab
Atmel Norway
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Best way of adding temporary limits to capture or playback
2006-05-16 5:54 Hans-Christian Egtvedt
@ 2006-05-16 10:31 ` Takashi Iwai
2006-05-16 10:43 ` Hans-Christian Egtvedt
0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2006-05-16 10:31 UTC (permalink / raw)
To: Hans-Christian Egtvedt; +Cc: alsa-devel
At Tue, 16 May 2006 07:54:16 +0200,
Hans-Christian Egtvedt wrote:
>
> Hello
>
> My AC97 controller has a limit when doing capture/playback in full
> duplex, the bitrate and endianess has to be the same for both streams
> (playback/capture). Is there a nice and easy way to set this limit?
No good helper is provided.
> My current plan is to change the hardware parameters in the playback
> open and capture open callbacks if there is an active playback or
> capture already present. And then reset this hardware limit when the
> close callback is called.
Right, that's what other drivers do, too.
> I would of course enjoy just setting a flag in the driver telling it
> that capture and playback rates/endianess is related, and is locked if
> one of the streams is opened.
We have SNDRV_PCM_INFO_JOINT_DUPLEX flag, but it's only a referrence
to user-space and not really used in the driver.
> PS! I'm having some sort of problems getting my emails from this lists,
> seems like I don't get a copy anymore :/ I've checked the settings in
> mailman, and they seem good.
>
> PPS! Sorry if this is received twice, but I didn't receive a copy or
> find a copy in an online repository (twice).
I saw your post only once.
Takashi
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Best way of adding temporary limits to capture or playback
2006-05-16 10:31 ` Takashi Iwai
@ 2006-05-16 10:43 ` Hans-Christian Egtvedt
2006-05-17 9:42 ` Takashi Iwai
0 siblings, 1 reply; 6+ messages in thread
From: Hans-Christian Egtvedt @ 2006-05-16 10:43 UTC (permalink / raw)
To: Takashi Iwai; +Cc: Hans-Christian Egtvedt, alsa-devel
Takashi Iwai wrote:
> At Tue, 16 May 2006 07:54:16 +0200,
> Hans-Christian Egtvedt wrote:
<snip helper functions wish>
>> My current plan is to change the hardware parameters in the playback
>> open and capture open callbacks if there is an active playback or
>> capture already present. And then reset this hardware limit when the
>> close callback is called.
>
> Right, that's what other drivers do, too.
I've added restrictions to format and rate in the open callback. Is it
safe to just do changes here and ignore them in the close callback?
AFAIK when the open callback is called again, for a later stream the
original driver formats and rates will be loaded?
I.e. the driver does not remember that sometime in the past it was
limited to a certain hardware setup?
>> I would of course enjoy just setting a flag in the driver telling it
>> that capture and playback rates/endianess is related, and is locked if
>> one of the streams is opened.
>
> We have SNDRV_PCM_INFO_JOINT_DUPLEX flag, but it's only a referrence
> to user-space and not really used in the driver.
Added, should be present anyway so user-space is aware of the dependencies.
>> PS! I'm having some sort of problems getting my emails from this lists,
>> seems like I don't get a copy anymore :/ I've checked the settings in
>> mailman, and they seem good.
>>
>> PPS! Sorry if this is received twice, but I didn't receive a copy or
>> find a copy in an online repository (twice).
>
> I saw your post only once.
Seems like I'm not getting all emails for some reason, I've subscribed
with another account too for verifying my emails are getting through.
Could be a local, short time problem for this address.
--
With kind regards,
Med vennlig hilsen,
Hans-Christian Egtvedt
Applications Engineer - AVR Applications Lab
Atmel Norway
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Best way of adding temporary limits to capture or playback
2006-05-16 10:43 ` Hans-Christian Egtvedt
@ 2006-05-17 9:42 ` Takashi Iwai
0 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2006-05-17 9:42 UTC (permalink / raw)
To: Hans-Christian Egtvedt; +Cc: Hans-Christian Egtvedt, alsa-devel
At Tue, 16 May 2006 12:43:55 +0200,
Hans-Christian Egtvedt wrote:
>
> Takashi Iwai wrote:
> > At Tue, 16 May 2006 07:54:16 +0200,
> > Hans-Christian Egtvedt wrote:
>
> <snip helper functions wish>
>
> >> My current plan is to change the hardware parameters in the playback
> >> open and capture open callbacks if there is an active playback or
> >> capture already present. And then reset this hardware limit when the
> >> close callback is called.
> >
> > Right, that's what other drivers do, too.
>
> I've added restrictions to format and rate in the open callback. Is it
> safe to just do changes here and ignore them in the close callback?
>
> AFAIK when the open callback is called again, for a later stream the
> original driver formats and rates will be loaded?
>
> I.e. the driver does not remember that sometime in the past it was
> limited to a certain hardware setup?
Well, we have a couple of different implementations. In any way, the
driver keeps the (global) current rate and format.
For example,
A) Make mixer or PCM control elements for the current rate and format,
and pcm open just copies that value. You need to keep both the
value being used (when a stream is actually opened) and the value
to be set at the next open (the control element value).
B) Initialize the current rate and format to unknown (free) state.
The first hw_params sets the format and rate. When another stream
is opened at the same time, open callback copies this restriction.
The rate and format is then reset to uknown state when all streams
are closed again.
Takashi
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-05-17 9:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-15 12:51 Best way of adding temporary limits to capture or playback Hans-Christian Egtvedt
-- strict thread matches above, loose matches on Subject: below --
2006-05-16 5:54 Hans-Christian Egtvedt
2006-05-16 10:31 ` Takashi Iwai
2006-05-16 10:43 ` Hans-Christian Egtvedt
2006-05-17 9:42 ` Takashi Iwai
2006-05-15 8:38 Hans-Christian Egtvedt
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.