uda1380.c (87d8a69709d971913e6cc7210450fcb8be963667) | uda1380.c (b2c812e22de88bb79c290c0e718280f10b64a48d) |
---|---|
1/* 2 * uda1380.c - Philips UDA1380 ALSA SoC audio driver 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License version 2 as 6 * published by the Free Software Foundation. 7 * 8 * Copyright (c) 2007-2009 Philipp Zabel <philipp.zabel@gmail.com> --- 462 unchanged lines hidden (view full) --- 471} 472 473static int uda1380_trigger(struct snd_pcm_substream *substream, int cmd, 474 struct snd_soc_dai *dai) 475{ 476 struct snd_soc_pcm_runtime *rtd = substream->private_data; 477 struct snd_soc_device *socdev = rtd->socdev; 478 struct snd_soc_codec *codec = socdev->card->codec; | 1/* 2 * uda1380.c - Philips UDA1380 ALSA SoC audio driver 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License version 2 as 6 * published by the Free Software Foundation. 7 * 8 * Copyright (c) 2007-2009 Philipp Zabel <philipp.zabel@gmail.com> --- 462 unchanged lines hidden (view full) --- 471} 472 473static int uda1380_trigger(struct snd_pcm_substream *substream, int cmd, 474 struct snd_soc_dai *dai) 475{ 476 struct snd_soc_pcm_runtime *rtd = substream->private_data; 477 struct snd_soc_device *socdev = rtd->socdev; 478 struct snd_soc_codec *codec = socdev->card->codec; |
479 struct uda1380_priv *uda1380 = codec->private_data; | 479 struct uda1380_priv *uda1380 = snd_soc_codec_get_drvdata(codec); |
480 int mixer = uda1380_read_reg_cache(codec, UDA1380_MIXER); 481 482 switch (cmd) { 483 case SNDRV_PCM_TRIGGER_START: 484 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: 485 uda1380_write_reg_cache(codec, UDA1380_MIXER, 486 mixer & ~R14_SILENCE); 487 schedule_work(&uda1380->work); --- 281 unchanged lines hidden (view full) --- 769 gpio_direction_output(pdata->gpio_reset, 1); 770 udelay(5); 771 gpio_set_value(pdata->gpio_reset, 0); 772 773 mutex_init(&codec->mutex); 774 INIT_LIST_HEAD(&codec->dapm_widgets); 775 INIT_LIST_HEAD(&codec->dapm_paths); 776 | 480 int mixer = uda1380_read_reg_cache(codec, UDA1380_MIXER); 481 482 switch (cmd) { 483 case SNDRV_PCM_TRIGGER_START: 484 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: 485 uda1380_write_reg_cache(codec, UDA1380_MIXER, 486 mixer & ~R14_SILENCE); 487 schedule_work(&uda1380->work); --- 281 unchanged lines hidden (view full) --- 769 gpio_direction_output(pdata->gpio_reset, 1); 770 udelay(5); 771 gpio_set_value(pdata->gpio_reset, 0); 772 773 mutex_init(&codec->mutex); 774 INIT_LIST_HEAD(&codec->dapm_widgets); 775 INIT_LIST_HEAD(&codec->dapm_paths); 776 |
777 codec->private_data = uda1380; | 777 snd_soc_codec_set_drvdata(codec, uda1380); |
778 codec->name = "UDA1380"; 779 codec->owner = THIS_MODULE; 780 codec->read = uda1380_read_reg_cache; 781 codec->write = uda1380_write; 782 codec->bias_level = SND_SOC_BIAS_OFF; 783 codec->set_bias_level = uda1380_set_bias_level; 784 codec->dai = uda1380_dai; 785 codec->num_dai = ARRAY_SIZE(uda1380_dai); --- 134 unchanged lines hidden --- | 778 codec->name = "UDA1380"; 779 codec->owner = THIS_MODULE; 780 codec->read = uda1380_read_reg_cache; 781 codec->write = uda1380_write; 782 codec->bias_level = SND_SOC_BIAS_OFF; 783 codec->set_bias_level = uda1380_set_bias_level; 784 codec->dai = uda1380_dai; 785 codec->num_dai = ARRAY_SIZE(uda1380_dai); --- 134 unchanged lines hidden --- |