]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - sound/soc/codecs/wm_adsp.c
Merge remote-tracking branches 'asoc/topic/ab8500', 'asoc/topic/adau17x1', 'asoc...
[karo-tx-linux.git] / sound / soc / codecs / wm_adsp.c
index 28d3851c50639ef672c42b723e94d1b805757a18..ed90e12b40a624b5066577b383e19db44d2f9c40 100644 (file)
@@ -292,6 +292,8 @@ struct wm_adsp_compr {
 
        u32 *raw_buf;
        unsigned int copied_total;
+
+       unsigned int sample_rate;
 };
 
 #define WM_ADSP_DATA_WORD_SIZE         3
@@ -2484,6 +2486,8 @@ int wm_adsp_compr_set_params(struct snd_compr_stream *stream,
        if (!compr->raw_buf)
                return -ENOMEM;
 
+       compr->sample_rate = params->codec.sample_rate;
+
        return 0;
 }
 EXPORT_SYMBOL_GPL(wm_adsp_compr_set_params);
@@ -2923,6 +2927,7 @@ int wm_adsp_compr_pointer(struct snd_compr_stream *stream,
 
        tstamp->copied_total = compr->copied_total;
        tstamp->copied_total += buf->avail * WM_ADSP_DATA_WORD_SIZE;
+       tstamp->sampling_rate = compr->sample_rate;
 
 out:
        mutex_unlock(&dsp->pwr_lock);