* Correct way to set NONAUDIO flag
@ 2011-08-17 7:59 Arun Raghavan
2011-08-17 12:42 ` Clemens Ladisch
0 siblings, 1 reply; 8+ messages in thread
From: Arun Raghavan @ 2011-08-17 7:59 UTC (permalink / raw)
To: alsa-devel
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Correct way to set NONAUDIO flag
2011-08-17 7:59 Correct way to set NONAUDIO flag Arun Raghavan
@ 2011-08-17 12:42 ` Clemens Ladisch
2011-08-17 13:06 ` Arun Raghavan
0 siblings, 1 reply; 8+ messages in thread
From: Clemens Ladisch @ 2011-08-17 12:42 UTC (permalink / raw)
To: Arun Raghavan; +Cc: alsa-devel
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".
Regards,
Clemens
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Correct way to set NONAUDIO flag
2011-08-17 12:42 ` Clemens Ladisch
@ 2011-08-17 13:06 ` Arun Raghavan
2011-08-17 14:55 ` Clemens Ladisch
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Arun Raghavan @ 2011-08-17 13:06 UTC (permalink / raw)
To: Clemens Ladisch; +Cc: alsa-devel
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
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: Correct way to set NONAUDIO flag
2011-08-17 13:06 ` Arun Raghavan
@ 2011-08-17 14:55 ` Clemens Ladisch
2011-08-17 15:41 ` Arun Raghavan
2011-08-17 15:31 ` Pierre-Louis Bossart
[not found] ` <000901cc5cf2$af7fa180$0e7ee480$@bossart@linux.intel.com>
2 siblings, 1 reply; 8+ messages in thread
From: Clemens Ladisch @ 2011-08-17 14:55 UTC (permalink / raw)
To: Arun Raghavan; +Cc: alsa-devel
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
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: Correct way to set NONAUDIO flag
2011-08-17 14:55 ` Clemens Ladisch
@ 2011-08-17 15:41 ` Arun Raghavan
0 siblings, 0 replies; 8+ messages in thread
From: Arun Raghavan @ 2011-08-17 15:41 UTC (permalink / raw)
To: Clemens Ladisch; +Cc: alsa-devel
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Correct way to set NONAUDIO flag
2011-08-17 13:06 ` Arun Raghavan
2011-08-17 14:55 ` Clemens Ladisch
@ 2011-08-17 15:31 ` Pierre-Louis Bossart
[not found] ` <000901cc5cf2$af7fa180$0e7ee480$@bossart@linux.intel.com>
2 siblings, 0 replies; 8+ messages in thread
From: Pierre-Louis Bossart @ 2011-08-17 15:31 UTC (permalink / raw)
To: 'Arun Raghavan', 'Clemens Ladisch'; +Cc: alsa-devel
> > > 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
^ permalink raw reply [flat|nested] 8+ messages in thread[parent not found: <000901cc5cf2$af7fa180$0e7ee480$@bossart@linux.intel.com>]
* Re: Correct way to set NONAUDIO flag
[not found] ` <000901cc5cf2$af7fa180$0e7ee480$@bossart@linux.intel.com>
@ 2011-08-17 15:41 ` Arun Raghavan
2011-08-17 17:01 ` Clemens Ladisch
1 sibling, 0 replies; 8+ messages in thread
From: Arun Raghavan @ 2011-08-17 15:41 UTC (permalink / raw)
To: Pierre-Louis Bossart; +Cc: alsa-devel, 'Clemens Ladisch'
On Wed, 2011-08-17 at 10:31 -0500, Pierre-Louis Bossart 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?
>
> 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.
Well, given this is the best way to do it, my plan is to just close
(suspend) and reopen (unsuspend) and tack on the the right flags to the
device name when we're in passthrough mode.
-- Arun
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: Correct way to set NONAUDIO flag
[not found] ` <000901cc5cf2$af7fa180$0e7ee480$@bossart@linux.intel.com>
2011-08-17 15:41 ` Arun Raghavan
@ 2011-08-17 17:01 ` Clemens Ladisch
1 sibling, 0 replies; 8+ messages in thread
From: Clemens Ladisch @ 2011-08-17 17:01 UTC (permalink / raw)
To: Pierre-Louis Bossart; +Cc: 'Arun Raghavan', alsa-devel
Pierre-Louis Bossart wrote:
> 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.
That's how the iec958 device is intended to work.
The AES0..3 parameters of the iec958 device are the _only_ way to set
these flags. If you don't set them, they get a static default value;
see <http://git.alsa-project.org/?p=alsa-lib.git;a=blob;hb=HEAD;f=src/conf/pcm/iec958.conf>.
If PA wants to set these flags, it must do so when opening the device;
any other mechanism will not work.
Regards,
Clemens
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-08-17 17:01 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-17 7:59 Correct way to set NONAUDIO flag Arun Raghavan
2011-08-17 12:42 ` Clemens Ladisch
2011-08-17 13:06 ` Arun Raghavan
2011-08-17 14:55 ` Clemens Ladisch
2011-08-17 15:41 ` Arun Raghavan
2011-08-17 15:31 ` Pierre-Louis Bossart
[not found] ` <000901cc5cf2$af7fa180$0e7ee480$@bossart@linux.intel.com>
2011-08-17 15:41 ` Arun Raghavan
2011-08-17 17:01 ` Clemens Ladisch
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.