All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	Mark Brown <broonie@kernel.org>,
	Linux Upstreaming Team <linux@endlessm.com>,
	General PulseAudio Discussion
	<pulseaudio-discuss@lists.freedesktop.org>,
	"han.lu" <han.lu@linux.intel.com>
Subject: Re: ASoC and pulseaudio
Date: Tue, 15 Mar 2016 10:56:39 +0100	[thread overview]
Message-ID: <s5h8u1kgj3c.wl-tiwai@suse.de> (raw)
In-Reply-To: <1458035331.8522.52.camel@loki>

On Tue, 15 Mar 2016 10:48:51 +0100,
Liam Girdwood wrote:
> 
> On Tue, 2016-03-15 at 09:55 +0100, Takashi Iwai wrote:
> > On Tue, 15 Mar 2016 09:45:44 +0100,
> > Mark Brown wrote:
> > > 
> > > On Tue, Mar 15, 2016 at 06:01:28AM +0000, Liam Girdwood wrote:
> > > 
> > > > 1) Shortname is board/machine name. This can come from DMI or device
> > > > tree. e.g. "Asus T100"
> > > 
> > > That seems more useful for users.
> > > 
> > > > 2) Long name is 1 + driver name + optional firmware name. (I've just
> > > > added the FW name here too as we can have potentially > 1 FW per driver
> > > > - BYT is an example) e.g. "Asus T00: byt-rt5640: IntSST1.bin".
> > > 
> > > Shouldn't we use whatever we use to figure out which firmware to load
> > > rather than the firmware name?  Someone might do something like try to
> > > replace one firmware with another and get everything confused.
> > 
> 
> This is not to load FW for our use case, the FW name is hard coded in
> driver tables. We do have several FWs for the BYT driver that all have
> different capabilities. Userspace could set the correct config for each
> FW if it knew the FW that was being used.
> 
> > I agree that a consistent name would be better.  Though, practically
> > seen, the long name isn't persistent with many drivers, as it often
> > contains the irq or port numbers that are assigned dynamically.  That
> > said, the consistency of long name isn't strictly required.  It's
> > regarded rather as a verbose information to user, which shouldn't be
> > used as an identifier key.
> > 
> > OTOH, the driver name is the primary id key used by alsa-lib for its
> > configuration.  So this must be retained through versions and unique
> > for each configuration.
> > 
> 
> Ok, so we probably need to add in the board/machine name here (from DMI
> or DT). We currently have several x86 machines all using the same codec
> + DSP + FW, but all have slightly different clocking and routing that is
> causing problems as userspace cannot configure correctly. 
> 
> > The short name is something between them.  The alsa-lib USB-audio
> > config file refers to the short name because the driver doesn't
> > provide a unique id for driver_name for various workarounds.  But it
> > should be considered as an exception.  Ideally, driver_name should be
> > unique enough for each different configuration.
> 
> So IIUC this would mean ?
> 
> 1) short name is optional, but could be board name.

Right.

> 2) long name is driver_name plus any other optional information for the
> user. Not used by applications or alsa-lib to determine sound card
> capabilities.

In most cases, long name is short name + more optional information.

> 3) Driver name is unique. machine driver name + (optional) board name +
> (optional) fw name. e.g. "byt-rt5640: Asus T100: IntSST1.bin" used by
> alsa-lib and userspace to determine sound card and set config.

But, beware that driver name is fairly short, it's a 16 bytes string.
The short name is 32 bytes and long name is 80 bytes.  Thus, you need
a special care to provide a unique driver name.


Takashi
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

  reply	other threads:[~2016-03-15  9:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAL9uMOHRjcCJomr6zzR0ySh384AVj1FRvASZSp3KsPqfeS8Lzw@mail.gmail.com>
     [not found] ` <56C8AEFD.4060808@linux.intel.com>
     [not found]   ` <1456225994.6424.35.camel@loki>
     [not found]     ` <B51200AC81AB024499A3C2C9A1BB90A83D3AABF9@SHSMSX101.ccr.corp.intel.com>
2016-03-14  8:19       ` ASoC and pulseaudio Liam Girdwood
2016-03-14 15:23         ` [alsa-devel] " Pierre-Louis Bossart
2016-03-14 16:06         ` Mark Brown
2016-03-15  6:01           ` Liam Girdwood
2016-03-15  8:45             ` Mark Brown
2016-03-15  8:55               ` Takashi Iwai
2016-03-15  9:48                 ` Liam Girdwood
2016-03-15  9:56                   ` Takashi Iwai [this message]
2016-03-15 10:58                     ` Liam Girdwood
2016-03-16 14:57                       ` [pulseaudio-discuss] " Vinod Koul
2016-03-16 15:09                         ` [alsa-devel] " Mark Brown
2016-03-16 15:17                           ` Takashi Iwai
2016-03-16 15:53                             ` [pulseaudio-discuss] " Vinod Koul
2016-03-16 17:59                               ` [alsa-devel] " Liam Girdwood
2016-03-17 11:23                                 ` [pulseaudio-discuss] " Lu, Han
2016-03-17 11:28                                 ` [alsa-devel] " Lu, Han
2016-03-17 16:29                                   ` Vinod Koul
2016-03-16 17:58                             ` Liam Girdwood
2016-03-16 17:57                         ` Liam Girdwood
2016-03-15 10:00                   ` Mark Brown
2016-03-15 10:48                     ` [alsa-devel] " Liam Girdwood

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=s5h8u1kgj3c.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=han.lu@linux.intel.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux@endlessm.com \
    --cc=pulseaudio-discuss@lists.freedesktop.org \
    /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 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.