- Feb 19, 2019
-
-
Tomeu Vizoso authored
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
-
- Feb 14, 2019
-
-
Tomeu Vizoso authored
-
- Jan 29, 2019
-
-
Srinivas Kandagatla authored
DB820c board is based of MSM8996 Qualcomm SoC, which has support for both Digital and Analog audio. Digital audio is over HDMI and analog is over WCD9335 codec via SLIMbus. Board itself has HDMI port, a 3.5mm audio Jack and an Audio expansion connector. This patch adds support for HDMI port and 3.5mm jack. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
- Jan 25, 2019
-
-
Jaroslav Kysela authored
This reverts commit d8013619. The USB driver defines identical profile as for WD15. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-
Hui Wang authored
USB-audio device on Dell WD19 docking station provides two individual output PCM streams, one for headphone Jack and another for speaker out Jack. A UCM profile gives the proper roles for these. Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-
- Jan 09, 2019
-
-
Takashi Iwai authored
snd_pcm_hw_sw_params() in pcm_hw.c tries to abuse the reserved bits for passing period_Event flag. In this hackish way, we clear the reserved bits at beginning, and restore before returning. However, the code paths that return earlier don't restore the value, hence when user calls this function twice, it may pass an unexpected value. This patch fixes the failure, restoring the value always before returning from the function. Reported-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
- Jan 07, 2019
-
-
Jaroslav Kysela authored
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-
Jaroslav Kysela authored
Always free the include path which must be mallocated by the caller. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-
Hans de Goede authored
After recent kernel work, the kernel now sets a long-name for bytcht-es8316 boards which indicates if a single (mono) speaker or stereo speakers are used and if in1 or in2 is used for the internal mic (the headset mic will be on the other input). This commit adds UCM profiles for bytcht-es8316 boards using these new long-names, based on the generic bytcht-es8316 profile. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-
Hans de Goede authored
Add an UCM profile for Bay Trail and Cherry Trail boards with an ES8316 codec. Re-use the existing platform enable and disable sequences for BYT/CHT SST support and add a codecs/es8316 dir with codec specific enable / disable sequences for the various inputs and outputs. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-
Russell Parker authored
Since the Internal Analog Microphone device configuration is identical for the rt5645 and rt5645 mono speaker UCMs, move the entire definition to a component. Signed-off-by: Russell Parker <russell.parker7@gmail.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-
Russell Parker authored
Signed-off-by: Russell Parker <russell.parker7@gmail.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-
Russell Parker authored
Move common enable sequences for rt5645 variants and rt5650 UCM configurations into a shared component. The corresponding disable sequences are only two lines each and do not seem worth creating components for. Signed-off-by: Russell Parker <russell.parker7@gmail.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-
Russell Parker authored
Factor out the common enable and disable sequences used in rt5645 variants, including the rt5650. Move the sequences into a new component directory codecs/rt5645/ along with a Makefile. Some lines like cset "name='Stereo1 ADC1 Mux' 1" and cset "name='I2S2 Func Switch' on" are not set set in the chtrt5650 UCM sequences and thus are not present in the new component, in order to maximize reuse. Signed-off-by: Russell Parker <russell.parker7@gmail.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-
Russell Parker authored
The Lenovo Ideapad Miix 320, Asus T100HA, and chtrt5645 mono variant UCM configurations have not been updated to make use of the shared bytcr/PlatfromEnableSeq.conf sequence. This commit deletes those command sequences and loads the shared component directly. Signed-off-by: Russell Parker <russell.parker7@gmail.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-
Jaroslav Kysela authored
Allow to write to the whole array (512 bytes). Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-
- Jan 01, 2019
-
-
Hans de Goede authored
During my recent work on the bytcht-es8316 UCM profile I realized that the bytcr-rt5651 devices with a single speaker use a differential setup just like the es8316 does. The tell-tale here is the speaker going quiet when playing the exact same sound on both channels when things are configured for stereo speakers. I've run some tests and the rt5651 does have a special mono balanced out mode for its line-out but using this results in the same sound (and the same loudness / volume of the sound) as our current solution, so adding support for this to the kernel buys us nothing. This commit makes no changes, it just documents my findings in a big comment for future reference. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
Hans de Goede authored
Add a config for boards which use a digital mic as internal mic, combined with having the headset mic on in2. An example of such a board is the Point of View TAB-P1006W-232 (v1.0) tablet. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
Hans de Goede authored
Add a new ucm/codecs/rt5651/DigitalMic.conf snippet for digital mic support and include this in the default non board-specific bytcr-rt5651.conf. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
Hans de Goede authored
The first design with the headset-mic on IN2 rather then the default / reference-design IN3 has shown up. Add a new ucm/codecs/rt5651/IN2-HeadsetMic.conf snippet to deal with this and include this in the default non board-specific bytcr-rt5651.conf. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
Hans de Goede authored
Explicitly enable the right 'Stereo? ADC MIXL ADC?' when selecting an input, rather then just enabling them all in ucm/codecs/rt5651/EnableSeq.conf . This is a preparation patch for adding digital mic support. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
Hui Wang authored
The new generation of Dell Edge IoT platform is based on Intel Kabylake platform, and the audio codec is ALC3277 which is 100% compatible with RT5660 in I2S mode. The audio design on this IoT platform is as below: - Intel kabylake platform - connect the codec ALC3277 via SSP0 - line-out and line-in with Micbias jacks - line-out mute control and jack detection of line-out and line-in - two HDMI ports with audio capability Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
- Dec 30, 2018
-
-
Russell Parker authored
Add a UCM configuration for the rt5650 codec. Tested on a Samsung Chromebook 3. Adapted with minor modifications from GitHub user evan-a-a's gist: https://gist.github.com/evan-a-a/86b2a698708074530e2d0ee7c6498767 Signed-off-by: Russell Parker <russell.parker7@gmail.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-
- Dec 19, 2018
-
-
Takashi Iwai authored
The recent change to support the drain via polling caused a regression for pulse plugin; with speaker-test -c2 -twav with pulse, it leads to either no sounds or stall. The only sensible behavior change in the commit wrt pulse plugin is that now it starts the stream before calling drain callback. This supposed to be correct, but it seems hitting a pulse plugin bug. The start before drain callback is only a matter of consistency, and since this doesn't work for the single existing plugin using drain callback, we don't need to stick with this behavior. For addressing the regression, we check the presence of the drain callback and start the stream only when it doesn't exist, i.e. only in drain-via-poll mode. Fixes: ce2095c4 ("pcm: ioplug: Implement proper drain behavior") Reported-by: Diego Viola <diego.viola@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
- Dec 10, 2018
-
-
Timo Wischer authored
Without this patch it is not possible to link the channel and format parameter if snd_pcm_extplug_set_param_*() or snd_pcm_extplug_set_slave_param_*() is called. Therefore the client and slave parameter can differ. So the extplug has to implement conversion. To avoid this the new snd_pcm_extplug_set_param_link() function can be called. As a reproduction sceanrio the following extplug source code can be used: === static snd_pcm_sframes_t my_transfer(snd_pcm_extplug_t *e, const snd_pcm_channel_area_t *da, snd_pcm_uframes_t dof, const snd_pcm_channel_area_t *sa, snd_pcm_uframes_t sof, snd_pcm_uframes_t s) { return s; } static const snd_pcm_extplug_callback_t my_own_callback = { .transfer = my_transfer }; SND_PCM_PLUGIN_DEFINE_FUNC(my_plug) { snd_config_iterator_t i, next; snd_config_t *slave = NULL; snd_pcm_extplug_t *myplug; snd_config_for_each(i, next, conf) { snd_config_t *n = snd_config_iterator_entry(i); const char *id; if (snd_config_get_id(n, &id) < 0) continue; if (strcmp(id, "comment") == 0 || strcmp(id, "type") == 0) continue; if (strcmp(id, "slave") == 0) { slave = n; continue; } return -EINVAL; } myplug = calloc(1, sizeof(*myplug)); myplug->version = SND_PCM_EXTPLUG_VERSION; myplug->callback = &my_own_callback; snd_pcm_extplug_create(myplug, name, root, slave, stream, mode); snd_pcm_extplug_set_param_minmax(myplug, SND_PCM_EXTPLUG_HW_CHANNELS, 1, 16); // snd_pcm_extplug_set_param_link(myplug, SND_PCM_EXTPLUG_HW_CHANNELS, 1); *pcmp = myplug->pcm; return 0; } SND_PCM_PLUGIN_SYMBOL(my_plug); === To use this plugin the following ALSA configuration is required: pcm.myplug { type my_plug slave.pcm hw:Dummy } With this configuration without this patch snd_pcm_hw_params_get_channels_max() will always return 16 channels independent of the supported channels of the dummy device. Due to that for example the start up of JACK would fail: $ modprobe snd_dummy $ jackd -d alsa -P myplug ALSA: cannot set channel count to 16 for playback ALSA: cannot configure playback channel Signed-off-by: Timo Wischer <twischer@de.adit-jv.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
- Nov 29, 2018
-
-
Takashi Iwai authored
Many UCM profiles include the UCM profile components under ucm/* subdirectories and thusly put <searchdir:ucm> at each place. This is rather cumbersome. This patch makes the UCM parser to set the default include path, so that each profile no longer needs to set searchdir. All the <searchdir:ucm> lines currently found in the profiles are removed gracefully, too. For the needed implementation, a new helper, _snd_config_load_with_include() is introduced. It's not exported, only for the use inside alsa-lib. Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
- Nov 28, 2018
-
-
Takashi Iwai authored
We have placed UCM profile snippets to be included by the main config files also in the same directory, src/conf/ucm, it confuses alsaucm program that scans over all subdirectories. It thinks such a file is also the main config file, and spews errors like: % alsaucm ALSA lib utils.c:67:(uc_mgr_config_load) could not open configuration file /usr/share/alsa/ucm/bytcr/bytcr.conf ALSA lib parser.c:1427:(load_master_config) error: could not parse configuration for card bytcr alsaucm: unable to obtain card list: No such file or directory Actually we already defined the subdirectory for such components, and they are skipped at parsing the main configs. So we just need to move the files there -- this is what's done here. One more thing done here is to add a new component subdirectory, platforms, for definitions bytcr/* that don't match with neither the existing ones (codecs nor dsps). Suggested-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Jaroslav Kysela <perex@perex.cz> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Tested-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
Hui Wang authored
This Dock doesn't have IEC958 physical output, so add it to the blacklist to prevent it being opened. [ Also adding WD15 Dock entry that has the same problem -- tiwai ] Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
- Nov 21, 2018
-
-
Kirill Marinushkin authored
Configuration to reproduce: ~~~~ pcm.share_right { type dshare ipc_key 73 ipc_perm 0666 slave { pcm "hw:0,0" } bindings { # the seagfault happens when we don't bind channel 0 1 1 } } ~~~~ Execute to reproduce: ~~~~ $ aplay -D plug:share_right test.wav Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo Segmentation fault ~~~~ For channels whithout binding, values are set to UINT_MAX in function `snd_pcm_direct_parse_bindings()`: ~~~~ for (chn = 0; chn < count; chn++) bindings[chn] = UINT_MAX; /* don't route */ ~~~~ But, these values are not checked when playing, which causes the segfault. This commit fixes the issue. Signed-off-by: Kirill Marinushkin <kmarinushkin@birdec.tech> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
- Nov 13, 2018
-
-
Laxmi Devi authored
These changes are required due to the kernel commit 07b7acb51d283d8469696c906b91f1882696a4d4 ("ASoC: rsnd: update pointer more accurate") Issue is that snd_pcm_wait() goes back to waiting because the hw_ptr is not period aligned. Therefore snd_pcm_wait() will block for a longer time as required. With these rcar driver changes the exact position of the dma is returned. During snd_pcm_start they read hw_ptr as reference, and this hw_ptr is now not period aligned, and is a little ahead over the period while it is read. Therefore when the avail is calculated during snd_pcm_wait(), it is missing the avail_min by a few frames. An additional option hw_ptr_alignment is provided to dmix configuration, to allow the user to configure the slave application and hw pointer alignment at startup [ Slight indentation and parentheses removals by tiwai ] Signed-off-by: Laxmi Devi <Laxmi.Devi@in.bosch.com> Signed-off-by: Timo Wischer <twischer@de.adit-jv.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
- Nov 02, 2018
-
-
Thomas De Schampheleire authored
The AM_PATH_ALSA macro in utils/alsa.m4 unconditionally uses -ldl. This breaks compilation of alsa-utils (and probably other packages using this macro) for targets that do not support dynamic loading. This patch updates the macro to check if dlopen is available, and use that result to conditionally add -ldl to the list of libraries. Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
- Oct 24, 2018
-
-
Jaroslav Kysela authored
-
Jaroslav Kysela authored
-
Jaroslav Kysela authored
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-
Timo Wischer authored
Without this change an interval of (x x+1] will be interpreted as an empty interval but the right value would be x+1. This leads to a failing snd_pcm_hw_params() call which returns -EINVAL. An example issue log is given in the following: snd_pcm_hw_params failed with err -22 (Invalid argument) ACCESS: MMAP_NONINTERLEAVED FORMAT: S16_LE SUBFORMAT: STD SAMPLE_BITS: 16 FRAME_BITS: 16 CHANNELS: 1 RATE: 16000 PERIOD_TIME: (15999 16000] PERIOD_SIZE: (255 256] PERIOD_BYTES: (510 512] PERIODS: [2 3) BUFFER_TIME: 32000 BUFFER_SIZE: 512 BUFFER_BYTES: 1024 In case of (x x+1) we have to interpret it anyway as a single value of x to compensate rounding issues. For example the period size will result in an interval of (352 353) when the period time is 16ms and the sample rate 22050 Hz (16ms * 22,05 kHz = 352,8 frames). But 352 has to be chosen to allow a buffer size of 705 (32ms * 22,05 kHz = 705,6 frames) which has to be >= 2x period size to avoid Xruns. The buffer size will not end up with an interval of (705 706) simular to the period size because snd_pcm_rate_hw_refine_cchange() calls snd_interval_floor() for the buffer size. Therefore this value will be interpreted as an integer interval instead of a real interval further on. This issue seems to exist since the change of 9bb985c3 ("pcm: snd_interval_refine_first/last: exclude value only if also excluded before") Signed-off-by: Timo Wischer <twischer@de.adit-jv.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-
Jaroslav Kysela authored
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-
Jaroslav Kysela authored
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-
Jaroslav Kysela authored
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-
Jaroslav Kysela authored
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-
- Oct 18, 2018
-
-
Takashi Iwai authored
The device name string for Dell WD15 (and its variants) dock is set as "WD15Dock", while the actual device name to be used is "Dock". Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1112292 Fixes: 8ebb40c9 ("conf/ucm: Add a UCM profile for Dell WD15 Dock USB-audio") Signed-off-by: Takashi Iwai <tiwai@suse.de>
-