[alsa-devel] [PATCH] ALSA: oxygen: Fix S/PDIF muting

Clemens Ladisch clemens at ladisch.de
Sun Jul 5 21:23:13 CEST 2015


Laurence Darby wrote:
> On Tue, 30 Jun 2015 11:43:52 +0200 Clemens Ladisch wrote:
>> Laurence Darby wrote:
>>> If this is still going to prevent fixing the popping noise for the
>>> oxygen chip, what about writing a single 0x00 sample to it in the
>>> driver instead of muting it?
>>
>> This is likely to work (but the zero sample has to go through DMA).
>
> Ok, I eventually got this to work, with this in oxygen_spdif_hw_free():
>
> 	memset (runtime->dma_area, 0, runtime->dma_bytes);
> 	oxygen_trigger(substream,SNDRV_PCM_TRIGGER_START);
> 	msleep (1);
> 	oxygen_trigger(substream,SNDRV_PCM_TRIGGER_STOP);

Please note that hw_free can be called without a valid configuration.

Calling oxygen_trigger() might affect other streams.

> If I create a proper patch for that (it should probably use
> snd_pcm_format_set_silence() instead of memset)

All supported sample formats uses plain zeros.


Regards,
Clemens


More information about the Alsa-devel mailing list