'2021/09/26'에 해당되는 글 3건

  1. 2021.09.26 스피커가 부실했군..
  2. 2021.09.26 해피빈 기부
  3. 2021.09.26 odroid c2 usb otg, libcomposite usb hid
embeded/raspberry pi2021. 9. 26. 17:33

일단 앰프는 class D 앰프고

얘는 PWM 어쩌구 하던데 원리까지 알아보려니 급 귀찮고..

 

The PAM8403 is a 3W, class-D audio amplifier.

[링크 : https://pdf1.alldatasheet.com/datasheet-pdf/view/1132029/DIODES/PAM8403.html]

[링크 : https://blog.naver.com/iknowiknow/40021691136]

 

지금보니 스피커는 0.5W

드라이브는 3W+3W 가능한데 오늘 odroid에 연결해서 5V 어댑터 전원 끌어오니 음질이 썩 나쁘진 않은것 같기도?

0.5W 면은 5V * 0.1A 일텐데, 두개니까 0.2A

전에도 그렇겠지만 딱히 커버 불가능한 수준은 아닌것 같은데 왜였을까..

[링크 : https://blog.naver.com/damtaja/221848352426]

2020.04.17 - [embeded/arduino(genuino)] - PAM8403 3W 스테레오 오디오 앰프

 

다른 저가형 사운드바를 봐도 3W 를 많이 쓰는데 비슷한 등급의 부품을 써서 만드는 것 같네.

'embeded > raspberry pi' 카테고리의 다른 글

rpi 4는 USB to Ethernet이 아닌가?  (0) 2021.09.29
rpi zero otg  (0) 2021.09.27
rpi 2b g_mass_storage  (0) 2021.09.25
rpi4에서 gpio readall 실행 안될 때  (0) 2021.09.24
rpi 4 lirc tx, rx  (0) 2021.09.23
Posted by 구차니
개소리 왈왈/블로그2021. 9. 26. 16:39

어느덧 또 소멸되는 날이 다가온 듯.

 

내 돈 하나 안쓰고 생색내는 기부 완료!

'개소리 왈왈 > 블로그' 카테고리의 다른 글

홈페이지 호스팅.. 버릴까  (0) 2022.02.27
기부 시즌  (0) 2022.01.21
으아아아 하루 안썼네  (0) 2021.08.04
해피빈 기부 룰렛  (0) 2021.07.14
해피빈 소멸예정!  (2) 2021.06.23
Posted by 구차니
embeded/odroid2021. 9. 26. 08:51

방법들은 비슷한데.. 따라하는데 영 안되네?

functions 디렉토리에 hid.usb0 디렉토리를 생성하는데 에러가 발생.

#!/bin/bash
# From the README at https://github.com/girst/hardpass

dtoverlay dwc2
modprobe dwc2
modprobe libcomposite
cd /sys/kernel/config/usb_gadget/
mkdir -p g1
cd g1
echo 0x1d6b > idVendor # Linux Foundation
echo 0x0104 > idProduct # Multifunction Composite Gadget
echo 0x0100 > bcdDevice # v1.0.0
echo 0x0200 > bcdUSB # USB2
mkdir -p strings/0x409
echo "fedcba9876543210" > strings/0x409/serialnumber
echo "girst" > strings/0x409/manufacturer
echo "Hardpass" > strings/0x409/product

N="usb0"
mkdir -p functions/hid.$N
echo 1 > functions/hid.usb0/protocol
echo 1 > functions/hid.usb0/subclass
echo 8 > functions/hid.usb0/report_length

echo -ne \\x05\\x01\\x09\\x06\\xa1\\x01\\x85\\x01\\x05\\x07\\x19\\xe0\\x29\\xe7\\x15\\x00\\x25\\x01\\x75\\x01\\x95\\x08\\x81\\x02\\x95\\x01\\x75\\x08\\x81\\x03\\x95\\x05\\x75\\x01\\x05\\x08\\x19\\x01\\x29\\x05\\x91\\x02\\x95\\x01\\x75\\x03\\x91\\x03\\x95\\x05\\x75\\x08\\x15\\x00\\x25\\x65\\x05\\x07\\x19\\x00\\x29\\x65\\x81\\x00\\xc0\\x05\\x01\\x09\\x02\\xa1\\x01\\x09\\x01\\xa1\\x00\\x85\\x02\\x05\\x09\\x19\\x01\\x29\\x03\\x15\\x00\\x25\\x01\\x95\\x03\\x75\\x01\\x81\\x02\\x95\\x01\\x75\\x05\\x81\\x03\\x05\\x01\\x09\\x30\\x09\\x31\\x15\\x81\\x25\\x7f\\x75\\x08\\x95\\x02\\x81\\x06\\xC0\\xC0 > functions/hid.usb0/report_desc

C=1
mkdir -p configs/c.$C/strings/0x409
echo "Config $C: ECM network" > configs/c.$C/strings/0x409/configuration
echo 250 > configs/c.$C/MaxPower
ln -s functions/hid.usb0 configs/c.$C/

ls /sys/class/udc > UDC

[링크 : https://ndb796.tistory.com/481]

[링크 : https://www.isticktoit.net/?p=1383]

[링크 : https://www.sysnet.pe.kr/2/0/11363]

 

혹시 권한 문제인가 해서 추가해도 안되고..

sysfs 특성이라 드라이버에서 허가되지 않는 파일은 생성이 안되는 것 같은데 왜 일까..

# ls -al
drwxr-xr-x 2 root root    0 Sep 26 09:15 functions

# chmod 777 functions/
# ls -al
drwxrwxrwx 2 root root    0 Sep 26 09:15 functions

# mkdir hid.usb0
mkdir: cannot create directory 'hid.usb0': No such file or directory
# touch hid.usb0
touch: cannot touch 'hid.usb0': Permission denied

 

 

+

3.16 커널인데 3.19 이후 부터 된다고. 드라이버 지원(하드웨어 가속)을 포기하고 신버전을 써봐야 할지도?

# ll /lib/modules/3.16.72-46/kernel/drivers/usb/gadget/
total 804
drwxr-xr-x 2 root root  4096 Aug 13  2019 ./
drwxr-xr-x 7 root root  4096 Aug 13  2019 ../
-rw-r--r-- 1 root root 14424 Aug 13  2019 g_acm_ms.ko
-rw-r--r-- 1 root root 23784 Aug 13  2019 g_audio.ko
-rw-r--r-- 1 root root 12048 Aug 13  2019 g_cdc.ko
-rw-r--r-- 1 root root 14920 Aug 13  2019 g_ether.ko
-rw-r--r-- 1 root root 19632 Aug 13  2019 g_ffs.ko
-rw-r--r-- 1 root root 24208 Aug 13  2019 g_hid.ko

# insmod g_hid
insmod: ERROR: could not load module g_hid: No such file or directory

# modprobe g_hid
modprobe: ERROR: could not insert 'g_hid': No such device

# uname -a
Linux odroid 3.16.72-46 #1 SMP PREEMPT Tue Aug 13 18:09:58 -03 2019 aarch64 aarch64 aarch64 GNU/Linux

[링크 : https://forum.odroid.com/viewtopic.php?t=36602]

[링크 : https://forum.odroid.com/viewtopic.php?t=30267]

'embeded > odroid' 카테고리의 다른 글

g_mass_storage ins/rm 실패  (0) 2021.09.28
odroid c2 ubuntu 18.04, 20.04 kernel 버전 정보  (0) 2021.09.27
odorid c2 usb otg gadget keyboard as hid  (0) 2021.09.23
odroid c2 OTG와 mass storage  (0) 2021.09.19
odroid c2 ADC  (0) 2021.09.19
Posted by 구차니