Home
last modified time | relevance | path

Searched refs:format (Results 1 – 25 of 197) sorted by relevance

12345678

/sound/core/
Dpcm_misc.c239 int snd_pcm_format_signed(snd_pcm_format_t format) in snd_pcm_format_signed() argument
242 if ((INT)format < 0 || (INT)format > (INT)SNDRV_PCM_FORMAT_LAST) in snd_pcm_format_signed()
244 if ((val = pcm_formats[(INT)format].signd) < 0) in snd_pcm_format_signed()
258 int snd_pcm_format_unsigned(snd_pcm_format_t format) in snd_pcm_format_unsigned() argument
262 val = snd_pcm_format_signed(format); in snd_pcm_format_unsigned()
276 int snd_pcm_format_linear(snd_pcm_format_t format) in snd_pcm_format_linear() argument
278 return snd_pcm_format_signed(format) >= 0; in snd_pcm_format_linear()
290 int snd_pcm_format_little_endian(snd_pcm_format_t format) in snd_pcm_format_little_endian() argument
293 if ((INT)format < 0 || (INT)format > (INT)SNDRV_PCM_FORMAT_LAST) in snd_pcm_format_little_endian()
295 if ((val = pcm_formats[(INT)format].le) < 0) in snd_pcm_format_little_endian()
[all …]
Dmisc.c67 const char *format, ...) in __snd_printk() argument
81 va_start(args, format); in __snd_printk()
83 vaf.fmt = format; in __snd_printk()
86 kern_level = printk_get_level(format); in __snd_printk()
88 const char *end_of_header = printk_skip_level(format); in __snd_printk()
89 memcpy(verbose_fmt, format, end_of_header - format); in __snd_printk()
96 vprintk(format, args); in __snd_printk()
/sound/core/oss/
Dpcm_plugin.c51 struct snd_pcm_plugin_format *format; in snd_pcm_plugin_alloc() local
58 format = &plugin->src_format; in snd_pcm_plugin_alloc()
60 format = &plugin->dst_format; in snd_pcm_plugin_alloc()
62 if ((width = snd_pcm_format_physical_width(format->format)) < 0) in snd_pcm_plugin_alloc()
64 size = frames * format->channels * width; in snd_pcm_plugin_alloc()
79 for (channel = 0; channel < format->channels; channel++, c++) { in snd_pcm_plugin_alloc()
85 c->area.step = format->channels * width; in snd_pcm_plugin_alloc()
88 if (snd_BUG_ON(size % format->channels)) in snd_pcm_plugin_alloc()
90 size /= format->channels; in snd_pcm_plugin_alloc()
91 for (channel = 0; channel < format->channels; channel++, c++) { in snd_pcm_plugin_alloc()
[all …]
Droute.c28 snd_pcm_uframes_t frames, snd_pcm_format_t format) in zero_areas() argument
33 snd_pcm_area_silence(&dvp->area, 0, frames, format); in zero_areas()
41 snd_pcm_uframes_t frames, snd_pcm_format_t format) in copy_area() argument
44 snd_pcm_area_copy(&src_channel->area, 0, &dst_channel->area, 0, frames, format); in copy_area()
54 snd_pcm_format_t format; in route_transfer() local
64 format = plugin->dst_format.format; in route_transfer()
69 copy_area(src_channels, dvp, frames, format); in route_transfer()
76 copy_area(src_channels, dvp, frames, format); in route_transfer()
81 zero_areas(dvp, ndsts - dst, frames, format); in route_transfer()
98 if (snd_BUG_ON(src_format->format != dst_format->format)) in snd_pcm_plugin_build_route()
Dmulaw.c183 snd_pcm_area_silence(&dst_channels[channel].area, 0, frames, plugin->dst_format.format); in mulaw_decode()
229 snd_pcm_area_silence(&dst_channels[channel].area, 0, frames, plugin->dst_format.format); in mulaw_encode()
277 static void init_data(struct mulaw_priv *data, snd_pcm_format_t format) in init_data() argument
280 data->cvt_endian = snd_pcm_format_big_endian(format) > 0; in init_data()
282 data->cvt_endian = snd_pcm_format_little_endian(format) > 0; in init_data()
284 if (!snd_pcm_format_signed(format)) in init_data()
286 data->native_bytes = snd_pcm_format_physical_width(format) / 8; in init_data()
288 if (snd_pcm_format_little_endian(format)) { in init_data()
294 snd_pcm_format_width(format) / 8; in init_data()
306 struct snd_pcm_plugin_format *format; in snd_pcm_plugin_build_mulaw() local
[all …]
Dio.c113 struct snd_pcm_plugin_format format; in snd_pcm_plugin_build_io() local
121 format.format = params_format(params); in snd_pcm_plugin_build_io()
122 format.rate = params_rate(params); in snd_pcm_plugin_build_io()
123 format.channels = params_channels(params); in snd_pcm_plugin_build_io()
125 &format, &format, in snd_pcm_plugin_build_io()
126 sizeof(void *) * format.channels, in snd_pcm_plugin_build_io()
Dcopy.c49 snd_pcm_area_silence(&dst_channels->area, 0, frames, plugin->dst_format.format); in copy_transfer()
54 …d_pcm_area_copy(&src_channels->area, 0, &dst_channels->area, 0, frames, plugin->src_format.format); in copy_transfer()
74 if (snd_BUG_ON(src_format->format != dst_format->format)) in snd_pcm_plugin_build_copy()
81 width = snd_pcm_format_physical_width(src_format->format); in snd_pcm_plugin_build_copy()
Dpcm_plugin.h49 snd_pcm_format_t format; member
128 snd_pcm_format_t snd_pcm_plug_slave_format(snd_pcm_format_t format,
150 size_t samples, snd_pcm_format_t format);
155 size_t samples, snd_pcm_format_t format);
175 static inline int snd_pcm_plug_slave_format(int format, struct snd_mask *format_mask) { return form… in snd_pcm_plug_slave_format() argument
/sound/usb/
Dformat.c46 unsigned int format, void *_fmt) in parse_audio_format_i_type() argument
57 format = 1 << format; in parse_audio_format_i_type()
66 if (format & UAC2_FORMAT_TYPE_I_RAW_DATA) in parse_audio_format_i_type()
69 format <<= 1; in parse_audio_format_i_type()
75 (format == 0 || format == (1 << UAC_FORMAT_TYPE_I_UNDEFINED))) { in parse_audio_format_i_type()
79 format = 1 << UAC_FORMAT_TYPE_I_PCM; in parse_audio_format_i_type()
81 if (format & (1 << UAC_FORMAT_TYPE_I_PCM)) { in parse_audio_format_i_type()
121 if (format & (1 << UAC_FORMAT_TYPE_I_PCM8)) { in parse_audio_format_i_type()
129 if (format & (1 << UAC_FORMAT_TYPE_I_IEEE_FLOAT)) { in parse_audio_format_i_type()
132 if (format & (1 << UAC_FORMAT_TYPE_I_ALAW)) { in parse_audio_format_i_type()
[all …]
/sound/soc/codecs/
Dsi476x.c79 u16 format = 0; in si476x_codec_set_dai_fmt() local
86 format |= SI476X_DAUDIO_MODE_DSP_A; in si476x_codec_set_dai_fmt()
89 format |= SI476X_DAUDIO_MODE_DSP_B; in si476x_codec_set_dai_fmt()
92 format |= SI476X_DAUDIO_MODE_I2S; in si476x_codec_set_dai_fmt()
95 format |= SI476X_DAUDIO_MODE_RIGHT_J; in si476x_codec_set_dai_fmt()
98 format |= SI476X_DAUDIO_MODE_LEFT_J; in si476x_codec_set_dai_fmt()
111 format |= SI476X_DAUDIO_MODE_IB; in si476x_codec_set_dai_fmt()
124 format |= SI476X_DAUDIO_MODE_IB | in si476x_codec_set_dai_fmt()
128 format |= SI476X_DAUDIO_MODE_IB; in si476x_codec_set_dai_fmt()
131 format |= SI476X_DAUDIO_MODE_IF; in si476x_codec_set_dai_fmt()
[all …]
Dak4671.c523 u8 format; in ak4671_set_dai_fmt() local
540 format = snd_soc_read(codec, AK4671_FORMAT_SELECT); in ak4671_set_dai_fmt()
541 format &= ~AK4671_DIF; in ak4671_set_dai_fmt()
545 format |= AK4671_DIF_I2S_MODE; in ak4671_set_dai_fmt()
548 format |= AK4671_DIF_MSB_MODE; in ak4671_set_dai_fmt()
551 format |= AK4671_DIF_DSP_MODE; in ak4671_set_dai_fmt()
552 format |= AK4671_BCKP; in ak4671_set_dai_fmt()
553 format |= AK4671_MSBS; in ak4671_set_dai_fmt()
561 snd_soc_write(codec, AK4671_FORMAT_SELECT, format); in ak4671_set_dai_fmt()
Dtwl4030.c1710 u8 mode, old_mode, format, old_format; in twl4030_hw_params() local
1714 format = twl4030_read(codec, TWL4030_REG_AUDIO_IF); in twl4030_hw_params()
1720 ((format & TWL4030_AIF_FORMAT) == TWL4030_AIF_FORMAT_TDM)) in twl4030_hw_params()
1774 format = old_format; in twl4030_hw_params()
1775 format &= ~TWL4030_DATA_WIDTH; in twl4030_hw_params()
1778 format |= TWL4030_DATA_WIDTH_16S_16W; in twl4030_hw_params()
1781 format |= TWL4030_DATA_WIDTH_32S_24W; in twl4030_hw_params()
1789 if (format != old_format || mode != old_mode) { in twl4030_hw_params()
1797 twl4030_write(codec, TWL4030_REG_AUDIO_IF, format); in twl4030_hw_params()
1801 twl4030_write(codec, TWL4030_REG_AUDIO_IF, format); in twl4030_hw_params()
[all …]
Dpcm179x.c73 unsigned int format; member
78 unsigned int format) in pcm179x_set_dai_fmt() argument
83 priv->format = format; in pcm179x_set_dai_fmt()
112 switch (priv->format & SND_SOC_DAIFMT_FORMAT_MASK) { in pcm179x_hw_params()
Dpcm1681.c84 unsigned int format; member
143 unsigned int format) in pcm1681_set_dai_fmt() argument
149 if ((format & SND_SOC_DAIFMT_MASTER_MASK) != SND_SOC_DAIFMT_CBS_CFS) { in pcm1681_set_dai_fmt()
154 priv->format = format; in pcm1681_set_dai_fmt()
183 switch (priv->format & SND_SOC_DAIFMT_FORMAT_MASK) { in pcm1681_hw_params()
/sound/firewire/oxfw/
Doxfw-proc.c16 u8 *format; in proc_read_formation() local
30 format = oxfw->rx_stream_formats[i]; in proc_read_formation()
31 if (format == NULL) in proc_read_formation()
34 err = snd_oxfw_stream_parse_format(format, &formation); in proc_read_formation()
60 format = oxfw->tx_stream_formats[i]; in proc_read_formation()
61 if (format == NULL) in proc_read_formation()
64 err = snd_oxfw_stream_parse_format(format, &formation); in proc_read_formation()
Doxfw-stream.c390 u8 *format; in snd_oxfw_stream_get_current_formation() local
395 format = kmalloc(len, GFP_KERNEL); in snd_oxfw_stream_get_current_formation()
396 if (format == NULL) in snd_oxfw_stream_get_current_formation()
399 err = avc_stream_get_format_single(oxfw->unit, dir, 0, format, &len); in snd_oxfw_stream_get_current_formation()
407 err = snd_oxfw_stream_parse_format(format, formation); in snd_oxfw_stream_get_current_formation()
409 kfree(format); in snd_oxfw_stream_get_current_formation()
419 int snd_oxfw_stream_parse_format(u8 *format, in snd_oxfw_stream_parse_format() argument
431 if ((format[0] != 0x90) || (format[1] != 0x40)) in snd_oxfw_stream_parse_format()
436 if (format[2] == avc_stream_rate_table[i]) in snd_oxfw_stream_parse_format()
444 for (e = 0; e < format[4]; e++) { in snd_oxfw_stream_parse_format()
[all …]
/sound/oss/dmasound/
Ddmasound_q40.c47 static int Q40SetFormat(int format);
65 char *table = dmasound.soft.format == AFMT_MU_LAW ? dmasound_ulaw2dma8: dmasound_alaw2dma8; in q40_ct_law()
122 (dmasound.soft.format == AFMT_MU_LAW ? dmasound_ulaw2dma8: dmasound_alaw2dma8); in q40_ctx_law()
232 (dmasound.soft.format == AFMT_MU_LAW ? dmasound_ulaw2dma8: dmasound_alaw2dma8); in q40_ctc_law()
544 static int Q40SetFormat(int format) in Q40SetFormat() argument
548 switch (format) { in Q40SetFormat()
550 return(dmasound.soft.format); in Q40SetFormat()
557 format = AFMT_S8; in Q40SetFormat()
560 dmasound.soft.format = format; in Q40SetFormat()
563 dmasound.dsp.format = format; in Q40SetFormat()
[all …]
Ddmasound_paula.c81 static int AmiSetFormat(int format);
384 static int AmiSetFormat(int format) in AmiSetFormat() argument
390 switch (format) { in AmiSetFormat()
392 return dmasound.soft.format; in AmiSetFormat()
407 format = AFMT_S8; in AmiSetFormat()
410 dmasound.soft.format = format; in AmiSetFormat()
413 dmasound.dsp.format = format; in AmiSetFormat()
418 return format; in AmiSetFormat()
671 .format = AFMT_S8,
678 .format = AFMT_U8,
Ddmasound_atari.c127 static int TTSetFormat(int format);
132 static int FalconSetFormat(int format);
158 char *table = dmasound.soft.format == AFMT_MU_LAW ? dmasound_ulaw2dma8 in ata_ct_law()
388 char *table = dmasound.soft.format == AFMT_MU_LAW ? dmasound_ulaw2dma8 in ata_ctx_law()
956 static int TTSetFormat(int format) in TTSetFormat() argument
960 switch (format) { in TTSetFormat()
962 return dmasound.soft.format; in TTSetFormat()
969 format = AFMT_S8; in TTSetFormat()
972 dmasound.soft.format = format; in TTSetFormat()
975 dmasound.dsp.format = format; in TTSetFormat()
[all …]
/sound/pci/hda/
Dhda_eld.c176 a->format = GRAB_BITS(buf, 0, 3, 4); in hdmi_update_short_audio_desc()
177 switch (a->format) { in hdmi_update_short_audio_desc()
220 a->format = GRAB_BITS(buf, 2, 3, 5); in hdmi_update_short_audio_desc()
221 if (a->format == AUDIO_CODING_XTYPE_HE_REF_CT || in hdmi_update_short_audio_desc()
222 a->format >= AUDIO_CODING_XTYPE_FIRST_RESERVED) { in hdmi_update_short_audio_desc()
225 a->format); in hdmi_update_short_audio_desc()
226 a->format = 0; in hdmi_update_short_audio_desc()
228 a->format += AUDIO_CODING_TYPE_HE_AAC - in hdmi_update_short_audio_desc()
390 if (!a->format) in hdmi_show_short_audio_desc()
395 if (a->format == AUDIO_CODING_TYPE_LPCM) in hdmi_show_short_audio_desc()
[all …]
/sound/soc/spear/
Dspdif_in.c31 u32 format; member
77 static void spdif_in_format(struct spdif_in_dev *host, u32 format) in spdif_in_format() argument
81 switch (format) { in spdif_in_format()
99 u32 format; in spdif_in_hw_params() local
104 format = params_format(params); in spdif_in_hw_params()
105 host->saved_params.format = format; in spdif_in_hw_params()
126 spdif_in_format(host, host->saved_params.format); in spdif_in_trigger()
/sound/soc/intel/skylake/
Dskl-messages.c97 static int skl_dsp_prepare(struct device *dev, unsigned int format, in skl_dsp_prepare() argument
121 ret = snd_hdac_dsp_prepare(stream, format, size, dmab); in skl_dsp_prepare()
377 struct skl_module_fmt *format = &mconfig->in_fmt[0]; in skl_set_base_module_format() local
379 base_cfg->audio_fmt.number_of_channels = (u8)format->channels; in skl_set_base_module_format()
381 base_cfg->audio_fmt.s_freq = format->s_freq; in skl_set_base_module_format()
382 base_cfg->audio_fmt.bit_depth = format->bit_depth; in skl_set_base_module_format()
383 base_cfg->audio_fmt.valid_bit_depth = format->valid_bit_depth; in skl_set_base_module_format()
384 base_cfg->audio_fmt.ch_cfg = format->ch_cfg; in skl_set_base_module_format()
387 format->bit_depth, format->valid_bit_depth, in skl_set_base_module_format()
388 format->ch_cfg); in skl_set_base_module_format()
[all …]
/sound/soc/bcm/
Dbcm2835-i2s.c239 unsigned int ch1pos, ch2pos, mode, format; in bcm2835_i2s_hw_params() local
290 format = BCM2835_I2S_CHEN; in bcm2835_i2s_hw_params()
293 format |= BCM2835_I2S_CHWEX; in bcm2835_i2s_hw_params()
295 format |= BCM2835_I2S_CHWID((data_length-8)&0xf); in bcm2835_i2s_hw_params()
315 format = BCM2835_I2S_CH1(format) | BCM2835_I2S_CH2(format); in bcm2835_i2s_hw_params()
316 format |= BCM2835_I2S_CH1(BCM2835_I2S_CHPOS(ch1pos)); in bcm2835_i2s_hw_params()
317 format |= BCM2835_I2S_CH2(BCM2835_I2S_CHPOS(ch2pos)); in bcm2835_i2s_hw_params()
329 regmap_write(dev->i2s_regmap, BCM2835_I2S_RXC_A_REG, format); in bcm2835_i2s_hw_params()
330 regmap_write(dev->i2s_regmap, BCM2835_I2S_TXC_A_REG, format); in bcm2835_i2s_hw_params()
/sound/isa/sb/
Dsb16_main.c61 ((1U << runtime->format) == csp->acc_format)) { in snd_sb16_csp_playback_prepare()
69 if ((1 << runtime->format) & (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U8 | in snd_sb16_csp_playback_prepare()
80 if (csp->ops.csp_autoload(csp, runtime->format, SNDRV_SB_CSP_MODE_DSP_WRITE)) { in snd_sb16_csp_playback_prepare()
109 ((1U << runtime->format) == csp->acc_format)) { in snd_sb16_csp_capture_prepare()
118 if (csp->ops.csp_autoload(csp, runtime->format, SNDRV_SB_CSP_MODE_DSP_READ)) { in snd_sb16_csp_capture_prepare()
264 unsigned char format; in snd_sb16_playback_prepare() local
268 if (snd_pcm_format_unsigned(runtime->format) > 0) { in snd_sb16_playback_prepare()
269 format = runtime->channels > 1 ? SB_DSP4_MODE_UNS_STEREO : SB_DSP4_MODE_UNS_MONO; in snd_sb16_playback_prepare()
271 format = runtime->channels > 1 ? SB_DSP4_MODE_SIGN_STEREO : SB_DSP4_MODE_SIGN_MONO; in snd_sb16_playback_prepare()
285 snd_sbdsp_command(chip, format); in snd_sb16_playback_prepare()
[all …]
/sound/pci/
Dsis7019.c532 u32 format, dma_addr, control, sso_eso, delta, reg; in sis_pcm_playback_prepare() local
538 format = 0; in sis_pcm_playback_prepare()
539 if (snd_pcm_format_width(runtime->format) == 8) in sis_pcm_playback_prepare()
540 format |= SIS_PLAY_DMA_FORMAT_8BIT; in sis_pcm_playback_prepare()
541 if (!snd_pcm_format_signed(runtime->format)) in sis_pcm_playback_prepare()
542 format |= SIS_PLAY_DMA_FORMAT_UNSIGNED; in sis_pcm_playback_prepare()
544 format |= SIS_PLAY_DMA_FORMAT_MONO; in sis_pcm_playback_prepare()
571 writel(format, ctrl_base + SIS_PLAY_DMA_FORMAT_CSO); in sis_pcm_playback_prepare()
736 u32 format, control, sso_eso, delta; in sis_prepare_timing_voice() local
743 buffer_size /= snd_pcm_format_size(runtime->format, 1); in sis_prepare_timing_voice()
[all …]

12345678