1. 22 3月, 2013 17 次提交
  2. 21 3月, 2013 23 次提交
    • M
      [media] dvb-core: don't clear stats at DTV_CLEAR · 808d24d6
      Mauro Carvalho Chehab 提交于
      The stats are cleared by the frontend. Don't do it at DTV_CLEAR.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      808d24d6
    • M
      [media] drxk: Fix bogus signal strength indicator · 340e7696
      Mauro Carvalho Chehab 提交于
      The DVBv3 signal strength indicator is bogus: it doesn't range
      from 0 to 65535 as it would be expected. Also, 0 means the max
      signal strength.
      Now that a better way to estimate it was added, use the new
      way.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      340e7696
    • M
      [media] drxk: use a better calculus for RF strength · 59a7a23c
      Mauro Carvalho Chehab 提交于
      The AZ6007 driver released by Terratec has a better way to
      estimate the signal strength, at CtrlSigStrength(). Port it
      to the driver.
      It should be noticed that there are two parameters there that
      are tuner-specific.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      59a7a23c
    • M
      [media] drxk: Add pre/post BER and PER/UCB stats · 8f3741e0
      Mauro Carvalho Chehab 提交于
      The original az6007 driver has the code to calculate such
      stats. Add it to the driver, reporting them via DVBv5
      stats API.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      8f3741e0
    • M
      [media] drxk: remove dummy BER read code · 2b0e1f3a
      Mauro Carvalho Chehab 提交于
      The BER code does nothing but filling it with zero. Remove it.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      2b0e1f3a
    • M
      [media] siano: make some functions static · 2bf0f93e
      Mauro Carvalho Chehab 提交于
      drivers/media/common/siano/smsdvb-debugfs.c:51:6: warning: no previous prototype for 'smsdvb_print_dvb_stats' [-Wmissing-prototypes]
      drivers/media/common/siano/smsdvb-debugfs.c:154:6: warning: no previous prototype for 'smsdvb_print_isdb_stats' [-Wmissing-prototypes]
      drivers/media/common/siano/smsdvb-debugfs.c:244:6: warning: no previous prototype for 'smsdvb_print_isdb_stats_ex' [-Wmissing-prototypes]
      drivers/media/common/siano/smscoreapi.c:832:5: warning: no previous prototype for 'smscore_configure_board' [-Wmissing-prototypes]
      drivers/media/common/siano/smscoreapi.c:1301:5: warning: no previous prototype for 'smscore_init_device' [-Wmissing-prototypes]
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      2bf0f93e
    • M
      [media] siano: Fix the remaining checkpatch.pl compliants · 05ad412a
      Mauro Carvalho Chehab 提交于
      Fix all other remaining checkpatch.pl compliants on the Siano driver,
      except for the 80-cols (soft) limit. Those are harder to fix, and
      probably not worth to do right now.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      05ad412a
    • M
      [media] siano: remove the remaining CamelCase compliants · 28a59df4
      Mauro Carvalho Chehab 提交于
      Remove the remaining CamelCase checkpatch.pl compliants.
      There are still a few left, but those are due to USB and
      DVB APIs.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      28a59df4
    • M
      [media] siano: fix checkpatch.pl compliants on smscoreapi.h · 90414248
      Mauro Carvalho Chehab 提交于
      Fix the remaining checkpatch.pl compliants at smscoreapi.h,
      except by the "line over 80 characters" on comments. Fixing those
      would require more time, as the better is to convert them into the
      struct descriptions used inside the kernel, as described at:
      	Documentation/kernel-doc-nano-HOWTO.txt
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      90414248
    • M
      [media] siano: convert structure names to lowercase · cf0e9cfc
      Mauro Carvalho Chehab 提交于
      There are several structures defined in uppercase. Convert them
      to lowercase, and simplify their names, when possible.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      cf0e9cfc
    • M
      [media] siano: get rid of CammelCase from smscoreapi.h · dfef84fc
      Mauro Carvalho Chehab 提交于
      It is almost impossible to see a compliant with checkpatch.pl
      on those Siano drivers, as there are simply too much violations
      on it. So, now that a big change was done, the better is to
      cleanup the checkpatch compliants.
      
      Let's first replace all CammelCase symbols found at smscoreapi.h
      using camel_case namespace. That removed 144 checkpatch.pl
      compliants on this file. Of course, the other files need to be
      fixed accordingly.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      dfef84fc
    • M
      [media] siano: add MODULE_FIRMWARE() macros · c8b8fdb3
      Mauro Carvalho Chehab 提交于
      This driver can use several firmwares. Provide such info at
      module firmware metadata.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      c8b8fdb3
    • M
      [media] siano: use defines for firmware names · 11ad03a5
      Mauro Carvalho Chehab 提交于
      There are too many firmwares there. As we need to add
      MODULE_FIMWARE() macros, the better is to define their names
      on just one place and use the macros for both cards/device type
      tables and MODULE_FIRMWARE().
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      11ad03a5
    • M
      [media] siano: Remove bogus complain about MSG_SMS_DVBT_BDA_DATA · d8a18e88
      Mauro Carvalho Chehab 提交于
      When the driver is tuned into chanel, and it is removed/reinserted,
      the message stream data may be arriving during device probe:
      	[ 5680.162004] smscore_set_device_mode: set device mode to 6
      	[ 5680.162267] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
      	[ 5680.162391] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
      	[ 5680.162641] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
      	[ 5680.162891] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
      	[ 5680.163016] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
      	[ 5680.163266] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
      	[ 5680.163516] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
      	[ 5680.163640] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
      	[ 5680.163891] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
      	[ 5680.164016] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
      	[ 5680.164265] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
      	[ 5680.164515] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
      	[ 5680.164519] smscore_onresponse: Firmware id 6 prots 0x40 ver 8.1
      	[ 5680.164766] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
      	[ 5680.166018] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled.
      	[ 5680.166438] DVB: registering new adapter (Siano Rio Digital Receiver)
      Instead of complaining, just silently discard those messages, instead of
      complaining.
      A proper fix is to put the device on suspend/power down mode when the module
      is removed.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      d8a18e88
    • M
      [media] siano: remove doubled new line · 98c3f94e
      Mauro Carvalho Chehab 提交于
      sms_debug() and sms_info() already adds a '\n' at the printed
      strings. No need to add more.
      That helps to cleanup stuff like:
      	[ 4868.205648] smscore_onresponse: message not handled.
      	[ 4868.205898] smscore_onresponse: message not handled.
      and:
      	[ 5467.959769] smscore_onresponse:
      	data rate 143069 bytes/secs
      While here, provides the message name, when the message is not
      handled by the smsmdtv core.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      98c3f94e
    • M
      [media] siano: remove a bogus printk line · 07bb6bdd
      Mauro Carvalho Chehab 提交于
      The logic that detects the types of sms devices is bogus. It returns
      	[ 4645.187790] smsusb_init_device: line: 372: Unspecified sms device type!
      For several devices, including the one I have (SMS_RIO). In a matter
      of fact, the right thing to do there is to print an error only if
      the device is really unknown (SMS_UNKNOWN_TYPE).
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      07bb6bdd
    • M
      [media] siano: add a MAINTAINERS entry for it · beb91d46
      Mauro Carvalho Chehab 提交于
      Nobody is maintaining this driver. The project started by a
      developer that used to work at Hauppauge. A Siano developer
      assumed its maintainership after that, but he left the company.
      Another Siano developer sent several patches updating it, but,
      after upstream feedback, it seems he gave up merging the driver,
      as he never answered back to the received feedbacks.
      As I have a few siano devices here that work with ISDB-T, I
      can help to keep it into a good shape. So, better to take its
      maintainership.
      I don't have any siano SDIO setup here, trough. So, I'll just
      apply without any test any patch that looks sane and touches
      only drivers/media/mmc/siano. So, let's tag it as "Odd fixes".
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      beb91d46
    • M
      [media] siano: reorder smscore_get_fw_filename() function · 2a764315
      Mauro Carvalho Chehab 提交于
      Put this function earlier in the code, to avoid the need of
      defining a function stub.
      No functional changes.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      2a764315
    • M
      [media] siano: remove the bogus firmware lookup code · e584f9d6
      Mauro Carvalho Chehab 提交于
      There is an special lookup code that is called when
      SMS_BOARD_UNKNOWN. The logic there is bogus and will cause
      an oops, as .type is SMS_UNKNOWN_TYPE (-1).
      As the code would do:
      	return smscore_fw_lkup[type][mode];
      That would mean that it would try to go past the
      smscore_fw_lkup table.
      So, just remove that bogus code, simplifying the logic.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      e584f9d6
    • M
      [media] siano: honour per-card default mode · 9711a8a6
      Mauro Carvalho Chehab 提交于
      Instead of using a global default_mode, passed via modprobe
      parameter, use the one defined inside the cards struct.
      That will prevent the need of manually specify it for each
      board, except, of course, if the user wants to do something
      different, on boards that accept multiple types.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      9711a8a6
    • M
      [media] siano: simplify firmware lookup logic · 5ac14b60
      Mauro Carvalho Chehab 提交于
      There are two ways to specify firmware for siano devices: a
      per-device ID and a per-device type.
      The per-device type logic is currently made by a 11x9 string
      table, sparsely filled. It is very hard to read the table at
      the source code, as there are too much "none" filling there
      ("none" there is a way to tell NULL).
      Instead of using such problematic table, convert it into an
      easy to read table, where the unused values will be defaulted
      to NULL.
      While here, also simplifies a little bit the logic and print
      a message if an user-selected mode doesn't exist.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      5ac14b60
    • M
      [media] siano: add support for .poll on debugfs · 6a28bd94
      Mauro Carvalho Chehab 提交于
      Implement poll() method for debugfs and be sure that the
      debug_data won't be freed on ir or on read().
      With this change, poll() will return POLLIN if either data was
      filled or if data was read. That allows read() to return 0
      to indicate EOF in the latter case.
      As poll() is now provided, fix support for non-block mode.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      6a28bd94
    • M
      [media] siano: fix status report with old firmware and ISDB-T · 773adad1
      Mauro Carvalho Chehab 提交于
      This seems to be ever broken. That's the status report with
      Firmware 2.1, before adding support for sms2270 is:
      [22273.787218] smsdvb_onresponse: MSG_SMS_GET_STATISTICS_RES
      [22273.792592] IsRfLocked = 1
      [22273.792592] IsDemodLocked = 1
      ...
      [22273.792598] TransmissionMode = -64
      ...
      (all unshown fields are filled with zeros)
      Of course, transmission mode being a negative number is wrong.
      So, we need to take a deeper look on it.
      With the debugfs patches applied, it is possible to see that, instead
      of filling StatisticsType with 5, and FullSize with the size of the
      payload (this is what happens with sms2270 and firmware 8.1),
      those fields are also initialized with zero:
      StatisticsType = 0	FullSize = 0
      IsRfLocked = 1		IsDemodLocked = 1	IsExternalLNAOn = 0
      SNR = 0 dB		RSSI = 0 dBm		InBandPwr = 0 dBm
      CarrierOffset = 0	Bandwidth = 0		Frequency = 0 Hz
      TransmissionMode = -64	ModemState = 0		GuardInterval = 0
      SystemType = 0		PartialReception = 0	NumOfLayers = 0
      SmsToHostTxErrors = 0
      The data under "TransmissionMode" varies according with the signal,
      and it is negative. It also matches the value for InBandPwr when
      the tuner is on DVB-T (ok, signal doesn't lock, but the power level
      should be about the same with the antena fixed, and measured at about
      the same time).
      So, there's a very high chance that, when StatisticsType is zero, the
      signal strength is at the same position as Transmission Mode.
      So, discard all other parameters, and provide only signal/rf lock and
      signal strength if StatisticsType is 0, for ISDB-T.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      773adad1