O S

kernel work log sound 0.11

$git fetch origin
$
$./scripts/checkpatch.pl --file --terse sound/sound_core.c | more
sound/sound_core.c:71: ERROR: trailing whitespace
sound/sound_core.c:83: ERROR: trailing whitespace
sound/sound_core.c:85: ERROR: trailing whitespace
sound/sound_core.c:115: ERROR: open brace '{' following
struct go on the same line
sound/sound_core.c:123: WARNING: externs should be avoided in .c files
sound/sound_core.c:126: WARNING: externs should be avoided in .c files
sound/sound_core.c:155: ERROR: do not initialise statics to 0 or NULL
sound/sound_core.c:163: ERROR: that open brace { should be on the
previous line
sound/sound_core.c:175: WARNING: line over 80 characters
.
.
.
.
.
.
sound/sound_core.c:586: ERROR: trailing whitespace
sound/sound_core.c:633: ERROR: space required after that ',' (ctx:VxV)
total: 77 errors, 26 warnings, 667 lines checked
.
.
. <fixing>
.
.
.
total: 73 errors, 26 warnings, 666 lines checked

As an  alternative to  automatic variables, it  is possible  to define
variables that are external to  all functions, that is, variables that
can be  accessed by  name by any  function. (This mechanism  is rather
like  Fortran COMMON  or Pascal  variables declared  in  the outermost
block.) Because  external variables are globally  accessible, they can
be  used  instead  of  argument  lists  to  communicate  data  between
functions. Furthermore, because external variables remain in existence
permanently, rather  than appearing and disappearing  as functions are
called and exited,  they retain their values even  after the functions
that set them have returned.

 
.
.
. < fixing >
.
total: 28 errors, 23 warnings, 663 lines checked

$./scripts/checkpatch.pl --file --terse sound/sound_core.c
sound/sound_core.c:122: WARNING: externs should be avoided in .c files
sound/sound_core.c:125: WARNING: externs should be avoided in .c files
 .
.
.
.
.
total: 0 errors, 11 warnings, 662 lines checked
$

write linux kernel patch 0.23 raw

 write linux kernel patch 0.21  raw
Content
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Initialized empty Git repository in /home/jeffrin/linux-2.6/.git/
remote: Counting objects: 1806930, done.
remote: Compressing objects: 100% (278260/278260), done.
Receiving objects:  14% (255365/1806930), 117.83 MiB | 127 KiB/s
Resolving deltas: 100% (1513210/1513210), done.
$cd linux-2.6
$./scripts/ge
genksyms/          get_maintainer.pl

$./scripts/get_maintainer.pl --file sound/ac97_bus.c
Jaroslav Kysela <perex@perex.cz>
Takashi Iwai <tiwai@suse.de>
alsa-devel@alsa-project.org
linux-kernel@vger.kernel.org
$


$ git status
# On branch master
nothing to commit (working directory clean)
$ git branch jeffrin
$ git branch
  jeffrin
* master
$ git checkout jeffrin
Switched to branch 'jeffrin'
$
$git status
# On branch jeffrin
nothing to commit (working directory clean)
$
$./scripts/checkpatch.pl
checkpatch.pl: no input files
$./scripts/checkpatch.pl --file --terse sound/ac97_bus.c
sound/ac97_bus.c:22: WARNING: line over 80 characters
sound/ac97_bus.c:75: WARNING: EXPORT_SYMBOL(foo); should immediately
follow its function/variable
total: 0 errors, 2 warnings, 77 lines checked

$vim sound/ac97_bus.c +22
$./scripts/checkpatch.pl --file --terse sound/ac97_bus.c
sound/ac97_bus.c:22: ERROR: trailing whitespace
sound/ac97_bus.c:75: WARNING: EXPORT_SYMBOL(foo); should immediately
follow its function/variable
total: 1 errors, 1 warnings, 77 lines checked
$vim sound/ac97_bus.c +22
$./scripts/checkpatch.pl --file --terse sound/ac97_bus.c
sound/ac97_bus.c:75: WARNING: EXPORT_SYMBOL(foo); should immediately
follow its function/variable
total: 0 errors, 1 warnings, 77 lines checked
$vim sound/ac97_bus.c +75

$git status
# On branch jeffrin
# Changed but not updated:
#   (use "git add ..." to update what will be committed)
#   (use "git checkout -- ..." to discard changes in working directory)
#
#	modified:   sound/ac97_bus.c
#
no changes added to commit (use "git add" and/or "git commit -a")
$git diff
diff --git a/sound/ac97_bus.c b/sound/ac97_bus.c
index a351dd0..c93251a 100644
--- a/sound/ac97_bus.c
+++ b/sound/ac97_bus.c
@@ -19,9 +19,9 @@

 /*
  * Let drivers decide whether they want to support given codec from their
- * probe method.  Drivers have direct access to the struct snd_ac97 structure and may
- * decide based on the id field amongst other things.
- */
+ * probe method. Drivers have direct access to the struct snd_ac97
+ * structure and may  decide based on the id field amongst other things.
+*/
 static int ac97_bus_match(struct device *dev, struct device_driver *drv)
 {
        return 1;
$


$git commit sound/ac97_bus.c
[jeffrin a2c2867] sound: Fixed line limit issue in sound/ac97_bus.c
This is a patch to the sound/ac97_bus.c file that fixes up a 80
character line limit issue found by the checkpatch.pl tool.
Signed-off-by: Jeffrin Jose 
 1 files changed, 3 insertions(+), 3 deletions(-)
$git show HEAD
commit a2c2867876c246420a199a0fb4c36ad2965a42cc
Author: Jeffrin Jose 
Date:   Mon Dec 6 19:27:53 2010 +0530

    sound: Fixed line limit issue in sound/ac97_bus.c
    This is a patch to the sound/ac97_bus.c file that fixes up a 80 character
    line limit issue found by the checkpatch.pl tool.
    Signed-off-by: Jeffrin Jose 

diff --git a/sound/ac97_bus.c b/sound/ac97_bus.c
index a351dd0..c93251a 100644
--- a/sound/ac97_bus.c
+++ b/sound/ac97_bus.c
@@ -19,9 +19,9 @@

 /*
  * Let drivers decide whether they want to support given codec from their
- * probe method.  Drivers have direct access to the struct snd_ac97 structure and may
- * decide based on the id field amongst other things.
- */
+ * probe method. Drivers have direct access to the struct snd_ac97
+ * structure and may  decide based on the id field amongst other things.
+*/
 static int ac97_bus_match(struct device *dev, struct device_driver *drv)
 {
        return 1;
$git format-patch master..jeffrin
0001-sound-Fixed-line-limit-issue-in-sound-ac97_bus.c.patch
$./scripts/checkpatch.pl 0001-sound-Fixed-line-limit-issue-in-sound-ac97_bus.c.patch
total: 0 errors, 0 warnings, 12 lines checked

0001-sound-Fixed-line-limit-issue-in-sound-ac97_bus.c.patch has no obvious style
problems and is ready for submission.
$

Unevictable: 4 kB 0.1

Unevictable:           4 kB
The Unevictable LRU infrastructure addresses the following classes of
unevictable pages:

+ page owned by ram disks or ramfs
+ page mapped into SHM_LOCKed shared memory regions
+ page mapped into VM_LOCKED [mlock()ed] vmas
Least  Recently Used  (LRU): discards  the least  recently  used items
first. This  algorithm requires keeping  track of what was  used when,
which  is expensive if  one wants  to make  sure the  algorithm always
discards the least recently used item. General implementations of this
technique require  to keep  "age bits" for  cache-lines and  track the
"Least  Recently   Used"  cache-line   based  on  age-bits.   In  such
implementation, every time a cache-line  is used, the age of all other
cache-lines changes.  LRU is actually  a family of  caching algorithms
with members including:  2Q by Theodore Johnson and  Dennis Shasha and
LRU/K by Pat O'Neil, Betty O'Neil and Gerhard Weikum.

Hugetlb pages are also  unevictable. Hugepages are already implemented
in a way  that these pages don't  reside on the LRU and  hence are not
iterated over during  the vmscan.  So there is no  need to move around
these pages  across different  LRU's. We just  account these  pages as
unevictable for correct statistics.


The Unevictable LRU  adds an additional LRU list  to track unevictable
pages and to hide these pages from vmscan.  This mechanism is based on
a patch  by Larry  Woodman of Red  Hat to address  several scalability
problems with page reclaim in  Linux.  The problems have been observed
at  customer sites  on large  memory x86_64  systems.  For  example, a
non-numal x86_64 platform with 128GB  of main memory will have over 32
million 4k  pages in a  single zone.  When  a large fraction  of these
pages are not evictable for  any reason [see below], vmscan will spend
a lot of time scanning the LRU lists looking for the small fraction of
pages that  are evictable.  This can  result in a  situation where all
cpus are  spending 100% of their time  in vmscan for hours  or days on
end, with the system completely unresponsive.

logger—0.6.xml

[daemon.log]Every   daemon  without  a   separate  facility   logs  to
daemon.log.  The  priority of  log events is  not relevent.[debug]File
debug has messages useful for debugging.The priority of log events are
not relevent.[dmesg] After the  kernel has booted, all kernel messages
are written to dmesg for  later reference.This file is not rotated and
only exists for a single boot cycle before being overwritten.Note that
the choice of  the name is a little unfortunate,  as the dmesg command
prints  the  current  kernel  log ring  buffer,which  is  continuously
updated and new kernel events are logged.These messages are written to
kern.log; The dmesg file is not modified until the next restart of the
system.[kern.log] Log messages  with the kern facility end  up in this
file.The  contents are mostly  what the  kernel spits  out,after being
formatted by klogd.[lpr.log]Log messages  with the lpr facility end up
in this file.

[mail.log]  Log entries  related  to the  mail  system(using the  mail
facility) go into  this file.  For easier parsing  by scripts,mail log
entries    are    also    written    to    mail.info,    mail.warn,and
mail.err,according to  their priority.  Unfortunately,Debian's default
MTA,exim4,  does not  use this  file.[messages]Pretty  much everything
that  is not  an  error or  a  trivial log  entry,and  not related  to
authentication,daemons  ,cron(or other  automatic schedulers),mail,and
news goes here.

btmp auth.log syslog boot

btmp shows a log of the file /var/log/btmp, which contains all the bad
login   attempts.    auth.log   receives   log  entries   related   to
authentication,and  other  events  that  are critical  to  privacy  or
security issues.   everything not related to authentication  end up in
syslog file.   syslog is  the catch-all log  file on a  debian system.
log  messages  produced during  the  initialization  sequence will  be
logged to boot.

proc asound devices 0.2

$cat /proc/asound/devices
  2:        : timer
  3:        : sequencer
  4: [ 0- 2]: digital audio capture
  5: [ 0- 1]: digital audio playback
  6: [ 0- 1]: digital audio capture
  7: [ 0- 0]: digital audio playback
  8: [ 0- 0]: digital audio capture
  9: [ 0- 0]: hardware dependent
 10: [ 0]   : control
$


devices
        Lists the ALSA native device mappings.
A music  sequencer is  a musical application  or a device  designed to
play  back musical  notation. The  original kind  of sequencer  is now
known  as a step  sequencer to  distinguish it  from the  modern kind,
which records a musician playing notes.

GNUsound - A sound editor  for Linux/x86. It supports multiple tracks,
multiple  outputs, and  8, 16,  or 24/32  bit samples.  It can  read a
number of audio formats through libaudiofile, and saves them as WAV.
GNU sound

Digital audio uses pulse-code modulation and digital signals for sound
reproduction.   This  includes  analog-to-digital   conversion  (ADC),
digital-to-analog  conversion  (DAC),  storage, and  transmission.  In
effect,  the system  commonly  referred to  as  digital is  in fact  a
discrete-time,   discrete-level  analog   of  a   previous  electrical
analog. While modern systems can be quite subtle in their methods, the
primary  usefulness of  a  digital  system is  the  ability to  store,
retrieve and transmit signals without any loss of quality.
Intel's  use  of  the  phrase  audio codec  refers  to  signals  being
encoded/decoded  to/from  analog  audio  from/to digital  audio,  thus
actually a combined audio AD/DA-converter. This should not be confused
with a  codec in  the sense  of converting from  one binary  format to
another,  such as  an audio  (MP3) or  video (Xvid)  codec in  a media
player.

A timer is a specialized type of clock. A timer can be used to control
the  sequence of  an  event  or process.  Whereas  a stopwatch  counts
upwards from zero for measuring elapsed time, a timer counts down from
a  specified   time  interval,  like  an  hourglass.   Timers  can  be
mechanical, electromechanical,  electronic (quartz), or  even software
as  all  modern  computers  include  digital timers  of  one  kind  or
another. When  the set period  expires some timers simply  indicate so
(e.g.,  by  an  audible   signal),  while  others  operate  electrical
switches, such as a time switch, which cuts electrical power.

proc filesystem with alsa.



$cat /proc/asound/cards
0 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xf5000000 irq 22
$

The HD-audio component consists of  two parts: the controller chip and
the codec chips on the HD-audio Linux provides a single driver for all
controllers, snd-hda-intel.  Although the  driver name contains a word
of a well-known  hardware vendor, it's not specific to  it but for all
controller chips  by other companies.  Since  the HD-audio controllers
are supposed  to be compatible, the single  snd-hda-driver should work
in most cases.



Reference/Source:
Linux kernel documentation 2.6.32 related.

advanced linux sound architecture

The ALC883 series 7.1+2 Channel High Definition Audio (HDA) codecs are
compliant  with Microsoft's  UAA (Universal  Audio  Architecture). The
ALC883 series provide 10  DAC channels that simultaneously support 7.1
sound  playback, plus 2  channels of  independent stereo  sound output
(multiple streaming) through the  front panel stereo output.  Flexible
mixing,  mute, and  fine  gain control  functions  provide a  complete
integrated  audio  solution  for  home  entertainment  PCs.   A  modem
(modulator-demodulator) is  a device that modulates  an analog carrier
signal  to encode  digital information,  and also  demodulates  such a
carrier signal to  decode the transmitted information. The  goal is to
produce  a  signal that  can  be  transmitted  easily and  decoded  to
reproduce the original digital data. Modems can be used over any means
of  transmitting analog  signals,  from driven  diodes  to radio.   In
electronics,  modulation  is  the  process  of  varying  one  or  more
properties of  a high frequency periodic waveform,  called the carrier
signal, with respect to a modulating signal. This is done in a similar
fashion as a musician may modulate a tone (a periodic waveform) from a
musical instrument by varying its volume, timing and pitch.

acpi with proc

AC Adapter in Proc Filesystem

Alternating current  (AC) adapters  are used to  power or  charge many
common electronic devices, such as mobile phones, laptop computers, or
external  hard  drives.  An  AC  adapter  changes  AC  power  from  an
electrical outlet into the type of power or voltage that an electronic
device needs to work. Typically,  each device has a designated adapter
that is  pre-set to  the proper voltage  conversion. For  this reason,
among others, AC adapters generally are not interchangeable.


$cat /proc/acpi/ac_adapter/ACAD/state
state: on-line
$
ACAD is the name of the adapter.