D13931: [KCM] Add speaker placement test

2018-07-14 Thread Nicolas Fella
This revision was automatically updated to reflect the committed changes.
Closed by commit R115:ed0c58639d12: [KCM] Add speaker placement test (authored 
by nicolasfella).

CHANGED PRIOR TO COMMIT
  https://phabricator.kde.org/D13931?vs=37743=37753#toc

REPOSITORY
  R115 Plasma Audio Volume Applet

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D13931?vs=37743=37753

REVISION DETAIL
  https://phabricator.kde.org/D13931

AFFECTED FILES
  src/CMakeLists.txt
  src/canberracontext.cpp
  src/canberracontext.h
  src/kcm/package/contents/ui/Advanced.qml
  src/qml/volumefeedback.cpp
  src/qml/volumefeedback.h
  src/sink.cpp
  src/sink.h

To: nicolasfella, drosca
Cc: ngraham, #vdg, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D13931: [KCM] Add speaker placement test

2018-07-14 Thread Nicolas Fella
nicolasfella added a comment.


  Thanks for bearing with me! :)

REPOSITORY
  R115 Plasma Audio Volume Applet

BRANCH
  speakertest

REVISION DETAIL
  https://phabricator.kde.org/D13931

To: nicolasfella, drosca
Cc: ngraham, #vdg, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D13931: [KCM] Add speaker placement test

2018-07-14 Thread Nicolas Fella
nicolasfella updated this revision to Diff 37743.
nicolasfella added a comment.


  - Use brute force approach

REPOSITORY
  R115 Plasma Audio Volume Applet

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D13931?vs=37735=37743

BRANCH
  speakertest

REVISION DETAIL
  https://phabricator.kde.org/D13931

AFFECTED FILES
  src/CMakeLists.txt
  src/canberracontext.cpp
  src/canberracontext.h
  src/kcm/package/contents/ui/Advanced.qml
  src/qml/volumefeedback.cpp
  src/qml/volumefeedback.h
  src/sink.cpp
  src/sink.h

To: nicolasfella, drosca
Cc: ngraham, #vdg, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D13931: [KCM] Add speaker placement test

2018-07-14 Thread David Rosca
drosca added inline comments.

INLINE COMMENTS

> nicolasfella wrote in Advanced.qml:117
> When I remove this line and switch profile e.g. from Stereo to 5.1 the UI 
> doesn't get updated. I'm no QML expert but it looks like a change to 
> sinkmodel does not result in reevaluation of data(). I'm overriding the 
> binding with an identical one, so I guess it should be fine

What you do here is assignment to the property, not property binding. So here 
you actually remove the binding.

Binding would be: `grid.pulseObject = Qt.binding(function() { return sinkmodel 
 })`

In any case, dealing with C++ models outside of delegates is stupid in QML, and 
QQC1 ComboBox doesn't help.
I've tried to fix it myself and the only thing I came up with is this 
"brute-force" approach: https://paste.kde.org/po8v22yzp

REPOSITORY
  R115 Plasma Audio Volume Applet

REVISION DETAIL
  https://phabricator.kde.org/D13931

To: nicolasfella, drosca
Cc: ngraham, #vdg, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D13931: [KCM] Add speaker placement test

2018-07-14 Thread Nicolas Fella
nicolasfella added inline comments.

INLINE COMMENTS

> drosca wrote in Advanced.qml:117
> What is this doing?
> 
> onDataChanged will be triggered only when some property of data in model 
> changes, and in that case you overwritten the binding that is set in grid, so 
> grid.pulseObject will no longer be updated when ComboBox current index is 
> changed.
> 
> I don't think this is needed at all.

When I remove this line and switch profile e.g. from Stereo to 5.1 the UI 
doesn't get updated. I'm no QML expert but it looks like a change to sinkmodel 
does not result in reevaluation of data(). I'm overriding the binding with an 
identical one, so I guess it should be fine

REPOSITORY
  R115 Plasma Audio Volume Applet

REVISION DETAIL
  https://phabricator.kde.org/D13931

To: nicolasfella, drosca
Cc: ngraham, #vdg, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D13931: [KCM] Add speaker placement test

2018-07-14 Thread Nicolas Fella
nicolasfella updated this revision to Diff 37735.
nicolasfella marked 9 inline comments as done.
nicolasfella added a comment.


  - Fix unref'ing
  - Save context in variable
  - Fix * placement
  - Fix QML style

REPOSITORY
  R115 Plasma Audio Volume Applet

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D13931?vs=37660=37735

BRANCH
  speakertest

REVISION DETAIL
  https://phabricator.kde.org/D13931

AFFECTED FILES
  src/CMakeLists.txt
  src/canberracontext.cpp
  src/canberracontext.h
  src/kcm/package/contents/ui/Advanced.qml
  src/qml/volumefeedback.cpp
  src/qml/volumefeedback.h
  src/sink.cpp
  src/sink.h

To: nicolasfella, drosca
Cc: ngraham, #vdg, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D13931: [KCM] Add speaker placement test

2018-07-14 Thread David Rosca
drosca added inline comments.

INLINE COMMENTS

> canberracontext.cpp:27
>  
> -class Sink : public Device
> +CanberraContext * CanberraContext::s_context = nullptr;
> +

`*`

> canberracontext.cpp:29
> +
> +CanberraContext * CanberraContext::instance()
>  {

`*`

> canberracontext.cpp:51
>  
> -#endif // SINK_H
> +ca_context * CanberraContext::canberra()
> +{

`ca_context *CanberraContext::canberra()`

> Advanced.qml:102
> +RowLayout {
> +
> +Layout.margins: units.gridUnit / 2

newline

> Advanced.qml:117
> +id: sinkmodel
> +onDataChanged: grid.pulseObject = 
> sinkmodel.data(sinkmodel.index(sinks.currentIndex, 0), 
> sinkmodel.role("PulseObject"));
> +}

What is this doing?

onDataChanged will be triggered only when some property of data in model 
changes, and in that case you overwritten the binding that is set in grid, so 
grid.pulseObject will no longer be updated when ComboBox current index is 
changed.

I don't think this is needed at all.

> Advanced.qml:126
> +Layout.fillWidth: true
> +id: grid
> +

id should be always set as first property.

> Advanced.qml:128
> +
> +property var pulseObject: 
> sinkmodel.data(sinkmodel.index(sinks.currentIndex, 0), 
> sinkmodel.role("PulseObject"));
> +

No `;` at the end of line

> Advanced.qml:142
> +Item {
> +
> +width: grid.width/3

remove newline

> Advanced.qml:179
> +height: 50
> +KCoreAddons.KUser {
> +id: kuser

Indentation

> volumefeedback.cpp:30
> +if 
> (ca_context_set_driver(QPulseAudio::CanberraContext::instance()->canberra(), 
> "pulse") < 0) {
> +QPulseAudio::CanberraContext::instance()->unref();
>  return;

If this happens, you will unref again in destructor.

> volumefeedback.cpp:47
>  {
> -if (!m_context) {
> +if (!QPulseAudio::CanberraContext::instance()->canberra()) {
>  return;

Just save it into variable instead of copy pasting it.

`auto context = QPulseAudio::CanberraContext::instance()->canberra();`

REPOSITORY
  R115 Plasma Audio Volume Applet

REVISION DETAIL
  https://phabricator.kde.org/D13931

To: nicolasfella, drosca
Cc: ngraham, #vdg, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D13931: [KCM] Add speaker placement test

2018-07-12 Thread Nicolas Fella
nicolasfella added inline comments.

INLINE COMMENTS

> drosca wrote in Advanced.qml:132
> Make it into one property, without `index` and `role`, either with pasting 
> the code inline or moving it to separate function. Also it probably should be 
> `readonly` property.

I couldn't make it readonly because it needs to be updated when the profile is 
changed. Hence line 117.

REPOSITORY
  R115 Plasma Audio Volume Applet

REVISION DETAIL
  https://phabricator.kde.org/D13931

To: nicolasfella, drosca
Cc: ngraham, #vdg, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D13931: [KCM] Add speaker placement test

2018-07-12 Thread Nicolas Fella
nicolasfella updated this revision to Diff 37660.
nicolasfella added a comment.


  - Fix context ref'ing in sink

REPOSITORY
  R115 Plasma Audio Volume Applet

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D13931?vs=37659=37660

BRANCH
  speakertest

REVISION DETAIL
  https://phabricator.kde.org/D13931

AFFECTED FILES
  src/CMakeLists.txt
  src/canberracontext.cpp
  src/canberracontext.h
  src/kcm/package/contents/ui/Advanced.qml
  src/qml/volumefeedback.cpp
  src/qml/volumefeedback.h
  src/sink.cpp
  src/sink.h

To: nicolasfella, drosca
Cc: ngraham, #vdg, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D13931: [KCM] Add speaker placement test

2018-07-12 Thread Nicolas Fella
nicolasfella updated this revision to Diff 37659.
nicolasfella added a comment.


  - Variable initialization and pointer style
  - Wait for sound being played before unref'ing context
  - Merge properties
  - Remove log
  - Fix unused parameter warning

REPOSITORY
  R115 Plasma Audio Volume Applet

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D13931?vs=37656=37659

BRANCH
  speakertest

REVISION DETAIL
  https://phabricator.kde.org/D13931

AFFECTED FILES
  src/CMakeLists.txt
  src/canberracontext.cpp
  src/canberracontext.h
  src/kcm/package/contents/ui/Advanced.qml
  src/qml/volumefeedback.cpp
  src/qml/volumefeedback.h
  src/sink.cpp
  src/sink.h

To: nicolasfella, drosca
Cc: ngraham, #vdg, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D13931: [KCM] Add speaker placement test

2018-07-12 Thread David Rosca
drosca requested changes to this revision.
drosca added a comment.
This revision now requires changes to proceed.


  Looks much better now.

INLINE COMMENTS

> canberracontext.h:44
>  private:
> -ca_context *m_context = nullptr;
> +ca_context *m_canberra;
> +int m_references;

`ca_context *m_canberra = nullptr;`

> canberracontext.h:45
> +ca_context *m_canberra;
> +int m_references;
> +

`int m_references = 0;`

> canberracontext.h:47
> +
> +static CanberraContext* s_context;
> +

`static CanberraContext *s_context;`

And in other places too, `*` belongs to the variable name, not type.

> Advanced.qml:132
> +property var role: sinkmodel.role("PulseObject");
> +property var pulseObject: sinkmodel.data(index, role);
> +

Make it into one property, without `index` and `role`, either with pasting the 
code inline or moving it to separate function. Also it probably should be 
`readonly` property.

REPOSITORY
  R115 Plasma Audio Volume Applet

REVISION DETAIL
  https://phabricator.kde.org/D13931

To: nicolasfella, drosca
Cc: ngraham, #vdg, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D13931: [KCM] Add speaker placement test

2018-07-12 Thread Nicolas Fella
nicolasfella updated this revision to Diff 37656.
nicolasfella added a comment.


  - refcount CanberraContext

REPOSITORY
  R115 Plasma Audio Volume Applet

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D13931?vs=37602=37656

BRANCH
  speakertest

REVISION DETAIL
  https://phabricator.kde.org/D13931

AFFECTED FILES
  src/CMakeLists.txt
  src/canberracontext.cpp
  src/canberracontext.h
  src/kcm/package/contents/ui/Advanced.qml
  src/qml/volumefeedback.cpp
  src/qml/volumefeedback.h
  src/sink.cpp
  src/sink.h

To: nicolasfella, drosca
Cc: ngraham, #vdg, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D13931: [KCM] Add speaker placement test

2018-07-11 Thread Nicolas Fella
nicolasfella updated this revision to Diff 37602.
nicolasfella added a comment.


  - Remove comment
  - Remove empty destructor
  - Add else if

REPOSITORY
  R115 Plasma Audio Volume Applet

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D13931?vs=37601=37602

BRANCH
  speakertest

REVISION DETAIL
  https://phabricator.kde.org/D13931

AFFECTED FILES
  src/CMakeLists.txt
  src/canberracontext.cpp
  src/canberracontext.h
  src/kcm/package/contents/ui/Advanced.qml
  src/qml/volumefeedback.cpp
  src/qml/volumefeedback.h
  src/sink.cpp
  src/sink.h

To: nicolasfella, drosca
Cc: ngraham, #vdg, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D13931: [KCM] Add speaker placement test

2018-07-11 Thread Nicolas Fella
nicolasfella updated this revision to Diff 37601.
nicolasfella added a comment.


  Simplify model access
  
  Thanks for your help!
  
  Now, when I switch profiles I get error messages that pulseObject is null, 
however it seems to work fine.

REPOSITORY
  R115 Plasma Audio Volume Applet

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D13931?vs=37534=37601

BRANCH
  speakertest

REVISION DETAIL
  https://phabricator.kde.org/D13931

AFFECTED FILES
  src/CMakeLists.txt
  src/canberracontext.cpp
  src/canberracontext.h
  src/kcm/package/contents/ui/Advanced.qml
  src/qml/volumefeedback.cpp
  src/qml/volumefeedback.h
  src/sink.cpp
  src/sink.h

To: nicolasfella, drosca
Cc: ngraham, #vdg, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D13931: [KCM] Add speaker placement test

2018-07-11 Thread Nicolas Fella
nicolasfella added a comment.


  In D13931#290548 , @drosca wrote:
  
  > In D13931#290544 , @nicolasfella 
wrote:
  >
  > > I can get the PulseObject, that is not the problem, the problem is that I 
can't access the model outside of a delegate. model[index] does not work 
because QAbstractItemModel does not implement the {} operator.
  >
  >
  > What is `{} operator`?
  
  
  Sorry, I meant []

REPOSITORY
  R115 Plasma Audio Volume Applet

REVISION DETAIL
  https://phabricator.kde.org/D13931

To: nicolasfella, drosca
Cc: ngraham, #vdg, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D13931: [KCM] Add speaker placement test

2018-07-11 Thread David Rosca
drosca added a comment.


  In D13931#290544 , @nicolasfella 
wrote:
  
  > I can get the PulseObject, that is not the problem, the problem is that I 
can't access the model outside of a delegate. model[index] does not work 
because QAbstractItemModel does not implement the {} operator.
  
  
  What is `{} operator`?
  
  > It only works with QList-based models. Therefore I introduced the get 
function to the model. This has the limitation that I don't have an notify 
signal for it. Therefore I use the notify signal of the changed property to 
force a reevaluate of the properties that depend on "get". It's a hacky 
solution, but I didn't find a better one.
  
  Still I don't see the issue, the only problem that you would have is that 
your binding is on JavaScript list (`indexOf`) and when this list changes it 
wouldn't get re-evaluated. But it will never be the case, because channels are 
constant AND the other binding is on `speakersview.currentIndex` so this will 
take care of re-evaluating the binding when changing current device in combobox.
  
  Anyway, you should be able to replace C++ `get`  with
  
var index = sinkmodel.index(speakersview.currentIndex, 0);
var role = sinkmode.role("PulseObject"); // This is extension in our 
AbstractModel
var pulseObject = sinkmodel.data(index, role);

REPOSITORY
  R115 Plasma Audio Volume Applet

REVISION DETAIL
  https://phabricator.kde.org/D13931

To: nicolasfella, drosca
Cc: ngraham, #vdg, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D13931: [KCM] Add speaker placement test

2018-07-11 Thread Nicolas Fella
nicolasfella added inline comments.

INLINE COMMENTS

> drosca wrote in volumefeedback.cpp:36
> What if there is multiple VolumeFeedback instances? It will crash then.
> You should either move canberra context to Context class (should probably be 
> fine) or implement the refcounting of CanberraContext similar to Context.

I'd rather not move it into context so that pulseaudio-qt does not need 
Canberra.  This way only plasma-pa would depend on Canberra

REPOSITORY
  R115 Plasma Audio Volume Applet

REVISION DETAIL
  https://phabricator.kde.org/D13931

To: nicolasfella, drosca
Cc: ngraham, #vdg, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D13931: [KCM] Add speaker placement test

2018-07-11 Thread Nicolas Fella
nicolasfella added a comment.


  In D13931#290535 , @drosca wrote:
  
  > And the whole ComboBox/SinkModel code needs to be changed. You should be 
able to get the PulseObject from the model just with QML code (see invokables 
in 
https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/itemmodels/qabstractitemmodel.h).
  >  Also I don't see purpose of that "changed" property.
  
  
  I can get the PulseObject, that is not the problem, the problem is that I 
can't access the model outside of a delegate. model[index] does not work 
because QAbstractItemModel does not implement the {} operator. It only works 
with QList-based models. Therefore I introduced the get function to the model. 
This has the limitation that I don't have an notify signal for it. Therefore I 
use the notify signal of the changed property to force a reevaluate of the 
properties that depend on "get". It's a hacky solution, but I didn't find a 
better one.

REPOSITORY
  R115 Plasma Audio Volume Applet

REVISION DETAIL
  https://phabricator.kde.org/D13931

To: nicolasfella, drosca
Cc: ngraham, #vdg, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D13931: [KCM] Add speaker placement test

2018-07-11 Thread David Rosca
drosca requested changes to this revision.
drosca added a comment.
This revision now requires changes to proceed.


  And the whole ComboBox/SinkModel code needs to be changed. You should be able 
to get the PulseObject from the model just with QML code (see invokables in 
https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/itemmodels/qabstractitemmodel.h).
  Also I don't see purpose of that "changed" property.

INLINE COMMENTS

> volumefeedback.cpp:36
>  {
> -if (m_context) {
> -ca_context_destroy(m_context);
> +if (QPulseAudio::CanberraContext::instance()->canberra()) {
> +
> ca_context_destroy(QPulseAudio::CanberraContext::instance()->canberra());

What if there is multiple VolumeFeedback instances? It will crash then.
You should either move canberra context to Context class (should probably be 
fine) or implement the refcounting of CanberraContext similar to Context.

> drosca wrote in sink.cpp:89
>   if (name == QLatin1String("Front Left")) {
>   // ...
>   } else if (...) {
>   //
>   }

Braces and "else if" still missing.

> sink.h:35
>  Sink(QObject *parent);
> +virtual ~Sink();
>  

No reason to add empty destructor.

REPOSITORY
  R115 Plasma Audio Volume Applet

REVISION DETAIL
  https://phabricator.kde.org/D13931

To: nicolasfella, drosca
Cc: ngraham, #vdg, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D13931: [KCM] Add speaker placement test

2018-07-10 Thread Nicolas Fella
nicolasfella added a comment.


  The ComboBox part is a little hacky because I couldn't figure out a nice way 
to access the model data from outside a delegate

REPOSITORY
  R115 Plasma Audio Volume Applet

REVISION DETAIL
  https://phabricator.kde.org/D13931

To: nicolasfella, drosca
Cc: ngraham, #vdg, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D13931: [KCM] Add speaker placement test

2018-07-10 Thread Nicolas Fella
nicolasfella updated this revision to Diff 37534.
nicolasfella marked 2 inline comments as done.
nicolasfella edited the summary of this revision.
nicolasfella added a comment.


  - Fix indentation in QML
  - Add i18n calls
  - Use QLatin1String
  - Coding style
  - Switch statement indentation
  - Show a combobox to select sink when more than one is available
  - Share canberra context by making it a singleton

REPOSITORY
  R115 Plasma Audio Volume Applet

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D13931?vs=37286=37534

BRANCH
  speakertest

REVISION DETAIL
  https://phabricator.kde.org/D13931

AFFECTED FILES
  src/CMakeLists.txt
  src/canberracontext.cpp
  src/canberracontext.h
  src/kcm/package/contents/ui/Advanced.qml
  src/pulseaudio.cpp
  src/pulseaudio.h
  src/qml/volumefeedback.cpp
  src/qml/volumefeedback.h
  src/sink.cpp
  src/sink.h

To: nicolasfella, drosca
Cc: ngraham, #vdg, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D13931: [KCM] Add speaker placement test

2018-07-08 Thread David Rosca
drosca requested changes to this revision.
drosca added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> Advanced.qml:112
> +
> +delegate:
> +

So this will show this grid as many times as you have sinks below each other 
and scrollable in ListView without any indication which grid is for which 
device?
That doesn't look good to me.

What about showing the grid just once and adding a combobox with device 
selection under (or above)?

Also, indentation is off here:

  delegate: Grid {
  // ...
  }

> Advanced.qml:131
> +}
> +Item{
> +

Item {
  }

> sink.cpp:89
> +{
> +if (name == QStringLiteral("Front Left"))
> +return PA_CHANNEL_POSITION_FRONT_LEFT;

if (name == QLatin1String("Front Left")) {
  // ...
  } else if (...) {
  //
  }

> sink.cpp:118
> +{
> +switch (position) {
> +case PA_CHANNEL_POSITION_FRONT_LEFT:

switch (position) {
  case ...:
  case ...:
  }

> sink.h:48
> +public slots:
> +void testChannel(const QString& name);
> +

`const QString `

> sink.h:55
> +
> +ca_context *m_canberra;
> +

It should reuse context from `VolumeFeedback`.

REPOSITORY
  R115 Plasma Audio Volume Applet

REVISION DETAIL
  https://phabricator.kde.org/D13931

To: nicolasfella, drosca
Cc: ngraham, #vdg, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D13931: [KCM] Add speaker placement test

2018-07-07 Thread Nicolas Fella
nicolasfella created this revision.
nicolasfella added a reviewer: drosca.
Restricted Application added a project: Plasma.
Restricted Application edited subscribers, added: plasma-devel; removed: Plasma.
nicolasfella requested review of this revision.

REVISION SUMMARY
  An equivalent to the Phonon KCM speaker test.

TEST PLAN
  When siwtching profiles the appropriate setup is shown.
  Sound is working for Stereo, 5.1/7.1 is not tested because I don't have the 
hardware for it.
  
  Known issue:
  Input-only profile still shows Front-left and front-right

REPOSITORY
  R115 Plasma Audio Volume Applet

BRANCH
  speakertest

REVISION DETAIL
  https://phabricator.kde.org/D13931

AFFECTED FILES
  src/kcm/package/contents/ui/Advanced.qml
  src/sink.cpp
  src/sink.h

To: nicolasfella, drosca
Cc: #vdg, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart