Re: SPDIF/IEC958 sample rate on HDA/ALC882

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Takashi Iwai wrote:

>> aplay -Dhw:0,0 sample.wav gives valid sound through spdif (though
>> limited), but aplay -Dhw:0,1 gives garbage on the same spdif output.
>> That doesn't look like an issue of aplay or the alsa lib, but a driver
>> issue.

> Ok, now I get to know about your tests, which program you used :)
> Still I don't know what is sample.wav, though.  It's 48kHz?
> You can try -Dspdif, too, BTW.

It's really really simple.

I generated wav files from /dev/zero using sox, with sample rates of 32
khz, 44.1 khz, 48 khz and 96 khz. Then I used simply aplay to play them all.

aplay -Dhw:0,0 test.wav

The wavs containing 44.1 and 48 khz play without a problem, BUT when
playing the 44.1 khz file, my DAT recorder still says it 48 khz and it
looks the audio is resampled somewhere. The 32 khz and 96 khz give a
message about sample rate not being available and then aplay selects
44.1 khz instead.

Then I did the same using -Dhw:0,2 (in the latest alsa versions this has
become hw:0,1) and the result is exactly the same (same wavs, same spdif
output,same dat recorder) EXCEPT there is a lot of noise through the
sound. I cannot believe this is a feature... This looks more like a
channels/bits/rate mismatch: one channel has audio AND noise, the other
channel is silent.

> Also, you can compare the proc file content between two states,
> i.e. during aplay -Dhw:0,0 and -Dhw:0,2.
> In addition, check the parameters printed via aplay -v option to see
> whether they are identical.

This is interesting. The 44.1 khz wav file is played by aplay using 44.1
khz, the pcm0p/sub0/hw_params also says it's 44.1 khz, still the DAT
recorder remains locked at 48 khz. Looks like at some point alsa fails
to set the actual output sample rate (spdif modulation)?

There is no difference in this behaviour wether I am using hw:0,0 or hw:0,2

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux