Jim Lesurf said:
In article ,
Richard Robinson wrote:
Jim Lesurf said:
[snip]
And I think this becomes a matter of intellectual curiosity ...
Yes. In itself, byte padding doesn't matter. ...
... one thing I realise I'm not clear on is, what's actually being sent
down the cable into the DAC. Talk of byte-padding suggests that the
compressions (flac/mp3) are unpacked in the alsa layer, or higher, and
the DAC receives raw samples ? But the DAC itself supports these
formats, so is there still some unnecessary conversion going on ?
Chances are that the DAC only understands plain LPCM (usuallly little-end
order as in a wave file.) Any other type of file you play will need to be
coverted into LPCM by the playing software or some other 'intermediary'
layer of software. This will depend on your choice of playing software.
But, yes, flac or mp3 will have to be being turned into LPCM before is goes
though ALSA to the hardware.
Having now had another reread of The Manual, I think what I was missing is
that it talks about "Digital inputs" (S/PDIF, TOSlink) and "USB in" in
separate sections. So it doesn't regard USB as digital info, it expects the
raw bytestream ? Okay, I can wrap my head round that, now I've noticed it.
I also toggled the DAC into Class 2 Audio mode, with no discernible effect
on the bitrate LED (there may be more to do here wrt s/w support, and maybe
cabling).
I now have half-a-zillion different ways of playing the files, all of
them faintly cranky from some viewpoint or other.
I think I want to try a clean reinstall of the raspberry, see how far I can
get before something drags in complications like pulse.
I've also got involved in a recording project that's pushing me to learn
how to drive audacity, I might want to be sure that files I work on
there aren't losing any quality. *sigh* Inputs could be a whole other
mess, I'm not sure how far I want to take that ...
Well, you can use '-arecord'. This is the ALSA command that can be used to
capture audio from devices in the same way as '-aplay' lets you play audio.
If nothing else, that will let you check what is happening. It represents
the simplest and most basic way to record and just uses ALSA. So no other
software need get in the way. (You can also use 'sox' to play and record
and it will do format conversions as it does so.)
FWIW I've written a basic sound recording program for Linux which uses ALSA
and *only* pads with bytes where needed. It also gives a 'PPM' display so
you can monitor the levels. The program, with source code, is linked from
the software page on my Audiomisc website. I wrote this program
specifically to ensure that the program was one I knew would *not* fiddle
about with the values. Note that as it stands it assumes you will use a USB
audio device. But that could be changed if you require.
The above program is what I use to make audio recordings.
I want to record what I sound like against a couple of mono tracks recorded
alsewhere; Audacity looks like the easiest bet.
(There are also some other programs like a sig gen and scope/FFT analyser
so you can do tests.)
If you use Audacity it may convert. e.g. I think it tends to turn
everything into 32 bit floats internally. But you should be able to set it
to use 'hw:' or 'plughw', and in my own tests it seems to preserve 24 bit
recodings with bit-accuracy. So it should be OK if used with care.
It seems fairly civilised, in the sense that the devices it offers are the
ALSA names (I'm still not sure what my problem was there, but it seems to
have gone away), so at least I know what it's doing wrt i/o.
But this is currently a hardware issue - the only mic I can find is an old
AKG dynamic, which isn't what the headphone/mic socket on a laptop likes; v.
low signal, hideously infeasible hiss (I used to have a more suitable one,
but idiotically I put it away with a battery in and now the contacts are
corroded. I'm a fool). Yes, USB would probably be the way to go; the friend
I'm doing the recording with has offered to lend me an "interface"; from
which I expect to learn /something/.
But this gets clunky over rdesktop on the raspberry pi, I'm back to a USB
cable trailing across the floor from a laptop ...and fighting off thoughts
of installing something bigger and more complicated than audacity. ardour ?
Gaah ... *grin*.
--
Richard Robinson
"The whole plan hinged upon the natural curiosity of potatoes" - S. Lem
My email address is at
http://www.qualmograph.org.uk/contact.html