Mute signal in Audio Reference Design

Technical questions regarding the XTC tools and programming with XMOS.
AlexAdvice
XCore Addict
Posts: 150
Joined: Sun Feb 23, 2014 11:30 am

Mute signal in Audio Reference Design

Post by AlexAdvice »

A have some questions about the "Mute" signal.

I want to use XS1_PORT_1J as mute signal.

1. in file audiohw.xc i wrote:

Code: Select all

on tile[0] : out port MUTE_PIN = XS1_PORT_1J;
but I got the error:
Compiling audiohw.xc
../src/extensions/audiohw.xc:11: error: `tile' undeclared here (not in a function)
../src/extensions/audiohw.xc:11: error: 'on' expression not of type tileref

Then I chage it to:

Code: Select all

//on tile[0] : 
out port MUTE_PIN = XS1_PORT_1J;
and compile successfully.

Is it OK ?

2. in file audiohw.xc:
in function AudioHwInit() I make MUTE_PIN=1;
in function AudioHwConfig() I also make MUTE_PIN=1 (then set another pins according to samFreq, samRes ans dsdMode).

in file audiostream.xc:
in function UserAudioStreamStop() I make MUTE_PIN=1;
in function UserAudioStreamStart() I make MUTE_PIN=0;

So, only when the stream is start I clear the Mute signal.

Everything works fine in PCM, but in DSD - mute signal is still presents.
Is UserAudioStreamStart does not called in case of DSD ?
Where is better to clear the mute for DSD?

Thank you.
User avatar
Ross
Verified
XCore Legend
Posts: 1195
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

1. Did you include <platform.h>?

If you are running on a single tile device, it is not really an issue...

2. What software version is your base please?

:)
AlexAdvice
XCore Addict
Posts: 150
Joined: Sun Feb 23, 2014 11:30 am

Post by AlexAdvice »

Ross wrote:1. Did you include <platform.h>?
No,
just:
#include <xs1.h>
#include <print.h>
#include "port32A.h"
#include "devicedefines.h"
If you are running on a single tile device, it is not really an issue...
OK.
2. What software version is your base please?
6.6.0rc5

P.S. What parameter -DCHAN_BUFF_CTRL=1 in makefile means?
Do I need to set:
#define STREAM_FORMAT_OUTPUT_1_RESOLUTION_BITS 32
to operate Native and DoP DSD, or it is for 32 bit PCM only?
User avatar
Ross
Verified
XCore Legend
Posts: 1195
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

AlexAdvice wrote: P.S. What parameter -DCHAN_BUFF_CTRL=1 in makefile means?
This option means audio buffering is controlled by a channel rather than polling memory and saves some power, with some performance hit.
AlexAdvice wrote: #define STREAM_FORMAT_OUTPUT_1_RESOLUTION_BITS 32
to operate Native and DoP DSD, or it is for 32 bit PCM only?
Its needed for DSD I think.
AlexAdvice
XCore Addict
Posts: 150
Joined: Sun Feb 23, 2014 11:30 am

Post by AlexAdvice »

Thanks for your answer, Ross.

And, what about the mute issue?

I put now the "unmute" command to AudioHwConfig() function (in case of DSD only), but I think it is better to have it at UserAudioStreamStart(), as for PCM.
User avatar
Ross
Verified
XCore Legend
Posts: 1195
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

Is your issue using DoP or "native" DSD? (I assume native DSD..)
AlexAdvice
XCore Addict
Posts: 150
Joined: Sun Feb 23, 2014 11:30 am

Post by AlexAdvice »

Ross wrote:Is your issue using DoP or "native" DSD? (I assume native DSD..)
I've checked with DoP, with A-Player ( http://vv.uka.ru/aplayer_eng.html ).
Unfortunately, I don't know how to use "native DSD".
User avatar
Ross
Verified
XCore Legend
Posts: 1195
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

You can use native DSD with the foobar player and the SACD plug-in.

Im am unsure why the mute signal would not work for DoP since the host driver just thinks the data is PCM..
AlexAdvice
XCore Addict
Posts: 150
Joined: Sun Feb 23, 2014 11:30 am

Post by AlexAdvice »

Ross wrote:You can use native DSD with the foobar player and the SACD plug-in.
Never used Foobar before, but I'll try.
Im am unsure why the mute signal would not work for DoP since the host driver just thinks the data is PCM..
But your firmware knows that it is not PCM :)
And not calls UserAudioStreamStart(), I think.
User avatar
Ross
Verified
XCore Legend
Posts: 1195
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

AlexAdvice wrote: But your firmware knows that it is not PCM :)
And not calls UserAudioStreamStart(), I think.
Not at the level UserAudioStreamStart() is called (endpoint0.c) - only very lowest level I2S driver knows that the stream is DoP/DSD (audio.xc)

("Native" DSD is a difference case, endpoint 0 does know about this..)