First step is to look at the alsamixer settings and adjust mixers to avoid clipping. If that doesn't help, the second step is to describe the "noticable digital artifacts" and narrow down their source.
Poster reports:
> Well the levels in alsamixer were ok, but I saw a clock rate option and when I changed it from 0 to 20 (I guess these are just placeholders for the sample rate) the sound is perfectly ok.