[alsa-devel] M-Audio Audiophile 192 (ice1724)'s broken spdif capture

Pavel Hofman pavel.hofman at ivitera.com
Mon Feb 25 12:47:54 CET 2013

On 23.2.2013 23:13, Jonas Petersen wrote:
>>> Ok, why not adding a control for that. But first explain something to
>>> me. I see these 15 control definitions "snd_ak4114_iec958_controls[]" in
>>> ak4114.c. How are they accessed? Where can I read for example the
>>> "IEC958 External Rate" value? In the proc dir they do not show up.
>>> Neither at Juli nor at AP192. Are these only API functions?
>> see output of amixer contents. They are defined as PCM-type controls
>> (not MIXER type and do not apper e.g. in alsamixer.
> Thanks, found it. Would that help in finding out how the card is
> detecting rate without any clue?

Hopefully. It shows you values of all ak4114 registers. The same
information as available to the windows driver.

Now can you please look at the regs if you can spot any hint of the
incoming sample rate from Juli (specifically the spdif channel status
regs and the incoming fs regs)? Thanks.

> I once read somwhere about a kind of hackish way of detecting sampling
> frequency by just capturing some samples (at a fixed rate) and
> calculating by comparing what you get to what you're supposed to get (or
> something like that, don't remember exactly). Can't find it anywhere
> right now though.
> Might it be that the windows driver is doing something like that as a
> fallback (or even always) when there is no channel status?

Well, it is certainly feasible but I very much doubt the driver does it.

> I'd like to once send the card a - let's say - 44.1 kHz signal with a -
> let's say - 96 kHz info in the channel status and see what the windows
> driver says. :)

Take a look at the iecset utility. It sets the IEC958 channel status
bits of the spdif transmitter (e.g. of your Juli or AP192). I would
start a 44.1kHz stream and try to rewrite the values using iecset. You
can check in regs list of your ice1724 card in
/proc/asound/yourcard/ice1724 if the change took place (register MT3C).
The playback may lock the IEC958 channel status controls. If it is the
case, try to comment out the IEC958 Playback Default "lock true" in

Instead of iecset you can use amixer to manipulate IEC958 Playback
Default directly, but you will have to figure out correct bit values.

Good luck and thanks for the patch you sent :)


More information about the Alsa-devel mailing list