Re: [PATCH 6/6] staging: most: Documentation: add information to driver_usage file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Do, 2018-12-13 at 18:55 +0100, Greg KH wrote:
> On Thu, Dec 13, 2018 at 04:32:25PM +0000, Christian.Gromm@microchip.c
> om wrote:
> > 
> > On Do, 2018-12-13 at 13:32 +0100, Greg KH wrote:
> > > 
> > > On Thu, Dec 13, 2018 at 02:58:00PM +0300, Dan Carpenter wrote:
> > > > 
> > > > 
> > > > On Wed, Dec 12, 2018 at 01:15:31PM +0100, Christian Gromm
> > > > wrote:
> > > > > 
> > > > > 
> > > > > This patch updates driver_usage.txt file to reflect the
> > > > > latest
> > > > > changes
> > > > > that this patch set introduces.
> > > > > 
> > > > > Signed-off-by: Christian Gromm <christian.gromm@xxxxxxxxxxxxx
> > > > > >
> > > > > ---
> > > > >  drivers/staging/most/Documentation/driver_usage.txt | 16
> > > > > +++++++++++++---
> > > > >  1 file changed, 13 insertions(+), 3 deletions(-)
> > > > > 
> > > > > diff --git
> > > > > a/drivers/staging/most/Documentation/driver_usage.txt
> > > > > b/drivers/staging/most/Documentation/driver_usage.txt
> > > > > index bb9b4e8..da7a8f4 100644
> > > > > --- a/drivers/staging/most/Documentation/driver_usage.txt
> > > > > +++ b/drivers/staging/most/Documentation/driver_usage.txt
> > > > > @@ -142,8 +142,9 @@ Cdev component example:
> > > > >  
> > > > >  Sound component example:
> > > > >  
> > > > > -The sound component needs an additional parameter to
> > > > > determine
> > > > > the audio
> > > > > -resolution that is going to be used. The following formats
> > > > > are
> > > > > available:
> > > > > +The sound component needs additional parameters to determine
> > > > > the
> > > > > audio
> > > > > +resolution that is going to be used and to trigger the
> > > > > registration of a
> > > > > +sound card with ALSA. The following audio formats are
> > > > > available:
> > > > >  
> > > > >  	- "1x8" (Mono)
> > > > >  	- "2x16" (16-bit stereo)
> > > > > @@ -151,9 +152,18 @@ resolution that is going to be used. The
> > > > > following formats are available:
> > > > >  	- "2x32" (32-bit stereo)
> > > > >  	- "6x16" (16-bit surround 5.1)
> > > > >  
> > > > > -        $ echo "mdev0:ep_81:sound:most51_playback.6x16"
> > > > > > 
> > > > > > $(DRV_DIR)/add_link
> > > > > +To make the sound module create a sound card and register it
> > > > > with ALSA the
> > > > > +string "create" needs to be attached to the module parameter
> > > > > section of the
> > > > > +configuration string. To create a sound card with with two
> > > > > playback devices
> > > > > +(linked to channel ep01 and ep02) and one capture device
> > > > > (linked
> > > > > to channel
> > > > > +ep83) the following is written to the add_link file:
> > > > >  
> > > > > +        $ echo "mdev0:ep01:sound:most51_playback.6x16"
> > > > > > 
> > > > > > $(DRV_DIR)/add_link
> > > > > +        $ echo "mdev0:ep02:sound:most_playback.2x16"
> > > > > > 
> > > > > > $(DRV_DIR)/add_link
> > > > > +        $ echo "mdev0:ep83:sound:most_capture.2x16.create"
> > > > > > 
> > > > > > $(DRV_DIR)/add_link
> > > > I would maybe prefer if the "create" command were on a separate
> > > > line.
> > > > Something like:
> > > > 
> > > > +        $ echo "mdev0:ep01:sound:most51_playback.6x16"
> > > > > 
> > > > > $(DRV_DIR)/add_link
> > > > +        $ echo "mdev0:ep02:sound:most_playback.2x16"
> > > > > 
> > > > > $(DRV_DIR)/add_link
> > > > +        $ echo "mdev0:ep83:sound:most_capture.2x16"
> > > > > 
> > > > > $(DRV_DIR)/add_link
> > > > +        $ echo "mdev0:ep83:sound:create"
> > > > >$(DRV_DIR)/sound_card
> > > > 
> > > > It's sort of a separate command in a way?
> > > Why is sysfs being used for configuring things?  Isn't that what
> > > configfs was created for?  :)
> > > 
> > Omg, that would be one API change!
> > 
> > I need to dig a little deeper into configfs to recognize
> > its beauty and the possible benefit for our driver.
> > 
> > Do you see this as a prerequisite?  
> Writing random strings to a random sysfs file to configure things is
> not
> a "normal" user/kernel api as sysfs files are supposed to just be
> "one
> value" and not parsed like what you are doing here.
> 
> So I would strongly suggest looking at configfs, that is what it was
> designed for.
> 

Message received. Anyway, I would like to resent the current
patch set with the things Dan found fixed. And then looking
into Configfs. Would this be ok for you guys?

thanks,
Chris
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux