Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "Harsha, Priya" <priya.harsha@intel.com>
Cc: Clemens Ladisch <clemens@ladisch.de>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	Lee Revell <rlrevell@joe-job.com>,
	David Dillow <dave@thedillows.org>
Subject: Re: question on hardware
Date: Fri, 17 Apr 2009 15:36:10 +0200	[thread overview]
Message-ID: <s5htz4nv1v9.wl%tiwai@suse.de> (raw)
In-Reply-To: <98769532B4BB14429434178695419EAE447BAE35@bgsmsx501.gar.corp.intel.com>

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@alsa-project.org [mailto:alsa-devel-bounces@alsa-project.org] On Behalf Of Harsha,
> >Priya
> >Sent: Thursday, April 09, 2009 1:07 PM
> >To: alsa-devel@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@thedillows.org]
> >>Sent: Tuesday, December 09, 2008 6:14 PM
> >>To: Harsha, Priya
> >>Cc: Clemens Ladisch; alsa-devel@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@alsa-project.org
> >http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 

  reply	other threads:[~2009-04-17 13:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-05 16:53 [PATCH 0/2] ASoC updates Mark Brown
2008-12-05 16:54 ` [PATCH 1/2] ASoC: Add support for OMAP3 Pandora Mark Brown
2008-12-05 16:54   ` [PATCH 2/2] ASoC: tlv320aic3x: control additions and cleanups Mark Brown
2008-12-05 17:03   ` question on hardware mixing Harsha, Priya
2008-12-05 17:12     ` Vedran Miletić
2008-12-05 17:26       ` Harsha, Priya
2008-12-06  4:58     ` Lee Revell
2008-12-06  6:56       ` Harsha, Priya
2008-12-09  3:15         ` Lee Revell
2008-12-09  3:24           ` Harsha, Priya
2008-12-09  3:26           ` Harsha, Priya
2008-12-09  8:52         ` Clemens Ladisch
2008-12-09  8:55           ` Harsha, Priya
2008-12-09 12:44             ` David Dillow
2009-04-09  7:36               ` question on hardware Harsha, Priya
2009-04-09  7:56                 ` Harsha, Priya
2009-04-17 13:36                   ` Takashi Iwai [this message]
2008-12-09 14:06             ` question on hardware mixing Clemens Ladisch
2008-12-09 17:04               ` Harsha, Priya
2009-05-07 14:35               ` Harsha, Priya
2008-12-05 17:09 ` [PATCH 0/2] ASoC updates Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5htz4nv1v9.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=dave@thedillows.org \
    --cc=priya.harsha@intel.com \
    --cc=rlrevell@joe-job.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox