[alsa-devel] Correct way to set NONAUDIO flag
Hello, I'm trying to figure out the right way to set the NONAUDIO flag on an iec958 device. The idea is that when we get a new stream in PulseAudio that signals a non-PCM format, we'd like to set the NONAUDIO flag to let receivers know that this isn't PCM data. I tried doing what iecset does in the PA alsa-sink code but this fails.
As far as I can tell, this happens because: (a) if I set the flag before snd_pcm_open(), the AES0 value from iec958.conf gets used, and (b) if I set the flag after snd_pcm_open(), changing the value is no longer permitted.
Any help/pointers would be appreciated.
Thanks, Arun
Hi Clemens,
On Wed, 2011-08-17 at 14:42 +0200, Clemens Ladisch wrote:
Arun Raghavan wrote:
I'm trying to figure out the right way to set the NONAUDIO flag on an iec958 device.
Use the device name "iec958:AES0=6".
Thanks. As I understand it, this forces us to set all the flags instead of just the one that we're interested in. Is this the only way?
Regards, Arun
Arun Raghavan wrote:
On Wed, 2011-08-17 at 14:42 +0200, Clemens Ladisch wrote:
Arun Raghavan wrote:
I'm trying to figure out the right way to set the NONAUDIO flag on an iec958 device.
Use the device name "iec958:AES0=6".
Thanks. As I understand it, this forces us to set all the flags instead of just the one that we're interested in.
Yes. However, using 'default' values for these other flags would not make much sense because your application is the only one that knows the correct values.
Is this the only way?
It's the only portable way.
Regards, Clemens
On Wed, 2011-08-17 at 16:55 +0200, Clemens Ladisch wrote:
Arun Raghavan wrote:
On Wed, 2011-08-17 at 14:42 +0200, Clemens Ladisch wrote:
Arun Raghavan wrote:
I'm trying to figure out the right way to set the NONAUDIO flag on an iec958 device.
Use the device name "iec958:AES0=6".
Thanks. As I understand it, this forces us to set all the flags instead of just the one that we're interested in.
Yes. However, using 'default' values for these other flags would not make much sense because your application is the only one that knows the correct values.
Is this the only way?
It's the only portable way.
Got it -- thanks for the help!
-- Arun
I'm trying to figure out the right way to set the NONAUDIO flag on
an
iec958 device.
Use the device name "iec958:AES0=6".
Thanks. As I understand it, this forces us to set all the flags instead of just the one that we're interested in. Is this the only way?
I banged my head against the wall on this one for eAC3 support. For some strange reason my receiver works fine with AC3 without touching the C bits, but for eAC3 setting the NONAUDIO bit is required. If you try to set the bits with ALSA controls in PulseAudio, somehow the settings are overwritten when the iec958 device is opened and initialized with default values. Clemens is right, setting the AES0=6 in the hdmi profile proved to be the only solution. It'd be nice to find a solution in which the iec958 device preserves the AES values set beforehand. That way we could set the NONAUDIO bit only in passthrough mode. -Pierre
participants (3)
-
Arun Raghavan
-
Clemens Ladisch
-
Pierre-Louis Bossart