Cov txheej txheem:

Raspberry Pi Tag Nrho Lub Tsev Synchronous Audio Nrog Lub Xov Tooj App Remotes: 10 Cov Kauj Ruam (nrog Duab)
Raspberry Pi Tag Nrho Lub Tsev Synchronous Audio Nrog Lub Xov Tooj App Remotes: 10 Cov Kauj Ruam (nrog Duab)

Video: Raspberry Pi Tag Nrho Lub Tsev Synchronous Audio Nrog Lub Xov Tooj App Remotes: 10 Cov Kauj Ruam (nrog Duab)

Video: Raspberry Pi Tag Nrho Lub Tsev Synchronous Audio Nrog Lub Xov Tooj App Remotes: 10 Cov Kauj Ruam (nrog Duab)
Video: Zoo Siab Nrog Koj - Paj Tsua Thoj [ Official MV ] Nkauj Tawm Tshiab 2022 2024, Hlis ntuj nqeg
Anonim
Raspberry Pi Tag Nrho Tsev Synchronous Audio Nrog Xov Tooj App Remotes
Raspberry Pi Tag Nrho Tsev Synchronous Audio Nrog Xov Tooj App Remotes
Raspberry Pi Tag Nrho Tsev Synchronous Audio Nrog Xov Tooj App Remotes
Raspberry Pi Tag Nrho Tsev Synchronous Audio Nrog Xov Tooj App Remotes

Lub hom phiaj yog sib txuas suab thiab/lossis tus kheej cov peev txheej hauv ib chav twg, tswj tau yooj yim nrog lub xov tooj lossis ntsiav tshuaj ntawm iTunes Remote (kua) lossis Retune (android). Kuv kuj xav kom lub suab kaw kom qhib/kaw tau yog li kuv tig mus rau Raspberry Pi thiab Hifiberry rau teeb tsa nws thiab hnov qab nws daws teeb meem.

Daim Ntawv Teev Npe rau ib cheeb tsam suab:

  • Raspberry pi 3 $ 35
  • SD daim npav 16G $ 8
  • Hifiberry AMP2 $ 50
  • Fais fab mov 5.5mm x 2.1mm DC Plug, 12V 5A 60W $ 12
  • Hais lus $ 75 (huab cua pov thawj rau qab nthab chav dej)
  • Music server (PC khiav iTunes)

Rau teeb xwb

  • USB mus
  • USB keyboard
  • Hdmi zaub
  • USB hwj chim ntsaws
  • USB rau micro USB cable

Kauj ruam 1: Rub tawm rau koj lub PC

Hloov kho 7/5/19 Hla qhov kev qhia no thiab tsuas yog teeb tsa

Huag kuv gosh nws puas tau yooj yim rau teeb tsa/siv thiab ua txhua yam koj yuav tau txais los ntawm cov ntawv qhia no ntxiv rau ntau ntxiv. Nws tseem cia koj teeb nws kom khiav raws qhov nkag mus yog tias koj nyiam yog li koj tuaj yeem txaus siab rau koj lub taub hau tsis txaus daim phiaj

  1. Rub tawm daim npav Sd daim npav (lossis tsis yog, kuv tsis xav tau) Qhov kev tsim no tsuas yog siv los ua lub dav hlau dav hlau kom 16G muaj chaw txaus thiab daim npav tuaj yeem ua raws li fat32.
  2. NOOBS Ntawm kuv lub tshuab Windows 10, Kuv yooj yim xaiv kuv daim npav SD ua lub hom phiaj rau unzip NOOBS tom qab rub tawm.
  3. Nruab VNC tus saib ntawm lub PC yog li koj tuaj yeem txav deb lub desktop rau koj Pi tom qab koj tau teeb tsa nws. Nws twb tau teeb tsa ntawm koj li Raspberry Pi.

Kauj ruam 2: Nruab Raspbian OS

Nruab Raspbian OS
Nruab Raspbian OS
  1. Muab daim npav SD tso rau hauv koj lub raspberry thiab txuas lub HDMI saib, usb keyboard thiab nas nas
  2. Fais fab Pi nrog lub mini usb txuas. TSIS TXHOB siv lub zog usb yog tias koj lub hifiberry amp tau teeb tsa. (Hifiberry amp hwj chim koj raspberry)
  3. USB nas thiab keyboard yuav ua haujlwm rau koj ntawm lub zog nce. Xaiv koj cov lus/keyboard hauv qab ntawm qhov screen.
  4. Xaiv Raspian OS.
  5. Yog tias siv wifi, xaiv koj lub network wifi thiab nkag mus rau hauv. Ntau yam khoom txias tau muaj tom qab koj pi koom nrog koj lub network, tsis txhob ua. Tsuas yog lo nrog raspbian. Nyem nruab. Saib cov ntaub ntawv hais txog koj cov raspberry ntawm qhov screen thaum nws teeb tsa. Tso dag xwb. Mus ua ib yam dab tsi thiab tshawb xyuas tom qab, nws yuav siv sijhawm me ntsis.

Kauj ruam 3: Tom qab Raspbian OS Installation

  1. Tom qab booting txog koj li tshiab raspbian desktop, nyem rau ntawm raspberry (nws zoo li pib cov ntawv qhia zaub mov hauv Windows)
  2. Xaiv Raspberry Pi Configuration thiab ua txhua yam hauv qab no:

    1. Hloov PASSWORD!
    2. Kev cuam tshuam

      Pab kom SSH thiab VNC (Kuv nyiam VNC, Kuv yuav qhia koj vim li cas tom qab)

    3. Localization

      Teem tag nrho koj cov khoom (thaj tsam sijhawm, lub tebchaws, …)

    4. Hloov hostname

      Hloov qhov no mus rau lub npe ntawm thaj chaw suab. Ua lub npe tshwj xeeb, koj yuav muaj ntau thaj chaw

  3. Rov pib dua.

Kauj Ruam 4: Nrhiav Rasberry's IP Address

  1. Raspberries teeb tsa ua lub mloog pob ntseg tsis tuaj yeem yooj yim nkag ncaj qha, koj yuav xav kom nyob deb ntawm nws los ntawm PC.
  2. Koj yuav tsum paub tus IP chaw nyob ntawm koj tus Pi.

    Ntawm lub raspbian desktop, yog tias koj nas hla lub cim wifi hauv lub luag haujlwm, nws yuav tshwm ib lub npov xov xwm uas koj tuaj yeem pom tus IP koj lub router tau muab rau raspberry. Kuv lub router muaj qhov tshwj xeeb los xaiv cov cuab yeej ntawm lub network thiab ib txwm muab tus IP tib yam. Nov yog txoj hauv kev tsawg kawg tiv thaiv kom muab tus "zoo li qub" IP chaw nyob rau kuv tus Pi. Qhov chaw nyob IP ua rau lub neej yooj yim dua

Kauj Ruam 5: Nruab Cov Khoom

Nruab Cov Khoom
Nruab Cov Khoom
Nruab Cov Khoom
Nruab Cov Khoom
Nruab Khoom
Nruab Khoom

Yog tias koj tseem tsis tau txuas koj daim npav suab / lub suab nrov ntxiv, ua tam sim no nrog koj Pi kaw

Fais fab koj Pi thiab qhib VNC tus saib ntawm koj lub PC. VNC server app tau suav nrog koj tus raspberry pi thiab koj tau qhib nws hauv cov kauj ruam dhau los. Ua qhov txuas tshiab qhia rau VNC tus saib IP ntawm koj cov txiv pos nphuab.

Muaj qhov hais kom ua qhov rai luv ntawm txoj haujlwm bar ntawm koj lub raspberry lub desktop. Qhib qhov hais kom sai thiab nkag mus:

sudo apt-tau hloov tshiab

Tom qab nws ua tiav nkag mus:

sudo apt-tau hloov tshiab

kaw qhov hais kom ua sai thiab qhib cov ntawv qhia zaub mov raspberry, peb yuav nruab qee qhov software yooj yim.

nyem Nyiam => Ntxiv/ Tshem Tawm Software

nrhiav shairport-sync thiab nruab nws

ua tib yam rau EQ

koj tseem tuaj yeem nruab EQ nrog

sudo apt-tau nruab -y libasound2-plugin-sib npaug

Kauj Ruam 6: Ib Zaug Ntxiv Hauv Cov Lus Hais Kom Ua

Peb yuav tsum paub qee yam txog daim npav suab

Qhib kab hais kom ua sai.

Nkag mus rau cov lus txib aplay likel zoo li hauv qhov piv txwv ntawm no.

Daim ntawv ceeb toom hifiberry amplifier yog daim npav 1

pi@Balcony: ~ $ aplay -l

**** List of PLAYBACK Hardware Devices **** daim npav 0: ALSA [bcm2835 ALSA], ntaus ntawv 0: bcm2835 ALSA [bcm2835 ALSA] Kev faib tawm: subevice #0: subdevice #0 subdevice #1: subdevice #1 subdevice #2: subdevice #2 Subdevice #3: subdevice #3 subdevice #4: subdevice #4 subdevice #5: subdevice #5 subdevice #5: subdevice #6 subdevice #7: subdevice #7 card 0: ALSA [bcm2835 ALSA], ntaus ntawv 1: bcm2835 ALSA [bcm2835 IEC958/HDMI] Kev faib tawm me me: sub faib #0: subdevice #0 daim npav 1: sndrpihifiberry [snd_rpi_hifiberry_dacplus], ntaus ntawv 0: HiFiBerry DAC+ HiFi pcm512x-hifi-0 subevices: subdivice #0

Kauj Ruam 7: Ua Asound.conf Cov Ntaub Ntawv

Koj xav tau cov ntaub ntawv "asound.conf" nyob ntawm /etc/asound.conf

Cia ua. (Tam sim no peb yuav tau txais vim li cas kuv nyiam VNC mus rau qhov deb rau hauv koj Pi piv rau qee yam zoo li putty)

Ntawm qhov hais kom ua sai ntawm koj Pi mus rau / etc / directory thiab sau qhov no:

sudo leafpad asound.conf

Yog tias koj tau siv putty, daim ntawv hais kom ua leafpad yuav tsis ua haujlwm. Hauv qhov xwm txheej ntawd koj yuav ntaus:

sudo nano asound.conf

Nano hais kom ua qhib cov ntawv sau hauv lub qhov rai hais kom ua. Nws yooj yim txaus siv tab sis me ntsis clunky. Koj siv tsis tau koj tus nas thiab kuv pom nws nyuaj me ntsis los nyeem.

Leafpad ntawm qhov tod tes qhib lub qhov rai cais uas coj zoo li notepad hauv lub qhov rais. Kuv pom nws yooj yim nyeem thiab siv tau yooj yim dua.

Txawm li cas los koj mus txog ntawd, koj yuav tsum ua kom koj asound.conf zoo li no:

pwm! default {

hom ntsaws slave.pcm plugequal; } ctl.! default {hom hw card 1} ctl.equal {hom sib npaug; } pcm.plugequal {hom sib npaug; slave.pcm "plughw: 1,0"; } pcm.equal {hom ntsaws; qhev.pcm plugequal; }

Pom cov kab uas hais tias hw daim npav 1 thiab plughw: 1,0

Yog tias koj lub suab pom pom ntawm cov kauj ruam dhau los tsis yog daim npav 1 koj yuav tsum tau hloov kho kab ntawm no kom pom koj daim npav.

Txuag koj txoj haujlwm. Nws yuav tsum muaj npe asound.conf thiab nyob hauv phau ntawv teev npe /lwm yam /

Kaw qhov hais kom ua sai. (koj tuaj yeem nkag mus rau lo lus txib "tawm" kom kaw lub davhlau ya nyob twg)

Rov pib dua! Kuv tau hnov qab rov pib dua ntawm lub sijhawm no ua ntej thiab qhov ntawd yog kev ntxhov siab thaum koj xav tias muaj qee yam tsis raug thiab koj pib teeb meem tua thaum txhua yam koj xav tau yog REBOOT.

Koj yuav tsum rov pib dua ntawm no.

Kauj Ruam 8: Hloov Eq Qib

Hloov Eq Qib
Hloov Eq Qib

Tom qab khau raj koj yuav tsum tam sim no tuaj yeem airplay rau koj raspberry ncaj qha los ntawm koj lub xov tooj. Qhov no yuav tsis yog chav sib koom ua ke tab sis nws tseem txaus. Ua si ib yam.

Tej zaum koj yuav pom tias chav xav tau qee yam EQ. Qhib cov lus txib tam sim ntawm koj cov txiv pos nphuab ib zaug ntxiv thiab peb yuav tau txais EQ teeb tsa.

Ntawm koj qhov kev hais kom ua tam sim hauv tsev hom ntawv:

sudo -u shairport -sync alsamixer -D sib npaug

Qhov no ua dab tsi?

sudo = admin txoj cai

-u shairport-sync = khiav cov lus txib ua lwm tus neeg siv, hauv qhov no shairport-sync

alsamixer -D sib npaug = qhib ntawm qhov sib npaug

Los ntawm txoj kev, yog tias koj nkag mus:

alsamixer

Nws yuav coj koj mus rau qhov chaw rau koj daim npav suab.

Kauj Ruam 9: Siv iTunes los ntawm lub PC thiab Txuag Lub Neej Roj Teeb ntawm Koj Lub Xov Tooj

Siv iTunes los ntawm lub PC thiab Txuag Roj Teeb ntawm Koj Lub Xov Tooj
Siv iTunes los ntawm lub PC thiab Txuag Roj Teeb ntawm Koj Lub Xov Tooj
Siv iTunes los ntawm lub PC thiab Txuag Roj Teeb ntawm Koj Lub Xov Tooj
Siv iTunes los ntawm lub PC thiab Txuag Roj Teeb ntawm Koj Lub Xov Tooj

Txog tam sim no koj twb muaj lub tshav dav hlau zoo nkauj txaus siv lub suab. Tam sim no peb tuaj yeem coj nws nqis siab dua los ntawm kev qhib iTunes.

Nruab ib lub iTunes Remote app, lossis Rov Qab rau hauv. Qhib lub app ntawd thiab koj tuaj yeem txuas koj lub cuab yeej rau kev khiav iTunes ntawm koj lub PC.

Tam sim no koj muaj qhov txaus ntawm shairport-sync. Txhua qhov koj thaj chaw tau ua si ib leeg. Koj tuaj yeem tswj hwm lub ntim hauv txhua cheeb tsam thiab txheeb xyuas koj lub tsev qiv ntawv iTunes los ntawm txhua lub cuab yeej uas koj teeb tsa lub app rau. Koj tus poj niam tuaj yeem pib ua suab paj nruag thiab koj tuaj yeem qhib lub app ntawm koj lub xov tooj, nyem tam sim no ua si thiab pom dab tsi ua si zoo li koj tau ua nws tus kheej thiab tswj nws. Lossis koj tuaj yeem kaw chav uas koj nyob hauv thiab tso tawm lwm yam rau koj thaj chaw ncaj qha los ntawm koj lub xov tooj zoo li koj tau ua ua ntej iTunes tau khiav.

Peb tawm iTunes khiav txhua lub sijhawm ntawm PC hauv qab daus uas peb lub tsev qiv ntawv iTunes loj heev nyob ntawm RAID1 NAS.

Kuv yuav luag tsis nco qab hais txog, koj tuaj yeem tswj hwm lub kaw lus no nrog lub kua saib. Raws li lub kua saib yog dej pov thawj Kuv tuaj yeem hloov nkauj thiab kho lub ntim thaum da dej.

Kauj Ruam 10: Cov Nqe Ntxiv: Advanced Shairport-sync Parameters

Txoj hauv kev no cov lus qhia muaj koj cov raspberry teeb tsa, hloov pauv mus rau shairport-sync.conf cov ntaub ntawv tsis xav tau tab sis, Kuv ua qhov kev hloov pauv no rau kuv thaj tsam suab tsim yog li kuv sau tau zoo dua ntawm no.

Siv koj txoj hauv kev nyiam rau kev hais kom ua kab ntawv kab ntawv zoo ib yam li koj tau ua hauv cov theem ua ntej, ua ib qho kev hloov pauv rau shairport-sync teeb tsa cov ntaub ntawv, /etc/shairport-sync.conf

Kuv tsis pom zoo "allow_session_interruption" thiab hloov nws mus = "yog"

// Kev ntsuas tsis zoo rau kev tswj hwm Shairport Sync runssessioncontrol = {// run_this_before_play_begins = "/tag nrho/path/to/application and args"; // Nco ntsoov tias daim ntawv thov muaj kev tso cai ua haujlwm. Nws yog tsab ntawv, suav nrog #!… Cov khoom ntawm thawj kab // run_this_after_play_ends = "/tag nrho/txoj kev/rau/daim ntawv thov thiab sib cav"; // Nco ntsoov tias daim ntawv thov muaj kev tso cai ua haujlwm. Nws yog tsab ntawv, suav nrog #!… Cov khoom ntawm thawj kab // wait_for_completion = "tsis muaj"; // teeb tsa "yog" kom tau txais Shairport Sync tos kom txog thaum "run_this …" daim ntawv thov tau txiav tawm ua ntej txuas ntxiv tso cai_session_interruption = "yog"; // teeb tsa "yog" tso cai rau lwm lub cuab yeej los cuam tshuam Shairport Sync thaum nws ua si los ntawm cov suab uas twb muaj lawm // session_timeout = 120; // tos tus naj npawb ntawm vib nas this tom qab qhov chaw ploj mus ua ntej txiav qhov kev sib tham thiab rov muaj dua. };

Qhov no yuav cia koj hijack ib cheeb tsam suab nrog koj qhov chaw thaum lwm tus siv nws.

Yog tsis muaj kev hloov pauv no, ib cheeb tsam tuaj yeem tsis kam ua koj lub suab nkauj thaum nws tau siv los ntawm lwm tus. Qhov no tsis xav tau yog tias koj siv iTunes cov chaw taws teeb apps, txhua lub cuab yeej siv lub app ntawd tsuas yog ua raws li kev tswj hwm kom tswj hwm tib lub hauv paus. Shairport-sync.conf kev hloov pauv yog rau thaum koj tab tom yuav tawm mus rau thaj tsam los ntawm qhov chaw tshiab, zoo li ncaj qha los ntawm koj lub xov tooj mus rau ib cheeb tsam uas twb tau ua si los ntawm lwm qhov chaw. Yog tias koj xav tias kev sib tham cuam tshuam zoo li suab tsis meej pem uas tsuas tuaj yeem ua rau muaj ntshav tawm, tsis quav ntsej txog Cov Nyiaj Tau Txais Kauj Ruam no.

Pom zoo: