Comments (11)
Hi @kmickz , can you provide the image file you are using? Not all audio formats are supported by the driver.
from mt762x-wm8960.
Have you tried playing stereo audio?
from mt762x-wm8960.
can you provide me supported audio file link
from mt762x-wm8960.
hey @redchenjs i tried all formats but still there is no sound please can you suggest me what i am doing wrong also tried both mono and stereo audio but still make no difference
root@OpenWrt:~# aplay -vv pcm1608s.wav
Playing WAVE 'pcm1608s.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Stereo
Plug PCM: Hardware PCM card 0 'MT762X WM8960 ASoC Card' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 8000
exact rate : 8000 (8000/1)
msbits : 16
buffer_size : 4096
period_size : 1024
period_time : 128000
tstamp_mode : NONE
tstamp_type : MONOTONIC
period_step : 1
avail_min : 1024
period_event : 0
start_threshold : 4096
stop_threshold : 4096
silence_threshold: 0
silence_size : 0
boundary : 1073741824
appl_ptr : 0
hw_ptr : 0
#+ | 00%
from mt762x-wm8960.
Hi @kmickz, have you checked the REFCLK pin of the WM8960 and the device tree file you used? Maybe we can take a look at the schematic for the audio part.
from mt762x-wm8960.
@redchenjs , yes i check REFCLK pin it continuously generating 12Mhz clock(cross-check with CRO) here is my dts file configuration
for better understating of problem
#include "mt7628an.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "mediatek,mt7628an-eval-board", "mediatek,mt7628an-soc";
model = "Mediatek MT7628AN evaluation board";
};
&state_default {
gpio {
groups = "gpio";
function = "gpio";
};
refclk {
groups = "refclk";
function = "refclk";
};
i2s {
groups = "i2s";
function = "i2s";
};
};
&wmac {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
factory: partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0x7b0000>;
};
};
};
};
&i2c {
status = "okay";
codec: wm8960@1a {
compatible = "wlf,wm8960";
reg = <0x1a>;
wlf,shared-lrclk;
};
};
&i2s {
status = "okay";
};
&gdma {
status = "okay";
};
/ {
sound {
compatible = "mediatek,mt762x-wm8960-machine";
mediatek,platform = <&i2s>;
mediatek,audio-codec = <&codec>;
audio-routing =
"Headphone", "HP_L",
"Headphone", "HP_R",
"Ext Spk", "SPK_LN",
"Ext Spk", "SPK_LP",
"Ext Spk", "SPK_RN",
"Ext Spk", "SPK_RP",
"Mic", "MICB",
"LINPUT1", "Mic",
"LINPUT2", "Line In",
"RINPUT2", "Line In";
};
};
from mt762x-wm8960.
following is circuit i am using
from mt762x-wm8960.
@kmickz The refclk
in the dts file is not needed, the board has an external crystal oscillator for WM8960.
from mt762x-wm8960.
@redchenjs removing refclk from dts file make no difference
from mt762x-wm8960.
@kmickz I use the LinkIt Smart 7688
board with Breakout for LinkIt Smart 7688 v2.0
. The WM8960 configuration is almost the same, except for the audio input part. Breakout_for_LinkIt_Smart_7688_v2.0_schematic_files.zip
I tested the wav
file and mp3
file using the following commands: test.wav.zip test.mp3.zip
WAV file:
aplay /tmp/test.wav
MP3 file:
madplay /tmp/test.mp3
The playback is fine, and the capture works as well:
arecord -f cd | aplay
My build environment is as follows:
OpenWrt 21.02-SNAPSHOT, r16827-23ad680a345 Kernel 5.4.231
Driver source: https://github.com/redchenjs/mt762x-wm8960/tree/linux-5.4
DTS file: https://github.com/redchenjs/mt762x-wm8960/blob/linux-5.4/examples/mt7628an_mediatek_linkit-smart-7688.dts
from mt762x-wm8960.
hii @redchenjs i was trying to fix this problem can not find solution yet can you please provide me some details regarding your linux 5.4.231
it looks like my DAC is in off state here is some logs which i get
root@OpenWrt:/sys/kernel/debug/asoc/MT762X WM8960 ASoC Card/wm8960.0-001a/dapm# cat Left\ DAC Left DAC: Off in 0 out 4 - R26(0x1a) mask 0x100 stream Playback inactive out "PCM Playback Switch" "Left Output Mixer" in "static" "Playback"
from mt762x-wm8960.
Related Issues (17)
- Kernel bug detected[#1]: HOT 1
- mono sound fault HOT 2
- aplay -l命令找不到声卡 HOT 4
- 有时候会找不到声卡 HOT 5
- Change I2S clock speed HOT 2
- 这个驱动可以支持非i2c的芯片吗 例如pcm5102a
- Watchdog reboot after Ctrl-C of aplay HOT 2
- Unable to setup on mt7621
- MCLK && Master or slave HOT 1
- openwrt master 分支移植错误 HOT 35
- openwrt 19.07.0 内核 4.14.162 HOT 3
- 新版本的openwrt上无法使用 HOT 7
- Error compilation on OpenWRT/v19.07.6 HOT 2
- mono sound fault HOT 4
- default group /dev/snd/* HOT 2
- Madplay error HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mt762x-wm8960.