忘記密碼
 立即註冊
樓主: BYOB

打造終極 HiEnd HTPC - Linux 哇塞!

[複製鏈接]

0

主題

23

回帖

0

積分

新手上路

初級會員

舊站積分
51
舊站發表文章數
23
發表於 2013-10-29 06:47:31 | 顯示全部樓層

Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: R

原發表者是 bchsieh
[B]

twlai兄,

實在是很抱歉, 因為小弟已經很久沒有去動CAT的設定了, 每天只有一直放音樂,
再加上年紀越大記性越差, 自己說過的話都忘光光了..

一秒CD資料為176400 bytes.
以8820Hz來說, 每Hz的資料為176400bytes/8820 = 20 bytes.
所以設定值為20 bytes的整數倍就可以了.
而oss的dma_buffer的單位為Kilobytes, 所以無論怎麼設, 都是20 bytes的整數倍.
另外, linux的記憶體分頁為4Kbytes,
所以最好設成4Kbytes的倍數, 而最小就是4Kbytes.
回想起來, 這應該就是小弟最後為什麼會設定成dma_buffer=4.
所以8820Hz和11025Hz相同,
dma_buffer=16 (未修改oss程式) 和 4 (修改過oss程式)
應該也是最佳設定.

而這只是dma buffer,
以oss來說, 內部最後還有一個buffer,
通常是由oss自行決定大小,
但也可以由呼叫oss的程式來設定 (oss不建議這樣做).
小弟使用的播放軟體是mpd, 原始mpd程式並無指定oss內部buffer大小.
小弟修改mpd指定oss使用32bytes buffer (8 samples).
以11025Hz來說, 最佳大小應該是16 bytes (44100/11025 = 4 samples),
但小弟的硬體沒辦法撐到16 bytes.
而以8820Hz來說, 最佳大小為20 bytes,
但OSS的內部buffer大小皆為2的指數,
而2的指數, 皆無法被20整除,
所以這個buffer無法對8820Hz做最佳化設定. [/B]


十個譔!!![/SIZE] [;)]

0

主題

23

回帖

0

積分

新手上路

初級會員

舊站積分
51
舊站發表文章數
23
發表於 2013-11-10 18:40:03 | 顯示全部樓層

Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: R

只想報告一下:-

作了以下的改進:-

1.  Ubuntu 12.10 (command line) + BFS patch [replacing 11.10 + rt patch]
2.  Self-complied kernel with most modules removed [replacing kernel download from PPA]
3.  Ramdisk using XFS and defrag by xfs_fsr [replacing ramfs]
4.  Dirty ratio added to /etc/rc.local
5.  Stopping service:

A. sudo apt-get install sysv-rc-conf && sudo sysv-rc-conf
B. sudo sh -c 'echo "manual" > /etc/init/SERVICE.override

6.  Power management:

A. sudo apt-get install powertop
B. sudo powertop -html [create a suggestion tml.html in which the suggestion is on the tab"Tuning"
C. sudo nano /usr/local/bin/startup.sh
D. copy the suggestion to /usr/local/bin/startup.sh
E.  sudo chmod +x /usr/local/bin/startup.sh
F.  add "/usr/local/bin/startup.sh" to /etc/rc.local
G.  sudo nano /usr/local/bin/remove.sh
H.  echo '1' > /sys/bus/pci/devices/0000:00:00.0/remove
I.  remove as much 0000:00:[no].[no] as possible, try one by one.  If all are remove, it is likely the sound card cannot be initialized.
J.  in BIOS (AMD), turn on "Cool n Quiet"
K.  echo -n performance > /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

7.  pagecache-management.sh
8.  kernel parameter set as in page 69 of this thread.
9.  sudo apt-get remove [all other kernel] so that the system is trimmed down.  In may case, my system occupies around 1.1G
10.  Boot-to-ram (I use 2G ram and use 850m ramdisk)

A. cp /etc/fstab /etc/fstab.bak
B.  in /etc/fstab, replaced the root entry with "none / tmpfs defaults 0 0"
C.  cd /usr/share/initramfs-tools/scripts/
D.  make a backup of /usr/share/initramfs-tools/scripts/local by "cp local local.bak"
E.  find the line
"# FIXME This has no error checking
# Mount root
mount ${roflag} -t ${FSTYPE} ${ROOTFLAGS} ${ROOT} ${rootmnt}" and replaced with
"# FIXME This has no error checking
# Mount root
#mount ${roflag} -t ${FSTYPE} ${ROOTFLAGS} ${ROOT} ${rootmnt}
mkdir /ramboottmp
mount ${roflag} -t ${FSTYPE} ${ROOTFLAGS} ${ROOT} /ramboottmp"
mount -t tmpfs -o size=100% none ${rootmnt}
cd ${rootmnt}
cp -rfa /ramboottmp/* ${rootmnt}
umount /ramboottmp"
F.  mkinitramfs -o /boot/initrd.img-ramboot
G.  cp -f local.bak local
H.  /boot/grub/grub.cfg
I.  copy the first boot entry and replace the /initrd line with this "/initrd /initrd.img-ramboot".  Then  label the new entrie as RamBoot
J.  Reboot

[As advised by solo16兄, do not "sudo update-grub"]

The above steps take me 3 weeks to implement (a very difficult hard job, try and error and re-install 12.10 for at least 10 times (cry))

Now, when I play the music, I turn off the external harddisk and unplug it.  The sound improves a lot, say 20 to 25%.  You can feel the string of guitar vibrating in front of you and the sense of presence is so real that you can listen to it for a very long time without fatique.  The music becomes alive and much more touching.  Under the old system, there is no much difference after I unplug the serial console cable.  Now the difference becomes apparent.  I think this can be attributed to the power management, which shut down many component of the system making it very sensitive to any change.  The same applies to the music, i.e. the music becomes more refine and responsive.

希望這些能應用到你們的系統裡,一起享受好音樂
[/SIZE][]

16

主題

1772

回帖

0

積分

新手上路

四星級會員

舊站積分
6295
舊站發表文章數
1683
發表於 2013-11-10 20:56:08 | 顯示全部樓層

Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: R

原發表者是 twlai
[B]只想報告一下:-

作了以下的改進:-
[恕刪]
希望這些能應用到你們的系統裡,一起享受好音樂
[/SIZE][] [/B]


twlai兄, 非常棒的整理.
不知您有沒有測試過小弟貼的boot parameter,
以及CPU切割分工?
在小弟的系統上, 對聲音的影響很大.

14

主題

849

回帖

0

積分

新手上路

三星級會員

舊站積分
2319
舊站發表文章數
826
 樓主| 發表於 2013-11-10 21:52:33 | 顯示全部樓層

Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: R

原發表者是 bchsieh
[B]

twlai兄, 非常棒的整理.
不知您有沒有測試過小弟貼的boot parameter,
以及CPU切割分工?
在小弟的系統上, 對聲音的影響很大. [/B]



bchsieh兄 twlai兄說有參考您的參數喔

8. kernel parameter set as in page 69 of this thread.

twlai兄這些也都是很寶貴的經驗 10個讚!!

不知twlai兄目前硬體設備為何

16

主題

1772

回帖

0

積分

新手上路

四星級會員

舊站積分
6295
舊站發表文章數
1683
發表於 2013-11-10 22:24:58 | 顯示全部樓層

Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: R

原發表者是 BYOB
[B]


bchsieh兄 twlai兄說有參考您的參數喔

8. kernel parameter set as in page 69 of this thread.

twlai兄這些也都是很寶貴的經驗 10個讚!!

不知twlai兄目前硬體設備為何 [/B]


感謝BYOB兄的提示, 小弟看來已經有老花了....  [:I]

0

主題

23

回帖

0

積分

新手上路

初級會員

舊站積分
51
舊站發表文章數
23
發表於 2013-11-13 13:31:34 | 顯示全部樓層

Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: R

原發表者是 bchsieh
[B]

感謝BYOB兄的提示, 小弟看來已經有老花了....  [:I] [/B]




My hardware:-

Main board: Gigabyte GA-990XA-UD3

Sound card: SQ210A+ (VT1724 chip)
1.        Independent power supply: LiFePo4 battery 12V => SupertedyyReg 3.3V (http://www.teddypardo.com/resources/superteddyreg.html) => VT1724
2.        Tentlab low jitter clock powered by flea: LiFePo4 battery 26V => flea (http://www.raylectronics.nl/index_en.html) => Tentlab clock (http://www.tentlabs.com/Components/XO/index.html) => sound card clock
3.        I2S connection from sound card to DAC: Twisted Pair Audio』s teleporter (as transmitter) (http://www.twistedpearaudio.com/digital/teleporter.aspx).  This is a digital isolator and the differential signal minimize the interference.

Power Supply:

1.        CPU: LiFePo4 12V with decoupling caps.
2.        Main board: LiFePo4 12V with decoupling caps via Pico

DAC: Dual WM8741
1.        Teleporter (as receiver)
2.        Change caps to Elna Silmic II
3.        Universal Tube Output stage (http://www.diyhifisupply.com/opc ... mp;path=179_136_141) (To be implemented)
4.        SuperPowerReg (http://www.belleson.com/): 4 regulator to power the dual WM8741 (To be implemented)
5.        Transformer (http://item.taobao.com/item.htm? ... &id=23657576654) (to be implemented)


[/SIZE]

14

主題

849

回帖

0

積分

新手上路

三星級會員

舊站積分
2319
舊站發表文章數
826
 樓主| 發表於 2013-11-13 13:50:55 | 顯示全部樓層

Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: R

原發表者是 twlai
[B]



My hardware:-

Main board: Gigabyte GA-990XA-UD3

Sound card: SQ210A+ (VT1724 chip)
1.        Independent power supply: LiFePo4 battery 12V => SupertedyyReg 3.3V (http://www.teddypardo.com/resources/superteddyreg.html) => VT1724
2.        Tentlab low jitter clock powered by flea: LiFePo4 battery 26V => flea (http://www.raylectronics.nl/index_en.html) => Tentlab clock (http://www.tentlabs.com/Components/XO/index.html) => sound card clock
3.        I2S connection from sound card to DAC: Twisted Pair Audio』s teleporter (as transmitter) (http://www.twistedpearaudio.com/digital/teleporter.aspx).  This is a digital isolator and the differential signal minimize the interference.

Power Supply:

1.        CPU: LiFePo4 12V with decoupling caps.
2.        Main board: LiFePo4 12V with decoupling caps via Pico

DAC: Dual WM8741
1.        Teleporter (as receiver)
2.        Change caps to Elna Silmic II
3.        Universal Tube Output stage (http://www.diyhifisupply.com/opc ... mp;path=179_136_141) (To be implemented)
4.        SuperPowerReg (http://www.belleson.com/): 4 regulator to power the dual WM8741 (To be implemented)
5.        Transformer (http://item.taobao.com/item.htm? ... &id=23657576654) (to be implemented)


[/SIZE] [/B]


厲害!!! 厲害!!! 厲害!!!

請問 twlai兄 為何選用此張音效卡 SQ210A+呢, 不知有何特異功能?

0

主題

23

回帖

0

積分

新手上路

初級會員

舊站積分
51
舊站發表文章數
23
發表於 2013-11-13 15:23:39 | 顯示全部樓層

Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: R

原發表者是 BYOB
[B]

厲害!!! 厲害!!! 厲害!!!

請問 twlai兄 為何選用此張音效卡 SQ210A+呢, 不知有何特異功能? [/B]



哪裡,哪裡。

小弟之前用Onkyo PCI 200 Ltd,但嘗試抽取I2S signal,弄壞了卡。由於Onkyo PCI 200 Ltd 用VT1724 chip,故此選了SQ210A+。

SQ210A+有好處,便宜,線路簡單,容易Mod改。

小弟的speaker,台灣出品,Usher dancer mini two (http://www.usheraudiousa.com/pro ... ies/dancer_mini_two),非常好聲。

前,後級都是土炮膽機。
[/SIZE] []

104

主題

562

回帖

0

積分

新手上路

靜聽著,靜心者

舊站積分
112
舊站發表文章數
543
發表於 2013-12-14 23:52:52 | 顯示全部樓層
不好意思,因為對Linux不熟,想請教幾個問題
1.在Linux怎麼ripper CD?有類似iTune的東西嗎?如何管理音樂?
2.可以用iPad或Android phone遙控播放嗎?
看了一些介紹以Linux當訊源的文,但是對於後續管理及播放操作的,好像比較少
3.如何知道是支援的DAC?還是PnP?不需要裝driver

14

主題

849

回帖

0

積分

新手上路

三星級會員

舊站積分
2319
舊站發表文章數
826
 樓主| 發表於 2013-12-16 17:00:16 | 顯示全部樓層
原發表者是 god_fire
[B]不好意思,因為對Linux不熟,想請教幾個問題
1.在Linux怎麼ripper CD?有類似iTune的東西嗎?如何管理音樂?
2.可以用iPad或Android phone遙控播放嗎?
看了一些介紹以Linux當訊源的文,但是對於後續管理及播放操作的,好像比較少
3.如何知道是支援的DAC?還是PnP?不需要裝driver [/B]


god_fire兄

基本上小弟為求方便性, CD 的RIP工作都是在MS Windows 下進行的, linux 當然也有RIP的軟體, 例如 CD ripper, 但小弟還沒用過就是了.

linux 只要有開起網路功能便可利用手機透過家中WIFI進行無線歌曲點播, 或是利用家中任何一台有連上區域網路的電腦來操控, 軟體如 Gnome Music Player Client 介面也非常容易操作.

如何知道音效卡有無支援可到ALSA網站先基本查詢, http://www.alsa-project.org/main/index.php/Matrix:Main
至於USB DAC 如果有支援USB AUDIO CALSS 2.0 的基本上都不需要另外安裝DRIVER, 一般如果廠商網頁介紹說有支援MAC電腦不用驅動者, 通常就是UAC 2.0的, 近期比較新版的 linux 應該都可直接支援, 另外就是有些大廠會提供LINUX專用驅動, 可下載自行編譯即可.
您需要登錄後才可以回帖 登錄 | 立即註冊

本版積分規則

Archiver|MyAV視聽商情網 test

GMT+8, 2026-11-19 16:56 , Processed in 0.103856 second(s), 41 queries .

Powered by MyAV!

快速回覆 返回頂部 返回列表