summaryrefslogtreecommitdiffstats
path: root/sound
AgeCommit message (Collapse)Author
2014-05-27ALSA: fireworks/bebob: Use the same type of variables as function parametersTakashi Sakamoto
The second argument of snd_efw_command_get_sampling_rate() means sampling rate and its type is 'unsigned int'. But 'int' variable is passed as parameter. It's better to apply the same type for the variable as its argument. Similally, the type of variable for snd_efw_command_get_clock_source() and avc_bridgeco_get_plug_type() should be the same type as each argument. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-27ALSA: fireworks/bebob: Change type of argument for sampling rateTakashi Sakamoto
Originally, I intent to this argument given with 'struct snd_pcm_runtime.rate' or params_rate(). They return value of 'unsigned int'. So 'unsigned int' is better for the type of this argument. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-27ALSA: fireworks: Use the same prototype for functions as actual declarationTakashi Sakamoto
There are two modes for Fireworks, IEC 61883 compliant or Windows. So it's better to use enum type instead of int to express the intension, even if C language specification defines to handle enum variables as usual integer. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-27ALSA: fireworks: Fix wrong value as argument for PTR_ERR()Takashi Sakamoto
The return value of memdup_user() should be passed to return correct error. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-27ALSA: firewire-lib: Fix sparse warning of incorrect type in assignmentTakashi Sakamoto
__be32 value should not be assigned directly to bool value. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-27ALSA: firewire-lib: Use ARRAY_SIZE() instead of sizeof() for correct loop limitTakashi Sakamoto
This commit fixes a big for loop count with array. The limitation of loop count should be calcurated with the number of elements in the array, not with the number of bytes. Aditionally, this commit apply the same declaration as a prototype in header for the array. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-27ASoC: wm_adsp: Use adsp_err/warn instead of dev_err/warnCharles Keepax
We have defines for adsp messages best to consistently use them. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-27ASoC: sgtl5000: Fix the cache handlingFabio Estevam
Since commit e5d80e82e32e (ASoC: sgtl5000: Convert to use regmap directly) a kernel oops is observed after a suspend/resume sequence. The kernel oops happens inside sgtl5000_restore_regs() as codec->reg_cache is no longer a valid pointer. Add the remaining register entries into sgtl5000_reg_defaults[] and remove sgtl5000_restore_regs() completely, which allows suspend/resume to work fine and make the code simpler. Tested on a im53-qsb board. Reported-by: Shawn Guo <shawn.guo@freescale.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Tested-by: Shawn Guo <shawn.guo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-27ALSA: sound/aoa/codecs/onyx.c: use static const for textsFabian Frederick
'texts' is only used as source in strcpy Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-27ALSA: hda: fix tegra buildArnd Bergmann
When CONFIG_PM is disabled, the CONFIG_SND_HDA_POWER_SAVE_DEFAULT symbol does not get defined, which causes a build error for the hda-tegra driver: hda/hda_tegra.c:80:25: error: 'CONFIG_SND_HDA_POWER_SAVE_DEFAULT' undeclared here (not in a function) static int power_save = CONFIG_SND_HDA_POWER_SAVE_DEFAULT; ^ /git/arm-soc/sound/pci/hda/hda_tegra.c:235:13: warning: 'hda_tegra_disable_clocks' defined but not used [-Wunused-function] static void hda_tegra_disable_clocks(struct hda_tegra *data) ^ This works around the problem by not referencing that macro when CONFIG_PM is disabled. Instead, we assume that it's disabled unconditionally and cannot be enabled at runtime. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Dylan Reid <dgreid@chromium.org> Cc: Stephen Warren <swarren@nvidia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-26ASoC: samsung: Use params_width()Tushar Behera
commit 8c5178fca4ce ("ALSA: Add params_width() helpers") introduces a helper to get the sample width. Updating Samsung related sound drivers to use this helper. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: sirf-audio-codec: Simplify the new bitmask value in regmap_update_bitsAxel Lin
Having the binary ones complement operator in the new bitmak value makes the code hard to read. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ALSA: hda - Pop noises fix for XPS13 9333Gabriele Mazzotta
When headphones are plugged in, force AFG and node 0x02 ("Headphone Playback Volume") to D0 to avoid pop noises. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=76611 Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-26ASoC: davinci-evm: Replace instances of rtd->codec->card with rtd->cardLars-Peter Clausen
No need to go via the CODEC to get a pointer to the card. This will help to eventually remove the card field from the snd_soc_codec struct. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: max98095: Add master clock handlingTushar Behera
If master clock is provided through device tree, then update the master clock frequency during set_sysclk. Documentation has been updated to reflect the change. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: max98090: Add master clock handlingTushar Behera
If master clock is provided through device tree, then update the master clock frequency during set_sysclk. Documentation has been updated to reflect the change. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: alc5623: Fix Kconfig dependencyTakashi Iwai
Add "depends on I2C" to shut up the build errors from randconfig. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: omap-pcm: Move omap-pcm under include/soundJyri Sarha
Make including the omap-pcm.h outside sound/soc/omap more convenient. Signed-off-by: Jyri Sarha <jsarha@ti.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26Merge branch 'topic/davinci' of ↵Mark Brown
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-omap
2014-05-26ASoC: jack: Add support for GPIO descriptor defined jack pinsJarkko Nikula
Allow jack GPIO pins be defined also using GPIO descriptor-based interface in addition to legacy GPIO numbers. This is done by adding two new fields to struct snd_soc_jack_gpio: idx and gpiod_dev. Legacy GPIO numbers are used only when GPIO consumer device gpiod_dev is NULL and otherwise idx is the descriptor index within the GPIO consumer device. New function snd_soc_jack_add_gpiods() is added for typical cases where all GPIO descriptor jack pins belong to same GPIO consumer device. For other cases the caller must set the gpiod_dev in struct snd_soc_jack_gpio before calling snd_soc_jack_add_gpios(). Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: jack: Basic GPIO descriptor conversionJarkko Nikula
This patch does basic GPIO descriptor conversion to soc-jack. Even the GPIOs are still passed and requested using legacy GPIO numbers the driver internals are converted to use GPIO descriptor API. Motivation for this is to prepare soc-jack so that it will allow registering jack GPIO pins using both GPIO descriptors and legacy GPIO numbers. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: pxa: pxa-ssp: Terminate of match tableStephen Boyd
Failure to terminate this match table can lead to boot failures depending on where the compiler places the match table. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Acked-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: rsnd: add rsnd_gen_dma_addr() for DMAC addrKuninori Morimoto
The DMAC src/dst addr needs to be set from driver when DT case. (It was set from SoC/DMAEngine code when non-DT case) This patch adds rsnd_gen_dma_addr() to set DMAC src/dst addr. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: rsnd: care DMA slave channel name for DTKuninori Morimoto
Renesas sound driver is supporting to use DMAEngine. But, DMA slave channel name "tx", "rx" is not enough in DT case. Becuase, it has many ports and path combination. This patch adds rsnd_dma_of_name() to find DMA channel name, for example memory to SSI0 is "mem_ssi0", SSI0 to memory is "ssi0_mem", SSI0 to SRC0 is "ssi0_src0", SRC0 to SSI0 is "src0_ssi0", SRC0 to DVC0 is "src0_dvc0"... Renesas sound want to use PIO transfer mode for some reasons. It will be PIO tranfer mode if device node doesn't have DMA settings. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: rsnd: module name is unifiedKuninori Morimoto
Renesas sound driver uses many modules (= SSI/SRC/DVC), and each module had own name. But, each module name can be used as several purpose, like clock name, DMA name etc... This patch uses common name for each module. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: rsnd: remove rsnd_src_non_opsKuninori Morimoto
Renesas sound driver is supporting Gen1/Gen2. SRC probe can return error if it was unknown generation. Now, rsnd_src_non_ops is not needed. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: rsnd: save platform_device instead of deviceKuninori Morimoto
DT DMA support needs struct platform_device pointer, and it can get struct device pointer from platform_device. Save platform_device instead of device. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: rsnd: DT node clean up by using the of_node_put()Kuninori Morimoto
Driver needs to call of_node_put() after of_get_chile_by_name() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: tegra: free jack GPIOs before the sound card is freedStephen Warren
snd_soc_jack_add_gpios() schedules a work queue item to poll the GPIO to generate an initial jack status report. If sound card initialization fails, that work item needs to be cancelled, so it doesn't run after the card has been freed. Specifically, freeing the card calls snd_jack_dev_free() which calls snd_jack_dev_disconnect() which sets jack->input_dev = NULL, and input_dev is used by snd_jack_report(), which is called from the work queue item. snd_soc_jack_free_gpios() cancels the work item. The Tegra ASoC machine drivers do call this function in the platform driver remove() callback. However, this happens after the sound card is freed, at least when the card is freed due to errors late during snd_soc_instantiate_card(). This leaves a window where the work item can execute after the card is freed. In next-20140522, sound card initialization does fail for unrelated reasons, and hits the problem described above. To solve this, fix the Tegra ASoC machine drivers to clean up the Jack GPIOs during the snd_soc_card's .remove() callback, which is executed before the overall card object is freed. also, gGuard the cleanup call based on whether we actually setup up the GPIOs in the first place. Ideally, we'd do the cleanup in a struct snd_soc_dai_link .fini/remove function to match where the GPIOs get set up. However, there is no such callback. This change fixes all Tegra machine drivers. By code inspection, I believe some non-Tegra machine drivers have the same issue. I'll send a patch for that separately, once this is reviewed. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: Intel: avoid format string leak to thread nameKees Cook
This makes sure a format string can never get processed into the worker thread name from the device name. Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: simple-card: Support setting mclk via a fixed factorAndrew Lunn
Some platforms require that the codecs mclk is a fixed multiplication factor of the audio stream rate. Add a optional property to the binding to hold this factor and implement a hw_params() function to make use of it. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: max98090: Add NI/MI values for user pclk 19.2 MHzChen Zhen
This patch adds the clock divisor and multiplier NI, MI values for audio sampling frequencies 44100 and 48000 Hz and PCLK 19.2 MHz. This is useful for the Odroid X2/U2 boards when the codec works in master mode and its MCLK clock is fed from the I2S CDCLK output. Signed-off-by: Chen Zhen <zhen1.chen@samsung.com> [s.nawrocki@samsung.com: edited the commit description] Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: fsl_ssi: Add suspend/resume supportFabio Estevam
Doing a suspend/resume sequence while playing an audio track in the backgroung causes broken audio right after resume: root@freescale /$ aplay clarinet.wav & root@freescale /home$ Playing WAVE 'clarinet.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono root@freescale /home$ echo mem > /sys/power/state PM: Syncing filesystems ... done. Freezing user space processes ... (elapsed 0.002 seconds) done. Freezing remaining freezable tasks ... (elapsed 0.002 seconds) done. Suspending console(s) (use no_console_suspend to debug) PM: suspend of devices complete after 37.082 msecs PM: suspend devices took 0.040 seconds PM: late suspend of devices complete after 4.234 msecs PM: noirq suspend of devices complete after 4.618 msecs Disabling non-boot CPUs ... PM: noirq resume of devices complete after 4.013 msecs PM: early resume of devices complete after 4.000 msecs PM: resume of devices complete after 68.907 msecs PM: resume devices took 0.070 seconds Restarting tasks ... Suspended. Trying resume. Failed. Restarting stream. Done. Suspended. Trying resume. Failed. Restarting stream. Done. Suspended. Trying resume. Failed. Restarting stream. Done. Suspended. Trying resume. Failed. Restarting stream. Done. Suspended. Trying resume. Failed. Restarting stream. Done. Suspended. Trying resume. Failed. Restarting stream. Done. Suspended. Trying resume. Failed. Restarting stream. Done. .... Add SNDRV_PCM_TRIGGER_RESUME/SUSPEND cases so that we can gracefully handle system suspend/resume. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Shawn Guo <shawn.guo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ALSA: firewire/bebob: Add a workaround for M-Audio special Firewire seriesTakashi Sakamoto
In post commit, a quirk of this firmware about transactions is reported. This commit apply a workaround for this quirk. They often fail transactions due to gap_count mismatch. This state is changed by generating bus reset. The fw_schedule_bus_reset() is an exported symbol in firewire-core. But there are no header for public. This commit moves its prototype from drivers/firewire/core.h to include/linux/firewire.h. This mismatch still affects bus management before generating this bus reset. It still takes a time to call driver's probe() because transactions are still often failed. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-26ALSA: bebob: Send a cue to load firmware for M-Audio Firewire seriesTakashi Sakamoto
Just powering on, these devices below wait to download firmware. - Firewire Audiophile - Firewire 410 - Firewire 1814 - ProjectMix I/O But firmware version 5058 or later, flash memory in the device stores the firmware. So this driver can enable these devices by sending a certain cue to load the firmware. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-26ALSA: bebob: Add a quirk of data blocks for MIDI messages for some M-Audio ↵Takashi Sakamoto
devices The firmwares for M-Audio Firewire 410/1814 and ProjectMix I/O has a quirk to ignore MIDI messages in data blocks more than 8. This commit uses a flag which Fireworks uses for a similar quirk. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-26ALSA: bebob/firewire-lib: Add a quirk of wrong dbc in empty packet for ↵Takashi Sakamoto
M-Audio special Firewire series M-Audio Firewire 1814 has a quirk, ProjectMix I/O also has. They transmit empty packet with wrong value of dbc incremented by 8 at high sampling rate. According to IEC 61883-1, this value should be the same as the one in previous packet. This commit adds a flag named as CIP_EMPTY_HAS_WRONG_DBC. With flag, the value of dbc in empty packet is overwittern by an expected value. This is an example of this quirk: CIP Header 0 CIP Header 1 Payload size 010D0000 9004F759 210 010D0010 90040B59 210 010D0020 90042359 210 01020028 9004FFFF 2 <- 010D0030 90043759 210 010D0040 90044B59 210 010D0050 90046359 210 01020058 9004FFFF 2 <- 010D0060 90047759 210 010D0070 90048B59 210 010D0080 9004A359 210 01020088 9004FFFF 2 <- 010D0090 9004B759 210 010D00A0 9004CB59 210 010D00B0 9004E359 210 010200B8 9004FFFF 2 <- 010D00C0 9004F759 210 010D00D0 90040B59 210 010D00E0 90042359 210 Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-26ALSA: bebob: Add support for M-Audio special Firewire seriesTakashi Sakamoto
This commit allows this driver to support some models which M-Audio produces with DM1000 but its firmware is special. They are: - Firewire 1814 - ProjectMix I/O They have heavily customized firmware. The usual operations can't be applied to them. For this reason, this commit adds a model specific member to 'struct snd_bebob' and some model specific functions. Some parameters are write-only so this commit also adds control interface for applications to set them. M-Audio special firmware quirks: - Just after powering on, they wait to download firmware. This state is changed when receiving cue. Then bus reset is generated and the device is recognized as a different model with the uploaded firmware. - They don't respond against BridgeCo AV/C extension commands. So drivers can't get their stream formations and so on. - They do not start to transmit packets only by establishing connection but also by receiving SIGNAL FORMAT command. - After booting up, they often fail to send response against driver's request due to mismatch of gap_count. This module don't support to upload firmware. Tested-by: Darren Anderson <darrena092@gmail.com> (ProjectMix I/O) Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-26ALSA: bebob: Add support for M-Audio usual Firewire seriesTakashi Sakamoto
This commit allows this driver to support some models which M-Audio produces with DM1000/DM1000E with usual firmware. They are: - Firewire 410 - Firewire AudioPhile - Firewire Solo - Ozonic - NRV10 - FirewireLightBridge According to a person who worked in BridgeCo, some models are produced with 'Pre-BeBoB'. This means that these products were released before BeBoB was officially produced, and later BeBoB specification was formed. So these models have some quirks. M-Audio usual firmware quirks: - Just after powering on, 'Firewire 410' waits to download firmware. This state is changed when receiving cue. Then bus reset is generated and the device is recognized as a different model with the uploaded firmware. - 'Firewire Audiophile' also waits to download firmware but its vendor id/model id is the same as the one after loading firmware. - The information of channel mapping for MIDI conformant data channel is invalid against BridgeCo specification. This commit adds some codes for these quirks but don't support to upload firmware. This commit also adds specific operations to get metering information. The metering information also includes status of clock synchronization if the model supports to switch source of clock. The specification of FirewireLightBridge is unknown. So in this time, normal operations are applied for this model. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-26ALSA: bebob: Add support for Focusrite Saffire/SaffirePro seriesTakashi Sakamoto
This commit allows this driver to support all of models which Focusrite produces with DM1000/BeBoB. They are: - Saffire - Saffire LE - SaffirePro 10 I/O - SaffirePro 26 I/O This commit adds Focusrite specific operations: 1. Get source of clock 2. Get/Set sampling frequency 3. Get metering information The driver uses these functionalities to read/write specific address by async transaction. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-26ALSA: bebob: Add support for Yamaha GO seriesTakashi Sakamoto
This commit allows this driver to support all of models which Yamaha produced with DM1000/BeBoB. They are: - GO44 - GO46 This commit adds Yamaha specific operations. To get source of clock, AV/C Audio Subunit command is used. I note that their appearances are similar to some models of TerraTec; 'Go44' is similar to 'PHASE 24 FW' and 'GO46' is similar to 'PHASE X24 FW'. But their combination of Audio/Music subunits is a bit different. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-26ALSA: bebob: Add support for Terratec PHASE, EWS series and AureonTakashi Sakamoto
This commit allows this driver to support all of models which Terratec produced with DM1000/BeBoB. They are: - PHASE 24 FW - PHASE X24 FW - PHASE 88 Rack FW - EWS MIC2 - EWS MIC4 - Aureon 7.1 Firewire For Phase series, this commit adds a Terratec specific operation. To get source of clock. AV/C Audio Subunit command is used. For EWS series and Aureon, this module uses normal operations. Tested-by: Maximilian Engelhardt <maxi@daemonizer.de> (PHASE 24 FW) Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-26ALSA: bebob: Prepare for device specific operationsTakashi Sakamoto
This commit is for some devices which have its own operations or quirks. Many functionality should be implemented in user land. Then this commit adds functionality related to stream such as sampling frequency or clock source. For help to debug, this commit adds the functionality to get metering information if it's available. To help these functionalities, this commit adds some AV/C commands defined in 'AV/C Audio Subunit Specification (1394TA). Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-26ALSA: bebob: Add hwdep interfaceTakashi Sakamoto
This interface is designed for mixer/control application. By using hwdep interface, the application can get information about firewire node, can lock/unlock kernel streaming and can get notification at starting/stopping kernel streaming. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-26ALSA: bebob: Add PCM interfaceTakashi Sakamoto
This commit adds a functionality to capture/playback PCM samples. When AMDTP stream is already running for PCM or the source of clock is not internal, available sampling rate is limited at current one. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-26ALSA: bebob: Add MIDI interfaceTakashi Sakamoto
This commit adds a functionality to capture/playback MIDI messages. When no AMDTP streams are running, this module starts AMDTP stream at current sampling rate for MIDI substream. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-26ALSA: bebob: Add proc interface for debugging purposeTakashi Sakamoto
This commit adds proc interface to get these information for debugging: - firmware information - stream formation - current clock source and sampling rate Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-26ALSA: bebob/firewire-lib: Add a quirk for discontinuity at bus resetTakashi Sakamoto
Normal BeBoB firmware has a quirk. When receiving bus reset, it transmits packets with discontinuous value in dbc field. This causes two situation, one is to abort streaming by firewire-lib as a result of detecting the discontinuity. Another is to call driver's .update() because of bus reset. These two is generated independently. (The former depends on isochronous stream and the latter depends on IEEE1394 bus driver.) When BeBoB driver works with XRUN-recoverable applications, this situation looks like stream_start_duplex() call followed by stream_update_duplex() call because applications will call snd_pcm_prepare() immediately at XRUN. To update connections and streams at first, this commit use completion. When queueing error occurs, stream_start_duplex() is forced to wait maximum 1000msec. During this, when .update() is called, the completion is waken and stream_start_duplex() is processed without breaking connections. At bus reset, stream_start_duplex() shouldn't break/establish connections and stream_update_duplex() should update connections because a caller of fw_iso_resources_allocate() is responsible for calling fw_iso_resources_update() on bus reset. This commit also adds a flag, which has an effect to skip checking continuity for first packet. This flag is useful for BeBoB quirk to start handling packets during streaming. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-26ALSA: bebob: Add commands and connections/streams managementTakashi Sakamoto
This commit adds management functionality for connections and streams. BeBoB uses CMP to manage connections and uses AMDTP for streams. This commit also adds some BridgeCo's AV/C extension commands. There are some BridgeCo's AV/C extension commands but this commit just uses below commands to get device's capability and status: 1.Extended Plug Info commands - Plug Channel Position Specific Data - Plug Type Specific Data - Cluster(Section) Info Specific Data - Plug Input Specific Data 2.Extended Stream Format Information commands - Extended Stream Format Information Command - List Request For Extended Plug Info commands for Cluster Info Specific Data, I pick up 'section' instead of 'cluster' from document to prevent from misunderstanding because 'cluster' is also used in IEC 61883-6. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-26ALSA: bebob: Add skelton for BeBoB based devicesTakashi Sakamoto
This commit adds a new driver for BeBoB based devices with no specific operations. Currently this driver just create/remove card instance according to callbacks. BeBoB is 'BridgeCo enhanced Breakout Box'. This is installed to firewire devices with DM1000/DM1100/DM1500 chipset. It gives common way for host system to handle BeBoB based devices. Current supported devices: - Edirol FA-66/FA-101 - PreSonus FIREBOX/FIREPOD/FP10/Inspire1394 - BridgeCo RDAudio1/Audio5 - Mackie Onyx 1220/1620/1640 (Firewire I/O Card) - Mackie d.2 (Firewire Option) - Stanton FinalScratch 2 (ScratchAmp) - Tascam IF-FW DM - Behringer XENIX UFX 1204/1604 - Behringer Digital Mixer X32 series (X-UF Card) - Apogee Rosetta 200/Rosetta 400 (X-FireWire card) - Apogee DA-16X/AD-16X/DD-16X (X-FireWire card) - Apogee Ensemble - ESI Quotafire610 - AcousticReality eARMasterOne - CME MatrixKFW - Phonix Helix Board 12 MkII/18 MkII/24 MkII - Phonic Helix Board 12 Universal/18 Universal/24 Universal - Lynx Aurora 8/16 (LT-FW) - ICON FireXon - PrismSound Orpheus/ADA-8XR Devices possible to be supported if identifying IDs: - Apogee Mini-Me Firewire/Mini-DAC Firewire - Behringer F-Control Audio 610/1616 - Cakewalk Sonar Power Studio 66 - CME UF400e - ESI Quotafire XL - Infrasonic DewX/Windy6 - Mackie Digital X Bus x.200/400 - Phonic Helix Board 12/18/24 - Phonic FireFly 202/302 - Rolf Spuler Firewire Guitar Tested-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>