From: Clemens Ladisch <clemens@ladisch.de>
To: Christian Wisner-Carlson <christian@freedomofknowledge.org>
Cc: alsa-devel@alsa-project.org
Subject: Re: Balanced output support for Xonar: Patches for Virtuoso driver to add mixer option for balanced mono output (PCM179x dacs)
Date: Fri, 05 Nov 2010 14:17:43 +0100 [thread overview]
Message-ID: <4CD403F7.40004@ladisch.de> (raw)
In-Reply-To: <AANLkTinEWKjLX2eVABVVTXP=mZyb_hphh8N0OzoHETyD@mail.gmail.com>
Christian Wisner-Carlson wrote:
>>> It allows for 4 balanced outputs, 8 unbalanced outputs, or any
>>> combination of balanced and unbalanced outputs. HOWEVER, it adds 4
>>> mixer controls and the code isn't very pretty.
>>
>> The controller can route any stereo pair to each DAC, so it would be a
>> good idea to have one global control that also affects this routing so
>> that, e.g., configuring the card for 4 outputs works correctly when
>> playing 4-channel data.
>
> Currently, routing is set up by void oxygen_update_dac_routing(struct
> oxygen *chip) in oxygen_mixer.c.
> However, it only allows for five different routing configurations,
> which it statically defines internally as int reg_values[5].
> Do you mind (ie, would you mind merging/using it) if I defined a new struct:
> struct oxygen_routing_table = {
> u8 channels;
> unsigned int dac0;
> unsigned int dac1;
> unsigned int dac2;
> unsigned int dac3;
> }
> that would be passed to oxygen_update_dac_routing() as a new field of
> struct oxygen? This would allow for
> arbitrary routing configurations for the dacs (needed to implement 4
> channel balanced output) and would
> not require many changes to the driver as a whole.
This would move the responsibility for the actual routing decisions from
this function into its callers. However, both the stereo-upmixing and
the balanced-output controls affect the routing, so some code has to
handle the interdependencies. At the moment, this function sets the
routing depending on the current channel count and the upmixing setting;
I think that the balanced-output setting is just a third such parameter.
Anyway, I'm just concerned about how the controls looks to the user, not
so much about its implementation, which can be changed later (if I
wanted to, and if I had the time).
I'd be happy to merge any code that handles four DACs. Separate
controls for each DAC are OK too if, eventually, there are additional
controls for the routing, and if there is a userspace tool to manage
these settings together.
> Where should I define this struct? (ie, in what file?)
As an interface between the core driver and module-specific drivers,
oxygen.h.
Regards,
Clemens
prev parent reply other threads:[~2010-11-05 13:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-30 10:24 Balanced output support for Xonar: Patches for Virtuoso driver to add mixer option for balanced mono output (PCM179x dacs) Christian Wisner-Carlson
2010-11-01 15:59 ` Clemens Ladisch
2010-11-01 17:02 ` Christian Wisner-Carlson
2010-11-02 8:56 ` Clemens Ladisch
2010-11-03 4:50 ` Christian Wisner-Carlson
2010-11-03 13:01 ` Christian Wisner-Carlson
2010-11-05 13:17 ` Clemens Ladisch [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CD403F7.40004@ladisch.de \
--to=clemens@ladisch.de \
--cc=alsa-devel@alsa-project.org \
--cc=christian@freedomofknowledge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.