All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Courtier-Dutton <James@superbug.co.uk>
To: Jaroslav Kysela <perex@suse.cz>
Cc: Clemens Ladisch <clemens@ladisch.de>,
	Takashi Iwai <tiwai@suse.de>,
	alsa-devel <alsa-devel@lists.sourceforge.net>
Subject: Re: [PATCH] Implement support for display of dB gain in alsamixer.
Date: Thu, 06 Oct 2005 13:54:37 +0100	[thread overview]
Message-ID: <43451E8D.9010402@superbug.co.uk> (raw)
In-Reply-To: <Pine.LNX.4.61.0509210954590.12389@tm8103.perex-int.cz>

Jaroslav Kysela wrote:

>On Tue, 20 Sep 2005, Clemens Ladisch wrote:
>
>  
>
>>Jaroslav Kysela wrote:
>>    
>>
>>>On Mon, 19 Sep 2005, Takashi Iwai wrote:
>>>      
>>>
>>>>>I would vote to keep the kernel space as simple as possible and give the
>>>>>whole contents to apps. They can implement reading/caching/filtering
>>>>>themselves.
>>>>>          
>>>>>
>>>>Agreed.
>>>>        
>>>>
>>Too.
>>
>>    
>>
>>>Ok, good ideas. I would propose this final API:
>>>
>>>1) one key with specific delimiters like:
>>>
>>>list		# list everything (all keys)
>>>list/master	# list only master keys (mixer, pcm etc.)
>>>list/mixer	# list only mixer keys
>>>list/pcm
>>>      
>>>
>>This is _not_ a simple API.  AFAICS the idea was to have just one big
>>string/blob containing all descriptions, and to let the lib or
>>applications do the listing/searching/etc.
>>
>>Accessing specific keys (elements) would be needed only if something
>>wasn't read only.
>>    
>>
>
>You need also take in account that keys might be added/removed at runtime.
>The question is still to have:
>
>1) manager code in the midlevel to register keys from drivers and do 
>   lookups; in this case the drivers will register the keys
>2) leave things simple for midlevel and the ioctl will be directly mapped 
>   to the driver code (the blob version of ioctl); in this case the driver 
>   must handle all things like memory allocation, key changes etc.
>
>						Jaroslav
>  
>

I think that a simple TLV(type, length, value) approach might be more 
efficient for kernel -> alsa-lib info passing.
The message can easily be made hyrachical. One starts with one TLV as a 
wrapper around all information passed. Inside that TLV will be other 
TLVs, and inside those others. This allows the alsa-lib to simply skip 
values it does not yet know about. We can even use a TLV in the request 
from alsa-lib to the kernel.

The T(Type) value is a simple 32bit integer. The receiving function 
simply uses a lookup to find the parameter name, and also the type of 
the value, e.g. Integer, string etc.

For an example of a protocol already using this approach, look at the 
RFCs for RADIUS.

James



*
*


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl

  reply	other threads:[~2005-10-06 12:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-18 13:31 [PATCH] Implement support for display of dB gain in alsamixer James Courtier-Dutton
2005-09-19 13:36 ` Jaroslav Kysela
2005-09-19 15:20   ` Takashi Iwai
2005-09-19 15:36     ` Jaroslav Kysela
2005-09-19 15:58       ` Takashi Iwai
2005-09-20 12:36         ` Jaroslav Kysela
2005-09-20 14:21           ` Clemens Ladisch
2005-09-21  8:02             ` Jaroslav Kysela
2005-10-06 12:54               ` James Courtier-Dutton [this message]
2005-10-06 13:19                 ` Takashi Iwai
2005-11-26 12:02                   ` James Courtier-Dutton
2005-09-19 19:12       ` James Courtier-Dutton

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=43451E8D.9010402@superbug.co.uk \
    --to=james@superbug.co.uk \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=clemens@ladisch.de \
    --cc=perex@suse.cz \
    --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 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.