Recently I am trying to make 0xdroid use YUV Overlay in OMAP3 on beagleboard to play video. The purpose is utilizing the overlay in DSS system to accelerate by getting rid of the effort of the composition of different layers on software side and colorspace conversion to RGB.
For achieving this, we should get a libopencorehw module for opencore in Android. The implementation of libopencorehw can use the video-out driver, a V4l2 provider to interface DSS, like in TI's omapzoom tree. Unfortunately this way stuck me for a while, either there has problem in video-out driver or in TI's liboverlay.
After figuring out for a while, we met up another way for this, making libopencorehw use DSS ioctl directly. So we rewrite libopencorehw as simple as it looks and here is the new libopencorehw in 0xdroid. This way is more lightweight and easier to me. Welcome to try.
2009年9月3日星期四
2009年9月1日星期二
立燈入手
昨天去Ikea敗了一個立燈,就來寫一篇入手心得文做紀錄吧!
這款立燈其實是阿六介紹的,之前就有想買立燈,聽到六哥的介紹後,隔天就衝去逛Ikea 了!
買回來之後,帶回我在新店的住處,開始組裝!組裝是很輕而易舉的。
當我組裝完最後上面的燈泡後,打開開關,心裡一陣激昂。真相如下

我只先開了 25w 省電燈泡上面那一顆, 當場整個不一樣,夠power,而且柔合。
接著再加開小顆40w那顆,整個房間並沒有再亮很多的感覺,但是如果對著小顆那顆看的話,會有熱的感覺,看書覺得沒問題。這兩顆燈泡的搭配,整個光的顏色感覺非常好。整支燈管白色系,也具有現代感。配上牆壁的白色還不賴。燈泡的選擇似乎是影響使用感覺的關鍵,燈罩的顏色和材質也許也有關係。整體感覺,讚的啦!
這款立燈其實是阿六介紹的,之前就有想買立燈,聽到六哥的介紹後,隔天就衝去逛Ikea 了!
買回來之後,帶回我在新店的住處,開始組裝!組裝是很輕而易舉的。
當我組裝完最後上面的燈泡後,打開開關,心裡一陣激昂。真相如下
我只先開了 25w 省電燈泡上面那一顆, 當場整個不一樣,夠power,而且柔合。
接著再加開小顆40w那顆,整個房間並沒有再亮很多的感覺,但是如果對著小顆那顆看的話,會有熱的感覺,看書覺得沒問題。這兩顆燈泡的搭配,整個光的顏色感覺非常好。整支燈管白色系,也具有現代感。配上牆壁的白色還不賴。燈泡的選擇似乎是影響使用感覺的關鍵,燈罩的顏色和材質也許也有關係。整體感覺,讚的啦!
2009年8月3日星期一
11年載
2009年6月10日星期三
藍芽Speaker,請不要斷續
前一陣子,因為demo需要,和 Jserv去光華商場買了一件藍芽Speaker回來,也開始玩了Bluetooth的a2dp。但運氣不好的是,沒有把bluetooth device 整合好,bluetooth init和開啟時沒有把baud rate設對,以致於經由bluetooth輸出到Speaker時,聲音是斷斷續續,固定間隔的出來。這的確是讓我卡了一陣,雖然解法似乎很簡單。時間差了一點,就可demo出經由a2dp輸出到藍芽Speaker。這讓我感受到資訊整理的重要。
android1.5,已支援a2dp, 經由android的mediaserver 使用 libaudioflinger,再呼叫 liba2dp的function,把解好的聲音檔 (pcm格式) 丟給bluez,做sbc encode,丟到socket,而後送到bluetooth device上。 liba2dp.so為android在bluez裡建立的plugin,這條路是android所提供的。
另一條路,則是build 出bluez 原本給 alsa-lib使用的alsa plugins, libasound_module_ctl_bluetooth.so and libasound_module_pcm_bluetooth.so,
並將其放至/system/usr/lib/alsa-lib/ , here is a quick patch for this.
Some test steps and notes are as below (on Android 1.5, 00:17:53:09:2E:E0 is the device address):
vi /system/etc/asound.conf ,
pcm.bluetooth {
type bluetooth
device 00:17:53:09:2E:E0
profile "auto"
}
test steps:
1. hcitool scan
2. passkey-agent --default --path /org/bluez/hci0 0000 00:17:53:09:2E:E0 &
3. dbus-send --system --dest=org.bluez --type=method_call --print-reply /org/bluez/hci0 org.bluez.Adapter.CreateBonding string:00:17:53:09:2E:E0
4. dbus-send --system --dest=org.bluez --type=method_call --print-reply /org/bluez/audio org.bluez.audio.Manager.CreateDevice string:00:17:53:09:2E:E0
5. alsa_aplay -Dplug:bluetooth /horse.wav
除了a2dp, 與Android UI的整合也花了一些功夫,overview的整理一下,SystemSever起來時,會啟動BluetoothDeviceService, BluetoothA2dpService這兩個service。bluetooth 的上層java部份(framework.jar),會透過一層JNI 呼叫 (libandroid_runtime.so),使用dbus與hcid溝通(之後bluez 4.x版為bluetoothd), 以及呼叫libbluedroid來控制硬體。
android1.5,已支援a2dp, 經由android的mediaserver 使用 libaudioflinger,再呼叫 liba2dp的function,把解好的聲音檔 (pcm格式) 丟給bluez,做sbc encode,丟到socket,而後送到bluetooth device上。 liba2dp.so為android在bluez裡建立的plugin,這條路是android所提供的。
另一條路,則是build 出bluez 原本給 alsa-lib使用的alsa plugins, libasound_module_ctl_bluetooth.so and libasound_module_pcm_bluetooth.so,
並將其放至/system/usr/lib/alsa-lib/ , here is a quick patch for this.
Some test steps and notes are as below (on Android 1.5, 00:17:53:09:2E:E0 is the device address):
vi /system/etc/asound.conf ,
pcm.bluetooth {
type bluetooth
device 00:17:53:09:2E:E0
profile "auto"
}
test steps:
1. hcitool scan
2. passkey-agent --default --path /org/bluez/hci0 0000 00:17:53:09:2E:E0 &
3. dbus-send --system --dest=org.bluez --type=method_call --print-reply /org/bluez/hci0 org.bluez.Adapter.
4. dbus-send --system --dest=org.bluez --type=method_call --print-reply /org/bluez/audio org.bluez.audio.Manager.
5. alsa_aplay -Dplug:bluetooth /horse.wav
除了a2dp, 與Android UI的整合也花了一些功夫,overview的整理一下,SystemSever起來時,會啟動BluetoothDeviceService, BluetoothA2dpService這兩個service。bluetooth 的上層java部份(framework.jar),會透過一層JNI 呼叫 (libandroid_runtime.so),使用dbus與hcid溝通(之後bluez 4.x版為bluetoothd), 以及呼叫libbluedroid來控制硬體。
2009年4月24日星期五
Use android emulator to play music
試著用android emulator 來播放音樂,
第一步,讓emualtor掛上一個sdcard image,
先使用android sdk裡的 mksdcard 來產生一個image。
$mksdcard 512M sdcard_for_android.so
$emulator -sdcard ./sdcard_for_android.so
接著就是把media file丟進sdcard space, for example
$adb push beat.ogg /sdcard
此時執行Music, 似乎還看不到丟進去的file...?
adb shell 進去,把 system_server 砍掉,讓它重跑。再進去Music,應可看到丟進去的音樂檔。
$ kill 'PID of system_server'
播放,似乎沒有聲音,重新run emulator,這時加入oss audio backend。
$emulator -sdcard ./sdcard_for_android.so -scale 0.5 -audio oss
執行Music,播放.... enjoy the music for a while....
android果然跟平常使用的環境不太一樣啊~~
第一步,讓emualtor掛上一個sdcard image,
先使用android sdk裡的 mksdcard 來產生一個image。
$mksdcard 512M sdcard_for_android.so
$emulator -sdcard ./sdcard_for_android.so
接著就是把media file丟進sdcard space, for example
$adb push beat.ogg /sdcard
此時執行Music, 似乎還看不到丟進去的file...?
adb shell 進去,把 system_server 砍掉,讓它重跑。再進去Music,應可看到丟進去的音樂檔。
$ kill 'PID of system_server'
播放,似乎沒有聲音,重新run emulator,這時加入oss audio backend。
$emulator -sdcard ./sdcard_for_android.so -scale 0.5 -audio oss
執行Music,播放.... enjoy the music for a while....
android果然跟平常使用的環境不太一樣啊~~
2009年3月16日星期一
Take it easy
看似突然,其實不然
按兵不動,一觸即發
早有所悟,擺脫束縛
一切已靜,重回自由
Even I left, I am still a member of the family. Be strong.
I got many friends and partners here.
解脫的感覺很好
咦? 外面的陽光 讚的啦!
按兵不動,一觸即發
早有所悟,擺脫束縛
一切已靜,重回自由
Even I left, I am still a member of the family. Be strong.
I got many friends and partners here.
解脫的感覺很好
咦? 外面的陽光 讚的啦!
2009年3月11日星期三
Thinking mode
Turning point again. I should react to something as soon as possible and get prepared.
在與team members 聊完後,我需要思考與整理,幸運地還有機會搭上末班捷運,卻因莫名的疏忽,搭錯線,而我已沒有車可以回頭,於是我從古亭站,搭上黃線到景安站,再從景安站走回公司。是的,也許我真的是在思考,這種疏忽並不常發生。從景安站走向新店,路上並沒有什麼吸引到我的注意,除了情趣用品店有幾家,以及薑母鴨以外(稍微地轉移我的注意力)。情趣用品對我來說並不常看到。
也許這就好像,我有個目標,假設是A地(公司),我有路徑B可以到達,也有路徑C可以到達,還有其他路徑我沒辦法走,或是我不知道,但我就是因緣際會地走了路徑C。我並不是因為任何原因而選擇了C路徑,或是只是因為我喜歡C罩杯,(這跟本文一點一點關係也沒有,也許只是稍微回到了高中時期 的寫作風格)。 shit!
走那條路比較好,我無從得知,也許這條路上突然地會讓我遇到正妹,但我想重要的是清楚自己的目標,以及知道我正用我認為對的方法往目標前進。話說回來,其實目標也許有時難以用某樣東西比喻。但目標確認才是能夠使人更能在路上往前進的動力,或是說選擇或轉換了某條路之後,應該要有所期待。
很幸運地,最後回到了公司,比我想像中的還快抵達,還好我能夠走過秀朗大橋,它有小路能讓人和腳踏車通過,不然也許我想我可能會跑在機車道上,那會像是威爾史密思在演全民公敵。
這是個機會,高興的部份。也許我對它還很陌生 :)
在與team members 聊完後,我需要思考與整理,幸運地還有機會搭上末班捷運,卻因莫名的疏忽,搭錯線,而我已沒有車可以回頭,於是我從古亭站,搭上黃線到景安站,再從景安站走回公司。是的,也許我真的是在思考,這種疏忽並不常發生。從景安站走向新店,路上並沒有什麼吸引到我的注意,除了情趣用品店有幾家,以及薑母鴨以外(稍微地轉移我的注意力)。情趣用品對我來說並不常看到。
也許這就好像,我有個目標,假設是A地(公司),我有路徑B可以到達,也有路徑C可以到達,還有其他路徑我沒辦法走,或是我不知道,但我就是因緣際會地走了路徑C。我並不是因為任何原因而選擇了C路徑,或是只是因為我喜歡C罩杯,(這跟本文一點一點關係也沒有,也許只是稍微回到了高中時期 的寫作風格)。 shit!
走那條路比較好,我無從得知,也許這條路上突然地會讓我遇到正妹,但我想重要的是清楚自己的目標,以及知道我正用我認為對的方法往目標前進。話說回來,其實目標也許有時難以用某樣東西比喻。但目標確認才是能夠使人更能在路上往前進的動力,或是說選擇或轉換了某條路之後,應該要有所期待。
很幸運地,最後回到了公司,比我想像中的還快抵達,還好我能夠走過秀朗大橋,它有小路能讓人和腳踏車通過,不然也許我想我可能會跑在機車道上,那會像是威爾史密思在演全民公敵。
這是個機會,高興的部份。也許我對它還很陌生 :)
訂閱:
文章 (Atom)