[alsa-devel] question on hardware

Takashi Iwai tiwai at suse.de
Fri Apr 17 15:36:10 CEST 2009


At Thu, 9 Apr 2009 13:26:50 +0530,
Harsha, Priya wrote:
> 
> The issue that I am facing with creating a snd_kcontrol is that I am
> not able to bind that value to a stream.

Why?

> Say I start the application
> and set the type of that control to voice and open another instance
> of that application and set the type to audio.

Another instance must have a different stream, right?  Then it must
have a different substream number.  In the scenario a la emu10k1,
you'll have a control per each substream.  So this won't conflict.

> There might be a
> clash and I might get the wrong stream type to the driver. Also, the
> stream ids passed cannot also be guaranteed to reach the right
> stream. 

The "stream id" you are referring to might be different from what I'm
thinking of.  Please elaborate your terminology before further
questions.  It's a bit hard to illustrate your use-case from your
descriptions, so far...


thanks,

Takashi

> 
> 
> >-----Original Message-----
> >From: alsa-devel-bounces at alsa-project.org [mailto:alsa-devel-bounces at alsa-project.org] On Behalf Of Harsha,
> >Priya
> >Sent: Thursday, April 09, 2009 1:07 PM
> >To: alsa-devel at alsa-project.org
> >Cc: Takashi Iwai; David Dillow; Lee Revell; Clemens Ladisch
> >Subject: Re: [alsa-devel] question on hardware
> >
> >Hi ,
> >
> >I need more help here. I tried looking at the .conf file but I have another requirement here.
> >
> >Let me put my requirements here. Please suggest me ways to get this done
> >
> >1. When I get a .prepare call in my driver, I need to know the stream type
> >2. When I return from that call, I need to send to the user the locally allocated stream id
> >
> >This is specific to the sound card/ DSP I am developing the driver for. The application is also proprietary.  Is this
> >possible at all? Please suggest me ways to do the same.
> >
> >Thanks,
> >Harsha
> >
> >>-----Original Message-----
> >>From: David Dillow [mailto:dave at thedillows.org]
> >>Sent: Tuesday, December 09, 2008 6:14 PM
> >>To: Harsha, Priya
> >>Cc: Clemens Ladisch; alsa-devel at alsa-project.org; Lee Revell
> >>Subject: Re: [alsa-devel] question on hardware mixing
> >>
> >>On Tue, 2008-12-09 at 14:25 +0530, Harsha, Priya wrote:
> >>> If I define mixer controls to switch between each substream, I would
> >>> not be able to handle multiple streams at time....
> >>
> >>Check into the ALSA configuration file syntax -- there are number of
> >>things you can do there, like define a 'voice' device that uses hooks to
> >>set a control setting (snd_kcontrol) when you open a PCM. You can use
> >>that control setting to let your driver know if the PCM channel is being
> >>used for voice or audio traffic.
> >>
> >>Look at how the EMU10K1 handles surround sound audio
> >>in /etc/alsa/cards/EMU10K1.conf
> >>
> >>I started to do some similar things for sis7019 surround sound, but
> >>they've never made it out of my office due to lack of time/testing HW.
> >>
> >>> I had asked this in my earlier follow up email as well - can I use
> >>> snd_pcm_t->private_data to communicate if it's a voice or audio
> >>> I understand this private_data gets copied to substream->private data
> >>> which will reach the driver...
> >>> Am I right here?
> >>
> >>I can't answer this specifically, but I believe the answer is in the
> >>name -- 'private'. This is for the ALSA system to use, you can hang your
> >>own data off a substream using snd_pcm_substream_chip(). Besides, how do
> >>you plan on setting it in the snd_pcm_t type?
> >>
> >>I think that if you set up some controls, use the config file language,
> >>and have your audio apps open a 'voice' device, you can get where you
> >>want.
> >>
> >>Dave
> >
> >_______________________________________________
> >Alsa-devel mailing list
> >Alsa-devel at alsa-project.org
> >http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 


More information about the Alsa-devel mailing list