Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F1c200s sound cracking and wave file alloc error #34

Open
Vasili-Sk opened this issue Dec 5, 2021 · 3 comments
Open

F1c200s sound cracking and wave file alloc error #34

Vasili-Sk opened this issue Dec 5, 2021 · 3 comments

Comments

@Vasili-Sk
Copy link

Hello,
In function sound_alloc_from_xfs_wav

	header.riffsz = be32_to_cpu(header.riffsz);
	header.fmtsz = be32_to_cpu(header.fmtsz);
	header.fmttag = be16_to_cpu(header.fmttag);
	header.channel = be16_to_cpu(header.channel);
	header.samplerate = be32_to_cpu(header.samplerate);
	header.byterate = be32_to_cpu(header.byterate);
	header.align = be16_to_cpu(header.align);
	header.bps = be16_to_cpu(header.bps);
	header.datasz = be32_to_cpu(header.datasz);

Should be little endian. i commented this section and wave file worked.
Also playback making some noise while playing, both on wav and original ogg. Feels like some cracking

@jianjunjiang
Copy link
Member

yes, you are right, wav file are little endian

@jianjunjiang
Copy link
Member

This patch fix it.
4f91ef9

@Vasili-Sk
Copy link
Author

Vasili-Sk commented Dec 10, 2021

I have fixed initial pop at startup, but playback still doing some noise
in function

static inline void f1c200s_audio_init(struct audio_f1c200s_pdata_t *pdat)
	//first setup antipop
	tune.PA_ANTI_POP_CTRL = 2; //anti pop on enable
	tune.ZERO_CROSS_EN = 1;
	pdat->codec->ADDA_TUNE = tune.REG32;

You can check my registers files here:
https://github.com/Vasili-Sk/xboot-f1c200s/blob/master/src/arch/arm32/mach-f1c200s/driver/audio-f1c200s.c
https://github.com/Vasili-Sk/xboot-f1c200s/blob/master/src/arch/arm32/mach-f1c200s/include/f1c200s-audio.h

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants