Friday, November 23, 2012

Why is 44.1 kHz sampling in CD or digital music file (mp3 or wma, ...)?

Currently famous digital music file use 44.1 kHz sampling rate.
As you know, 
- Normal human being can hear 20 Hz ~ 20,000 Hz sound.
- And from the Nyquist sampling theorem, 
---------------------------------------------------------------------
 The Nyquist sampling theorem provides a prescription for the nominal sampling interval required to avoid aliasing. It may be stated simply as follows:
 The sampling frequency should be at least twice the highest frequency contained in the signal.Or in mathematical terms:
     fs >= 2 * fc
(http://redwood.berkeley.edu/bruno/npb261/aliasing.pdf)
In this reason, in the digital music need only 40 kHz sampling rate.

Why is 44.1 kHz sampling rate used in the world?
It is based on Video Tape,
1. http://www.cs.columbia.edu/~hgs/audio/44.1.html
2.http://en.wikipedia.org/wiki/44,100_Hz 

Tuesday, February 21, 2012

Kconfig: help or ---help--- ?

From the http://kernel.org/doc/Documentation/kbuild/kconfig-language.txt
- help text: "help" or "---help---"   This defines a help text. The end of the help text is determined by   the indentation level, this means it ends at the first line which has   a smaller indentation than the first line of the help text.   "---help---" and "help" do not differ in behaviour, "---help---" is   used to help visually separate configuration logic from help within   the file as an aid to developers.

Tuesday, January 24, 2012

Android - Hotplug Off (Multi-Core enable)

If your device has root permission

adb shell stop mpdecision
adb shell "echo 1 > /sys/devices/system/cpu/cpu1/online"
or
# stop mpdecision
# echo 1 > /sys/devices/system/cpu/cpu1/online
# ...

xda - developers


update 1/31

Support for hot-pluggable CPUs
CONFIG_HOTPLUG_CPU=y
or # CONFIG_HOTPLUG_CPU is not set

Wednesday, January 4, 2012

Enable bootchart in the Android

In the Android source code

STEP 1. ----------
In the device side
1. enable bootchart flag
$ export INIT_BOOTCHART=true
2. and build the Android source code
3. After flashing binary
$ adb shell
$ mkdir /data/bootchart
$ echo 60 > /data/bootchart-start
(It means that bootchart log will be saved until 60 seconds)
$ exit
(exit adb)
4. reboot device
$ adb reboot
You can find some log files in the /data/bootchart/ directory

Tip.
- You can find "bootchart.c & bootchart.h" under the ../init/ directory.
- In the same directory there is a Android.mk file.
INIT_BOOTCHART is used in this make file.


STEP 2. ----------
In the linux system side
install bootchart
$ sudo apt-get install bootchart


STEP 3. ----------
after getting bootchart log files

1. copy log files from the Android device to Linux system
$ adb push /data/bootchart/.
2. compress the all log files
$ tar -czf bootchart.tgt *
3. run bootchart
$ bootchart bootchart.tgz
$ ls
bootchart.png bootchart.tgz


* If you meet the error message,
" ZeroDivisionError: flat division by zero"
Please refer to below site: Error while extracting bootchart.tgz and patch the script files.