Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Wu Fengguang <wfg@linux.intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel <alsa-devel@alsa-project.org>
Subject: Re: [RFC][PATCH] ELD routines and proc interface
Date: Fri, 14 Nov 2008 15:38:56 +0800	[thread overview]
Message-ID: <1226648341.561038.5360@de> (raw)
In-Reply-To: <s5h3ahulqf4.wl%tiwai@suse.de>

On Fri, Nov 14, 2008 at 08:25:51AM +0100, Takashi Iwai wrote:
> At Fri, 14 Nov 2008 09:34:32 +0800,
> Wu Fengguang wrote:
> > 
> > > > - How do we name the proc file?
> > > >   If there are going to be two HDMI pins per codec, then the current naming
> > > >   scheme (eld#<codec no>) will fail.
> > > 
> > > In theory, yes, but I don't think this would happen.
> > > If this is needed, the currently existing codec#* proc must be fixed,
> > > too.  So, we can use eld#codec as the simplest way.
> > 
> > I mean one HDMI codec equipped with two output converters and two HDMI pins.
> > In this case there could be two HDMI sinks mapped to one single codec.
> > 
> > Or it would be trivial to do the rename in the future anyway?
> 
> Ah, OK, understood.  One easy solution is to name the proc file with
> either pin of audio-out widget NID.
> 
> But I'm not sure whether it's worth.  The proc file naming isn't
> strict, so I'd leave it as is.

OK, I'll leave it as is: there should be no many dependencies on it.

> > > > --- /dev/null
> > > > +++ sound-2.6/sound/pci/hda/hda_eld.c
> > > > +static inline unsigned char grab_bits(const unsigned char *buf,
> > > > +						int byte, int lowbit, int bits)
> > > > +{
> > > > +	BUG_ON(lowbit > 7);
> > > > +	BUG_ON(bits > 8);
> > > > +	BUG_ON(bits <= 0);
> > > 
> > > Can it be rather BUILD_BUG_ON(), BTW?
> > > Or, hmm, doesn't work if it's an inline function?
> > 
> > Yes, converted to BUILD_BUG_ON() and it compiles OK.
> 
> The question is whether this really triggers the build error
> properly.  Could you check it, simply by changing the caller of
> grab_bits() with some invalid values?  Then you should get a compile
> error.

BUILD_BUG_ON() won't emit errors! So use BUG_ON()?

Thank you,
Fengguang

  reply	other threads:[~2008-11-14  7:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-13  2:21 [RFC][PATCH] ELD routines and proc interface Wu Fengguang
2008-11-13  7:26 ` Takashi Iwai
2008-11-14  1:34   ` Wu Fengguang
2008-11-14  7:25     ` Takashi Iwai
2008-11-14  7:38       ` Wu Fengguang [this message]
2008-11-14  7:43         ` Takashi Iwai
2008-11-14  7:47           ` Wu Fengguang
2008-11-14  7:50             ` Takashi Iwai
2008-11-14  8:02               ` Wu Fengguang
     [not found] ` <20081119071135.GA17733@csy.ca>
2008-11-19  7:17   ` Wu Fengguang
     [not found]     ` <20081119075545.GA19833@csy.ca>
2008-11-19  8:08       ` Wu Fengguang
2008-11-19  9:39         ` [alsa-devel] " Wu Fengguang
     [not found]           ` <20081119200201.GA23246@csy.ca>
     [not found]             ` <20081120010204.GA25454@localhost>
     [not found]               ` <20081120200606.GA4164@csy.ca>
2008-11-21  1:36                 ` Wu Fengguang
2008-11-21  1:42                   ` [PATCH] properly print ELD sample bits Wu Fengguang
2008-11-21  7:41                     ` Takashi Iwai
     [not found]                   ` <20081121014649.GA12072@csy.ca>
2008-11-21  1:59                     ` [Intel-gfx] [RFC][PATCH] ELD routines and proc interface Wu Fengguang
2008-11-21  3:41                     ` Wu Fengguang
2008-11-21  7:44                       ` Takashi Iwai
2008-11-21  7:47                         ` Wu Fengguang
     [not found] <20081113022153.GB6844@mail.ustc.edu.cn>
2008-11-13  2:36 ` Wu Fengguang

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=1226648341.561038.5360@de \
    --to=wfg@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /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