All of lore.kernel.org
 help / color / mirror / Atom feed
* Detecting if a pcm device is a digital or analog one
@ 2010-06-25  6:57 Jean-Yves Avenard
  2010-06-25  8:21 ` Clemens Ladisch
  0 siblings, 1 reply; 3+ messages in thread
From: Jean-Yves Avenard @ 2010-06-25  6:57 UTC (permalink / raw)
  To: alsa-devel

Hi there...

I was wondering if there was any way to accurately distinguish between
audio device, if it has an analog or a digital output.

I would prefer not parsing the name (like analog71 is obviously an
analog device, while "hdmi" is digital)

I see that on some devices the IEC958 bit is set, but this doesn't
seem reliable (on another PC, the IEC958 bit isn't set).

Any suggestions would be greatly appreciated...

Thank you
Jean-Yves

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Detecting if a pcm device is a digital or analog one
  2010-06-25  6:57 Detecting if a pcm device is a digital or analog one Jean-Yves Avenard
@ 2010-06-25  8:21 ` Clemens Ladisch
  2010-06-25 16:55   ` James Courtier-Dutton
  0 siblings, 1 reply; 3+ messages in thread
From: Clemens Ladisch @ 2010-06-25  8:21 UTC (permalink / raw)
  To: Jean-Yves Avenard; +Cc: alsa-devel

Jean-Yves Avenard wrote:
> I was wondering if there was any way to accurately distinguish between
> audio device, if it has an analog or a digital output.

Not really.  There are devices where the same stream is routed to both
analog and digital outputs, and sometimes the driver cannot know if
there is a DAC further down the line.  In any case, this would be very
hardware specific.

What do you need this for?


Regards,
Clemens

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Detecting if a pcm device is a digital or analog one
  2010-06-25  8:21 ` Clemens Ladisch
@ 2010-06-25 16:55   ` James Courtier-Dutton
  0 siblings, 0 replies; 3+ messages in thread
From: James Courtier-Dutton @ 2010-06-25 16:55 UTC (permalink / raw)
  To: Clemens Ladisch; +Cc: alsa-devel, Jean-Yves Avenard

On 25 June 2010 09:21, Clemens Ladisch <clemens@ladisch.de> wrote:
> Jean-Yves Avenard wrote:
>> I was wondering if there was any way to accurately distinguish between
>> audio device, if it has an analog or a digital output.
>
> Not really.  There are devices where the same stream is routed to both
> analog and digital outputs, and sometimes the driver cannot know if
> there is a DAC further down the line.  In any case, this would be very
> hardware specific.
>
> What do you need this for?
>
My guess is that if one knew, one could decide if it was sensible to
send AC3 encoded data to the PCM or not.
Without knowing which PCM is sending data to which outputs, it would
be very difficult to accurately distinguish them.
Alsa does have a device name "iec958" that one can use instead of
"front" or "default" that will ensure the output goes to a digital
output if one exists.

James
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-06-25 16:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-25  6:57 Detecting if a pcm device is a digital or analog one Jean-Yves Avenard
2010-06-25  8:21 ` Clemens Ladisch
2010-06-25 16:55   ` James Courtier-Dutton

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.