Re: [PATCH] ASoC: TWL4030: Disable DACs in analog loopback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 30 April 2009 12:53:20 ext Lopez Cruz, Misael wrote:
> At least, the digital filters (configured in OPTION reg) are
> enabled when the corresponding DAC is enabled, can we attach
> them to a DAC somehow? Could it be a valid approach?

The digital filters corresponding to the Stereo path (ATXL1_EN, ATXR1_EN, 
ARXL2_EN, ARXR2_EN) can be enabled dynamically, when the:
- Playback is running (enable only the ARXL2_EN, ARXR2_EN bits)
- Capture is running (enable only the ATXL1_EN, ATXR1_EN bits)
- Digital loopback is enabled (in pairs the ATXL1_EN/ARXL2_EN or  
ATXR1_EN/ARXR2_EN bits - the first pair is for left digital loopback, the 
second is for the right digital loopback).

>
> > But I'm afraid, this patch does break the Digital loopback,
> > which needs the DACs to be powered, in case when the capture
> > path is set in analog mode the ADC(s) also need to be powered.
>
> I think that digital loopback should mix TX with RX only when
> both digital paths are enabled, i.e. in a full-duplex scenario.

Well, yes... short of. You can still enable the digital loopback without 
active stream. The TWL codec will be in the same state as it if you are using 
full duplex mode. The only difference is that the CPU dai is not running.
The analog loopback also mixing the RX and TX data, but in the analog domain.
If you have only the loopback enabled (analog or digital) the RX path is 
silent in both cases...

While we are here with the loopbacks: When only the analog loopback is enabled 
the PLL can be disabled for the codec (APLL_CTL:APLL_EN = 0). I have some 
preliminary implementation for this, but it needs some more tuning... 

> I don't expect it to automatically enable DACs for me, although
> maybe I'm wrong and my argument breaks what digital loopback
> means :( Please clarify.

You have to specifically flip the user control to enable the digital loopback, 
it is not done automatically.

>
> > Both analog and digital loopback connects to 'Analog XY
> > Playback Mixer', which turns on/off the physical DAC on
> > the given route.
>
> That was a part of the audio map that doesn't make much sense
> to me, joining analog and digital loopback.

It was like that, because the TRM has no information on these loopback at all, 
so I have chosen this safe path (I have got the digital loopback implemented 
first) and marked for myself to revisit it later. 

>
> > I have been thinking of - as a part of a big
> > clean up - to separate these, since as you have pointed out,
> > the DACs are not needed for the analog loopback.

-- 
Péter
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux