Re: RME AES32 & MADI

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

 



Thanks for the patch.  Just a few comments below:

At Tue, 13 Feb 2007 11:44:06 +0100,
Remy Bruno wrote:
> @@ -943,12 +965,17 @@ static int hdspm_set_rate(struct hdspm *
>  	hdspm->control_register |= rate_bits;
>  	hdspm_write(hdspm, HDSPM_controlRegister, hdspm->control_register);
>  
> -	if (rate > 96000 /* 64000*/)
> -		hdspm->channel_map = channel_map_madi_qs;
> -	else if (rate > 48000)
> -		hdspm->channel_map = channel_map_madi_ds;
> -	else 
> -		hdspm->channel_map = channel_map_madi_ss;
> +	/* For AES32, need to set DDS value in FREQ register
> +	   For MADI, also apparently */
> +	hdspm_set_dds_value(hdspm, rate);
> +	
> +	if (hdspm->is_aes32 && rate != current_rate) {
> +		hdspm_write(hdspm, HDSPM_eeprom_wr, 0);
> +	}

Remove braces.

>  static int snd_hdspm_playback_open(struct snd_pcm_substream *substream)
>  {
>  	struct hdspm *hdspm = snd_pcm_substream_chip(substream);
>  	struct snd_pcm_runtime *runtime = substream->runtime;
>  
> -	snd_printdd("Open device substream %d\n", substream->stream);
> -
>  	spin_lock_irq(&hdspm->lock);
>  
>  	snd_pcm_set_sync(substream);
>  
>  	runtime->hw = snd_hdspm_playback_subinfo;
> +	runtime->dma_area = hdspm->playback_buffer;
> +	runtime->dma_bytes = HDSPM_DMA_AREA_BYTES;

Why this?  They are overwritten anyway in hw_params call.

> @@ -4011,6 +4143,8 @@ static int snd_hdspm_capture_open(struct
>  	spin_lock_irq(&hdspm->lock);
>  	snd_pcm_set_sync(substream);
>  	runtime->hw = snd_hdspm_capture_subinfo;
> +	runtime->dma_area = hdspm->capture_buffer;
> +	runtime->dma_bytes = HDSPM_DMA_AREA_BYTES;

Ditto.

> @@ -4184,7 +4325,8 @@ static int __devinit snd_hdspm_prealloca
>  	pcm = hdspm->pcm;
>  
>  /*	wanted = HDSPM_DMA_AREA_BYTES + 4096;*/	/* dont know why, but it works */
> -	wanted = HDSPM_DMA_AREA_BYTES;
> +	/* Two times, for both input and output */
> +	wanted = 2 * HDSPM_DMA_AREA_BYTES;

This shouldn't be necessary.  Since the buffer size for each stream is
fixed, it's not necessarily bigger than that.


Takashi

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/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