Difference between revisions of "MAX9768"
From ArmadeusWiki
(New page: How to use the MAX9768 class D audio amplifier Before installing the driver, the plateforme file (ie apf27-dev.c) has to be correctly modified to support the MAX9768 i2C chip. ==Driver i...) |
(→Usage) |
||
Line 23: | Line 23: | ||
* Load the module: | * Load the module: | ||
<pre class="apf"> | <pre class="apf"> | ||
− | modprobe max9768 | + | # modprobe max9768 |
</pre> | </pre> | ||
* Power on the IC: | * Power on the IC: | ||
<pre class="apf"> | <pre class="apf"> | ||
− | echo 0 > /sys/class/i2c-dev/i2c-(x)/device/0-004(y)/ shutdown | + | # echo 0 > /sys/class/i2c-dev/i2c-(x)/device/0-004(y)/shutdown |
</pre> | </pre> | ||
Where x is the I2C bus number (0 or 1) and y the i2C address of the chip | Where x is the I2C bus number (0 or 1) and y the i2C address of the chip | ||
Line 34: | Line 34: | ||
* Mute off: | * Mute off: | ||
<pre class="apf"> | <pre class="apf"> | ||
− | echo 0 > /sys/class/i2c-dev/i2c-(x)/device/0-004(y)/ mute | + | # echo 0 > /sys/class/i2c-dev/i2c-(x)/device/0-004(y)/mute |
</pre> | </pre> | ||
* Change volume: | * Change volume: | ||
<pre class="apf"> | <pre class="apf"> | ||
− | echo 50 > /sys/class/i2c-dev/i2c-(x)/device/0-004(y)/ volume | + | # echo 50 > /sys/class/i2c-dev/i2c-(x)/device/0-004(y)/volume |
</pre> | </pre> | ||
Remark: 0 <= volume value < 64 | Remark: 0 <= volume value < 64 | ||
− | |||
==Links== | ==Links== |
Revision as of 11:14, 18 December 2009
How to use the MAX9768 class D audio amplifier
Before installing the driver, the plateforme file (ie apf27-dev.c) has to be correctly modified to support the MAX9768 i2C chip.
Driver installation
$ make linux26-menuconfig
Device Drivers---> Armadeus specific drivers ---> <M> Armadeus Max9768 Audio Amplifier
$ make
Update the APF27 board with the new Linux kernel and rootfs.
Usage
- Load the module:
# modprobe max9768
- Power on the IC:
# echo 0 > /sys/class/i2c-dev/i2c-(x)/device/0-004(y)/shutdown
Where x is the I2C bus number (0 or 1) and y the i2C address of the chip
- Mute off:
# echo 0 > /sys/class/i2c-dev/i2c-(x)/device/0-004(y)/mute
- Change volume:
# echo 50 > /sys/class/i2c-dev/i2c-(x)/device/0-004(y)/volume
Remark: 0 <= volume value < 64